|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- //index.js
- //获取应用实例
- const app = getApp()
-
- Page({
- data: {
- dataList:[],
- showMask:false,//规则弹窗
- },
- //事件处理函数
- onLoad: function () {
- if (app.globalData.openId){
- this.getDataList();
- }else{
- app.globalData.openidSuccessFuc = this.getDataList;
- }
- },
- getDataList:function(){
- app.wxRequest(app.globalData.httpUrl + 'couponsell/list', {}, e => {
- console.log(e)
- if (e.code == 200) {
- this.setData({
- dataList:e.data[0]
- })
- }
- }, this)
- },
- skipPage:function(e){
- // console.log(e)
- var index = e.currentTarget.dataset.index
- wx.navigateTo({
- url: '../buyTicket/buyTicket?index=' + index
- })
- },
- showRule:function(){//显示弹窗
- this.setData({
- showMask:true
- })
- },
- hiddenRule:function(){//隐藏弹窗
- this.setData({
- showMask: false
- })
- },
- /**
- * 用户点击右上角分享
- */
- onShareAppMessage: function () {
- return {
- title: "老门框爆肚会员",
- path: "/pages/register/register",
- success: res => {
- console.log(res, "转发成功")
- },
- }
- },
- })
|