|
|
@@ -30,6 +30,8 @@ Page({ |
|
|
|
market: app.globalData.market, |
|
|
|
list: [], |
|
|
|
loading: true, |
|
|
|
fistLogin:null, |
|
|
|
alphaData: null, |
|
|
|
swiperCurrent: 0, |
|
|
|
title: null, |
|
|
|
desc: null, |
|
|
@@ -54,6 +56,11 @@ Page({ |
|
|
|
showIf:false |
|
|
|
}) |
|
|
|
}, |
|
|
|
alphaClick: function (even) { |
|
|
|
var animation = wx.createAnimation({}) |
|
|
|
animation.opacity(0).step({ duration: 2000 }) |
|
|
|
this.setData({ alphaData: animation.export() }) |
|
|
|
}, |
|
|
|
// 我的卡包 |
|
|
|
mycard:function(){ |
|
|
|
wx.navigateTo({ |
|
|
@@ -233,8 +240,6 @@ Page({ |
|
|
|
onLoad: function(options) { |
|
|
|
let that = this; |
|
|
|
let optionss = JSON.parse(wx.getStorageSync('options')); |
|
|
|
console.log(optionss); |
|
|
|
console.log("-------------------------------------------optionssss------------------------------------") |
|
|
|
if (options.played == "true") { |
|
|
|
that.setData({ |
|
|
|
played: true |
|
|
@@ -252,7 +257,8 @@ Page({ |
|
|
|
// util.barcode("barcode", optionss.quancode, 510, 100); |
|
|
|
}, |
|
|
|
onShow: function() { |
|
|
|
this.setData({ |
|
|
|
let that = this; |
|
|
|
that.setData({ |
|
|
|
havePlayEd: app.globalData.havePlayEd ? app.globalData.havePlayEd : false |
|
|
|
}) |
|
|
|
let num = wx.getStorageSync('couponNum'); |
|
|
@@ -261,14 +267,14 @@ Page({ |
|
|
|
wx.showTabBarRedDot({ |
|
|
|
index: 2 |
|
|
|
}) |
|
|
|
this.setData({ |
|
|
|
that.setData({ |
|
|
|
display: "block" |
|
|
|
}) |
|
|
|
}else{ |
|
|
|
wx.hideTabBarRedDot({ |
|
|
|
index: 2 |
|
|
|
}) |
|
|
|
this.setData({ |
|
|
|
that.setData({ |
|
|
|
display: "none" |
|
|
|
}) |
|
|
|
} |
|
|
@@ -276,17 +282,27 @@ Page({ |
|
|
|
wx.showTabBarRedDot({ |
|
|
|
index: 2 |
|
|
|
}) |
|
|
|
this.setData({ |
|
|
|
that.setData({ |
|
|
|
display1: "block" |
|
|
|
}) |
|
|
|
} else { |
|
|
|
wx.hideTabBarRedDot({ |
|
|
|
index: 2 |
|
|
|
}) |
|
|
|
this.setData({ |
|
|
|
that.setData({ |
|
|
|
display1: "none" |
|
|
|
}) |
|
|
|
} |
|
|
|
console.log(app.globalData.score) |
|
|
|
if (app.globalData.score){ |
|
|
|
that.setData({ |
|
|
|
fistLogin: app.globalData.score |
|
|
|
}) |
|
|
|
} |
|
|
|
// 如果有游戏 |
|
|
|
setTimeout(function(){ |
|
|
|
that.alphaClick(); |
|
|
|
},8000) |
|
|
|
}, |
|
|
|
// 会员码获取 |
|
|
|
getmemberId: function(token) { |
|
|
@@ -426,7 +442,7 @@ Page({ |
|
|
|
}).then(res => { |
|
|
|
if (res.data.id) { |
|
|
|
_this.setData({ |
|
|
|
showGame: true |
|
|
|
showGame: true, |
|
|
|
}) |
|
|
|
}else{ |
|
|
|
_this.setData({ |
|
|
@@ -441,6 +457,7 @@ Page({ |
|
|
|
_this.setData({ |
|
|
|
showGame: false |
|
|
|
}) |
|
|
|
this.alphaClick(); |
|
|
|
}) |
|
|
|
}, |
|
|
|
/** |
|
|
@@ -455,14 +472,14 @@ Page({ |
|
|
|
pageSize: 7 |
|
|
|
} |
|
|
|
}).then(res => { |
|
|
|
that.getmemberId(app.globalData.token); |
|
|
|
// that.getmemberId(app.globalData.token); |
|
|
|
// that.checkUserCarStatus(); |
|
|
|
that.setData({ |
|
|
|
list: res.data.list |
|
|
|
}); |
|
|
|
}) |
|
|
|
.catch(err => { |
|
|
|
that.getmemberId(app.globalData.token); |
|
|
|
// that.getmemberId(app.globalData.token); |
|
|
|
// that.checkUserCarStatus(); |
|
|
|
}) |
|
|
|
; |
|
|
|