cu-custom.js 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. const app = getApp();
  2. Component({
  3. /**
  4. * 组件的一些选项
  5. */
  6. options: {
  7. addGlobalClass: true,
  8. multipleSlots: true
  9. },
  10. /**
  11. * 组件的对外属性
  12. */
  13. properties: {
  14. bgColor: {
  15. type: String,
  16. default: ''
  17. },
  18. isCustom: {
  19. type: [Boolean, String],
  20. default: false
  21. },
  22. isNotice: {
  23. type: [Boolean, String],
  24. default: false
  25. },
  26. isBack: {
  27. type: [Boolean, String],
  28. default: false
  29. },
  30. bgImage: {
  31. type: String,
  32. default: ''
  33. },
  34. },
  35. /**
  36. * 组件的初始数据
  37. */
  38. data: {
  39. StatusBar: app.globalData.StatusBar,
  40. CustomBar: app.globalData.CustomBar,
  41. Custom: app.globalData.Custom
  42. },
  43. /**
  44. * 组件的方法列表
  45. */
  46. methods: {
  47. BackPage() {
  48. wx.navigateBack({
  49. delta: 1
  50. });
  51. },
  52. toHome(){
  53. wx:wx.switchTab({
  54. url: '/pages/home/index',
  55. })
  56. },
  57. handleNotice(){
  58. console.log("通知信息")
  59. wx.navigateTo({
  60. url: '/pages/messageInfo/index'
  61. })
  62. }
  63. }
  64. })