|
- //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
- })
- }
- })
|