Browse Source

首页游戏入口显示修改

tags/2.3.0
海洋之声 6 years ago
parent
commit
1c47171499
1 changed files with 14 additions and 4 deletions
  1. +14
    -4
      pages/index/index.js

+ 14
- 4
pages/index/index.js View File

@@ -201,9 +201,7 @@ Page({
.then(res => {
app.globalData.token = res.data.token;
if (res.data.token){
that.setData({
showGame: true
})

that.getGameOne(res.data.token)
that.getStaticGame(res.data.token)
}
@@ -264,28 +262,40 @@ Page({
token: token
}
}).then(res => {
if (res.data.id) {
_this.setData({
showIf:true
})
}
_this.setData({
staticGamedata: res.data
})
})
.catch(err => {
console.log(err)
})
},
getGameOne:function(token){
let _this=this;
Http.get({
url: config.api.getGame,
data:{
triggleAction: 1,
token: token
}
}).then(res => {
if (res.data.id){
_this.setData({
showIf:true
showGame: true
})
}
_this.setData({
gamedata:res.data
})
})
.catch(err => {
console.log(err)
})
},
/**
* banner


Loading…
Cancel
Save