Pārlūkot izejas kodu

首页游戏入口显示修改

tags/2.3.0
海洋之声 pirms 6 gadiem
vecāks
revīzija
1c47171499
1 mainītis faili ar 14 papildinājumiem un 4 dzēšanām
  1. +14
    -4
      pages/index/index.js

+ 14
- 4
pages/index/index.js Parādīt failu

@@ -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


Notiek ielāde…
Atcelt
Saglabāt