promotionofflineresult.js 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. //index.js
  2. //获取应用实例
  3. const app = getApp()
  4. Page({
  5. data: {
  6. status: false,
  7. statusimg: '',
  8. statustext: '',
  9. navData: [{
  10. name: "首页", //文本
  11. current: 0, //是否是当前页,0不是 1是
  12. style: 0, //样式
  13. typea: "https://yuesuo.yueguanjia.com/MiniProgram/images/home.png", //不同图标
  14. typec: "https://yuesuo.yueguanjia.com/MiniProgram/images/homec.png",
  15. fn: 'index' //对应处理函数
  16. }, {
  17. name: "套餐",
  18. current: 0,
  19. style: 0,
  20. typea: "https://yuesuo.yueguanjia.com/MiniProgram/images/packages.png", //不同图标
  21. typec: "https://yuesuo.yueguanjia.com/MiniProgram/images/packagesc.png",
  22. fn: 'packages'
  23. }, {
  24. name: "悦所",
  25. current: 0,
  26. style: 2,
  27. ico: '',
  28. fn: 'yuesuo'
  29. }, {
  30. name: "活动",
  31. current: 0,
  32. style: 0,
  33. typea: "https://yuesuo.yueguanjia.com/MiniProgram/images/promotion.png", //不同图标
  34. typec: "https://yuesuo.yueguanjia.com/MiniProgram/images/promotionc.png",
  35. fn: 'promotion'
  36. }, {
  37. name: "我的",
  38. current: 0,
  39. style: 0,
  40. typea: "https://yuesuo.yueguanjia.com/MiniProgram/images/mine.png", //不同图标
  41. typec: "https://yuesuo.yueguanjia.com/MiniProgram/images/minec.png",
  42. fn: 'mine'
  43. }, ]
  44. },
  45. index: function() {
  46. app.gopage("/pages/index/index");
  47. },
  48. promotion: function() {
  49. app.gopage("/pages/promotion/promotion");
  50. },
  51. yuesuo: function() {
  52. app.gopage("/pages/yuesuo/yuesuo");
  53. },
  54. packages: function() {
  55. app.gopage("/pages/packages/packages");
  56. },
  57. mine: function() {
  58. app.gopage("/pages/mine/mine");
  59. },
  60. //事件处理函数
  61. bindViewTap: function() {
  62. wx.navigateTo({
  63. url: '../logs/logs'
  64. })
  65. },
  66. onLoad: function(options) {
  67. if (options.status === 'yes') {
  68. this.setData({
  69. statusimg: 'https://yuesuo.yueguanjia.com/MiniProgram/promotion/offline/get.png',
  70. statustext: '恭喜您,领取成功'
  71. })
  72. } else {
  73. this.setData({
  74. statusimg: 'https://yuesuo.yueguanjia.com/MiniProgram/promotion/offline/none.png',
  75. statustext: '很遗憾,您在之前的活动中已经领取过了'
  76. })
  77. }
  78. let _this = this;
  79. _this.setData({
  80. navH: app.globalData.navHeight
  81. })
  82. },
  83. // hrefCl: function(e) {
  84. // wx.navigateTo({
  85. // url: '/pages/consultant/consultant'
  86. // })
  87. // },
  88. // hrefPm: function(e) {
  89. // wx.navigateTo({
  90. // url: '/pages/promotion/promotion'
  91. // })
  92. // },
  93. // hrefEq: function(e) {
  94. // wx.navigateTo({
  95. // url: '/pages/equipment/equipment'
  96. // })
  97. // }
  98. })