东风启辰小程序端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

95 lines
1.6KB

  1. // pages/guess/guess.js
  2. const app = getApp();
  3. Page({
  4. /**
  5. * 页面的初始数据
  6. */
  7. data: {
  8. imgUrl: app.globalData.urlStatic,//图片路径
  9. yuyueShow:false,
  10. },
  11. /**
  12. * 生命周期函数--监听页面加载
  13. */
  14. onLoad: function (options) {
  15. app.globalData.nowPage = 3;
  16. if (app.globalData.openid) {
  17. this.loadFun();
  18. } else {
  19. app.globalData.openidSuccessFuc = this.loadFun;
  20. }
  21. },
  22. loadFun:function(){
  23. if (!app.globalData.addPageEnterState.guessPrize) {
  24. app.addPageEnter("7C8AAA38F8D85EFC48C2995FB6EBAC19");
  25. app.globalData.addPageEnterState.guessPrize = true;
  26. }
  27. },
  28. /**
  29. * 生命周期函数--监听页面初次渲染完成
  30. */
  31. onReady: function () {
  32. },
  33. /**
  34. * 生命周期函数--监听页面显示
  35. */
  36. onShow: function () {
  37. },
  38. /**
  39. * 生命周期函数--监听页面隐藏
  40. */
  41. onHide: function () {
  42. },
  43. /**
  44. * 生命周期函数--监听页面卸载
  45. */
  46. onUnload: function () {
  47. },
  48. /**
  49. * 页面相关事件处理函数--监听用户下拉动作
  50. */
  51. onPullDownRefresh: function () {
  52. },
  53. /**
  54. * 页面上拉触底事件的处理函数
  55. */
  56. onReachBottom: function () {
  57. },
  58. /**
  59. * 用户点击右上角分享
  60. */
  61. onShareAppMessage: function () {
  62. },
  63. enterLucky:function(){//每日抽奖
  64. wx.navigateTo({
  65. url: '/pages/luckyStar/luckyStar'
  66. })
  67. },
  68. yuyueControl:function(){//预约
  69. this.setData({
  70. yuyueShow: !this.data.yuyueShow
  71. })
  72. },
  73. enterGuessPrize:function(){//开始竞猜
  74. wx.navigateTo({
  75. url: '/pages/guessPrize/guessPrize'
  76. })
  77. }
  78. })