diff --git a/app.js b/app.js index f969143..c91a560 100644 --- a/app.js +++ b/app.js @@ -135,6 +135,14 @@ App({ } }) } + else if(app.globalData.user_id){ //-- 启用默认的user_id -- + app.promiseGet("/api/weshop/users/get/" + app.globalData.setting.stoid + "/" + app.globalData.user_id,{}).then(res=>{ + if(res.data.code==0){ + app.globalData.userInfo = res.data.data; + wx.setStorageSync("userinfo",app.globalData.userInfo); + } + }) + } else { //--拿下code-- wx.login({ @@ -179,14 +187,7 @@ App({ }) } - // else if(app.globalData.user_id){ //-- 启用默认的user_id -- - // app.promiseGet("/api/weshop/users/get/" + app.globalData.setting.stoid + "/" + app.globalData.user_id,{}).then(res=>{ - // if(res.data.code==0){ - // app.globalData.userInfo = res.data.data; - // wx.setStorageSync("userinfo",app.globalData.userInfo); - // } - // }) - // } + } wx.getSystemInfo({ success: (res) => {