Commit 8f04b84a by 李伟康

提交代码

1 parent 08e154a0
......@@ -143,6 +143,7 @@ class UsersApi {
/**获取微信用户信息 */
async getWXUserInfo() {
let wx_user_info = wx.$storage.get('wx_user_info')
console.log(wx_user_info)
if (!wx_user_info) {
const data = await this.getUserProfile()
wx.$storage.set('wx_user_info', data)
......
......@@ -273,9 +273,6 @@ Component({
disabled: false
})
this.loginToken = data
USERAPI.getUserProfile(data).then(data => {
wx.$storage.set('wx_user_info', data)
})
} else this.reLogin(message)
wx.hideLoading()
} catch ({
......
......@@ -16,7 +16,7 @@ class Router {
wx.onAppRoute(async e => {
let thisPage = this.getPageInstance()
if (thisPage) {
await USERAPI.getWXUserInfo()
if(!thisPage.route.includes('login')) await USERAPI.getWXUserInfo()
thisPage.setData({ IMG_URL })
if(Object.keys(this[_query]).length) thisPage.options = this[_query]
this.setNavigationBarTitleText(thisPage)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!