|
|
@@ -74,7 +74,10 @@ Page({ |
|
|
|
display: 'none', |
|
|
|
display1: 'none', |
|
|
|
optionsData: null, |
|
|
|
page: 1 // 刷新进入页面时已经加载了第一页数据,onReachBottom时 page++,从第2页开始加载 |
|
|
|
page: 1 ,// 刷新进入页面时已经加载了第一页数据,onReachBottom时 page++,从第2页开始加载 |
|
|
|
openId:'', |
|
|
|
showGg: false, |
|
|
|
ggdata:{} |
|
|
|
}, |
|
|
|
alphaClick: function(even) { |
|
|
|
var animation = wx.createAnimation({}) |
|
|
@@ -189,6 +192,12 @@ Page({ |
|
|
|
this.getLocation(); |
|
|
|
let that = this; |
|
|
|
let optionss; |
|
|
|
let openId = wx.getStorageSync('openId') |
|
|
|
if(openId){ |
|
|
|
that.setData({ |
|
|
|
openId:openId |
|
|
|
}) |
|
|
|
} |
|
|
|
if (wx.getStorageSync('options')){ |
|
|
|
optionss = JSON.parse(wx.getStorageSync('options')); |
|
|
|
} |
|
|
@@ -284,7 +293,7 @@ Page({ |
|
|
|
levelName: res.data.levelName, |
|
|
|
upgradePercent: res.data.upgradePercent, |
|
|
|
upgradeScore: res.data.upgradeScore, |
|
|
|
memberId: res.data.id |
|
|
|
memberId: res.data.id, |
|
|
|
}) |
|
|
|
}) |
|
|
|
.catch(err => { |
|
|
@@ -347,6 +356,7 @@ Page({ |
|
|
|
that.topicShow(); |
|
|
|
that.getxsList(); |
|
|
|
that.getMallInfo(app.globalData.token); |
|
|
|
|
|
|
|
if (app.couponChannelListCallback) { |
|
|
|
app.couponChannelListCallback(app.globalData.token); |
|
|
|
} |
|
|
@@ -363,8 +373,10 @@ Page({ |
|
|
|
} |
|
|
|
}) |
|
|
|
.then(res => { |
|
|
|
that.getGameOne(app.globalData.token) |
|
|
|
console.log(res) |
|
|
|
// that.getGameOne(app.globalData.token) |
|
|
|
that.getStaticGame(app.globalData.token) |
|
|
|
that.getGg(app.globalData.token) |
|
|
|
let weapNote = JSON.parse(res.data.weapNote); |
|
|
|
that.setData({ |
|
|
|
desc: weapNote.firstpage.desc, |
|
|
@@ -372,8 +384,9 @@ Page({ |
|
|
|
}) |
|
|
|
}) |
|
|
|
.catch(err => { |
|
|
|
that.getGameOne(app.globalData.token) |
|
|
|
// that.getGameOne(app.globalData.token) |
|
|
|
that.getStaticGame(app.globalData.token) |
|
|
|
that.getGg(app.globalData.token) |
|
|
|
wx.showModal({ |
|
|
|
title: "提示", |
|
|
|
content: err.errMsg, |
|
|
@@ -616,6 +629,42 @@ Page({ |
|
|
|
e.currentTarget.dataset.couponchannelid |
|
|
|
}&couponId=${e.currentTarget.dataset.couponid}` |
|
|
|
}); |
|
|
|
}, |
|
|
|
//浮层广告 |
|
|
|
getGg: function (token) { |
|
|
|
let that = this |
|
|
|
Http.get({ |
|
|
|
url: config.api.getGg, |
|
|
|
data: { |
|
|
|
token: token, |
|
|
|
appId: config.weapp.AppId, |
|
|
|
openId: that.data.openId |
|
|
|
} |
|
|
|
}).then(res => { |
|
|
|
console.log(res) |
|
|
|
if (res.data.id) { |
|
|
|
that.setData({ |
|
|
|
showGg: true, |
|
|
|
}) |
|
|
|
console.log(that.data.showGg,1111111111111) |
|
|
|
} else { |
|
|
|
that.setData({ |
|
|
|
showGg: false |
|
|
|
}) |
|
|
|
that.getGameOne(app.globalData.token) |
|
|
|
console.log(that.data.showGg,222222222222222222) |
|
|
|
} |
|
|
|
that.setData({ |
|
|
|
ggdata: res.data |
|
|
|
}) |
|
|
|
}) |
|
|
|
.catch(err => { |
|
|
|
this.setData({ |
|
|
|
showGg: false |
|
|
|
}) |
|
|
|
that.getGameOne(app.globalData.token) |
|
|
|
that.alphaClick(); |
|
|
|
}) |
|
|
|
}, |
|
|
|
/** |
|
|
|
* 刷新 |
|
|
|