|
|
@@ -11,7 +11,9 @@ Page({ |
|
|
|
expiredTime: "", |
|
|
|
updateDate: "", |
|
|
|
//存储计时器 |
|
|
|
setInter: "" |
|
|
|
setInter: "", |
|
|
|
staticGamedata: {}, |
|
|
|
showIf:false |
|
|
|
}, |
|
|
|
onUnload: function() { |
|
|
|
let that = this; |
|
|
@@ -20,6 +22,31 @@ Page({ |
|
|
|
value: that.data.sight, |
|
|
|
}) |
|
|
|
}, |
|
|
|
gotogame: function () { |
|
|
|
let that = this; |
|
|
|
wx.navigateTo({ |
|
|
|
url: '/pages/game/index?url=' + that.data.staticGamedata.url + "&id=" + that.data.staticGamedata.id + "&gameId=" + that.data.staticGamedata.gameId, |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 获取游戏 |
|
|
|
getStaticGame(token) { |
|
|
|
let _this = this; |
|
|
|
Http.get({ |
|
|
|
url: config.api.getGame, |
|
|
|
data: { |
|
|
|
triggleAction: 3 |
|
|
|
} |
|
|
|
}).then(res => { |
|
|
|
if (res.data.id) { |
|
|
|
_this.setData({ |
|
|
|
showIf: true |
|
|
|
}) |
|
|
|
} |
|
|
|
_this.setData({ |
|
|
|
staticGamedata: res.data |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
onLoad: function(options) { |
|
|
|
let that = this; |
|
|
|
console.log(options.sight); |
|
|
@@ -38,9 +65,7 @@ Page({ |
|
|
|
//获得优惠券的详情 |
|
|
|
that.data.setInter = setInterval(function() { |
|
|
|
if ( |
|
|
|
options.quancode != null && |
|
|
|
options.quancode != "" && |
|
|
|
options.quancode != undefined && |
|
|
|
options.quancode && |
|
|
|
that.data.couponorderstatus == 0 |
|
|
|
) { |
|
|
|
Http.get({ |
|
|
@@ -58,6 +83,8 @@ Page({ |
|
|
|
/** |
|
|
|
* 动态改变上一级页面的核销状态 |
|
|
|
*/ |
|
|
|
|
|
|
|
that.getStaticGame() |
|
|
|
var pages = getCurrentPages(); |
|
|
|
var prevPage = pages[pages.length - 2]; //上一个页面 |
|
|
|
//直接调用上一个页面的setData()方法,把数据存到上一个页面中去 |
|
|
|