From 71e9d9ad18bd2069fb58c1bac084b004d32a54c9 Mon Sep 17 00:00:00 2001 From: donqi Date: Fri, 1 Jul 2022 22:31:45 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A6=96=E9=A1=B5=E4=B8=8D=E5=86=8D=E5=81=9A?= =?UTF-8?q?=E7=99=BB=E5=BD=95=E6=A0=A1=E9=AA=8C=E3=80=82=E7=82=B9=E5=87=BB?= =?UTF-8?q?=E7=AB=8B=E5=8D=B3=E9=80=89=E8=B4=AD=E4=BB=A5=E5=8F=8A=E7=82=B9?= =?UTF-8?q?=E5=87=BB=E9=A6=96=E9=A1=B5=E5=8F=91=E5=B8=83=E5=92=8C=E6=88=91?= =?UTF-8?q?=E7=9A=84=E9=80=89=E9=A1=B9=E7=9A=84=E6=97=B6=E5=80=99=E8=BF=9B?= =?UTF-8?q?=E8=A1=8C=E7=99=BB=E5=BD=95=E6=A0=A1=E9=AA=8C=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/js/request.js | 6 +-- components/custom-bar/module-bar.vue | 5 +- pages/index/home.vue | 36 +------------- pages/index/index.vue | 72 ++++++++++++++++++++-------- pages/product/product-detail.vue | 47 +++++++++++++++--- 5 files changed, 98 insertions(+), 68 deletions(-) diff --git a/common/js/request.js b/common/js/request.js index 07636e2..b838eaf 100644 --- a/common/js/request.js +++ b/common/js/request.js @@ -77,10 +77,8 @@ export default { let userInfo = await wx.getUserProfile({ desc: '用于小程序登录' }); - console.log("从微信获取基本用户信息:" + userInfo); // 获取微信登录凭证 const wxLoginRes = await wx.login(); - console.log(wxLoginRes) // 获取openid const wxAuthRes = await uni.request({ url: '/wx/auth', @@ -88,7 +86,6 @@ export default { code: wxLoginRes.code } }) - console.log(wxAuthRes) const openId = wxAuthRes[1].data.data.openid; // 第一次从服务端获取用户信息 let wxGetUserRes = await this.qryUserInfo(openId); @@ -113,7 +110,6 @@ export default { wxLoginCode: wxLoginRes.code } } - console.log("通过后台服务获取用户信息:" + userInfo); if (!userInfo || userInfo.customerId == null || userInfo.customerId == undefined) { uni.showToast({ icon: 'none', @@ -202,7 +198,7 @@ export default { } if (phoneRes && phoneRes.data) { let userInfo = this.getCurUserInfo(); - this.updateUserPhone({ + await this.updateUserPhone({ customerId: userInfo.customerId, account: phoneRes.data, phone: phoneRes.data diff --git a/components/custom-bar/module-bar.vue b/components/custom-bar/module-bar.vue index b1bbf4e..3c011e1 100644 --- a/components/custom-bar/module-bar.vue +++ b/components/custom-bar/module-bar.vue @@ -26,7 +26,8 @@