From f4463289e9d315e7a1ec02ba78930e6bc9cba3c2 Mon Sep 17 00:00:00 2001 From: WXD-SEASON\season Date: Fri, 24 Nov 2023 14:34:52 +0800 Subject: [PATCH] 11 --- app.js | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) 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) => { -- libgit2 0.21.4