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