@@ -56,11 +56,17 @@ Page({ | |||||
* 生命周期函数--监听页面加载 | * 生命周期函数--监听页面加载 | ||||
*/ | */ | ||||
onLoad: function (options) { | onLoad: function (options) { | ||||
setTimeout(() => { //延时300ms 否则 拿不到token%3..x | |||||
if (app.globalData.token) { | |||||
this.getBannerlist() | this.getBannerlist() | ||||
console.log(123) | |||||
}, 300) | |||||
this.gitSquareLis() | |||||
this.gitSquareLis() | |||||
} else { | |||||
app.tokenCallback = token => { | |||||
this.getBannerlist() | |||||
this.gitSquareLis() | |||||
} | |||||
} | |||||
}, | }, | ||||
/* | /* | ||||