From 75ed65331321e1d3030643be5d56c73406bf8638 Mon Sep 17 00:00:00 2001 From: yvan.ni Date: Wed, 14 Jun 2023 17:20:12 +0800 Subject: [PATCH] 获取默认的手机号 --- app.js | 9 +++++++++ 1 file changed, 9 insertions(+), 0 deletions(-) diff --git a/app.js b/app.js index a56a7e9..ac91e1d 100644 --- a/app.js +++ b/app.js @@ -135,6 +135,15 @@ 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