From b959e634d2e280a518d1058d375e02d75bdf479c Mon Sep 17 00:00:00 2001 From: tsui110 Date: Fri, 2 Jan 2026 19:44:22 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=E4=BF=AE=E5=A4=8D=E4=BA=86?= =?UTF-8?q?=E5=BE=88=E5=A4=9A=E4=B8=8D=E8=A7=84=E8=8C=83=E7=94=A8=E8=AF=8D?= =?UTF-8?q?=EF=BC=8C=E6=9B=B4=E6=94=B9=E4=BA=86=E6=89=8B=E6=9C=BA=E7=BB=91?= =?UTF-8?q?=E5=AE=9A=E6=A0=A1=E9=AA=8C=E9=80=BB=E8=BE=91=EF=BC=8C=E8=B0=83?= =?UTF-8?q?=E6=95=B4=E6=9C=80=E5=A4=A7=E9=99=90=E5=88=B6=E8=B4=AD=E4=B9=B0?= =?UTF-8?q?=E6=AC=A1=E6=95=B0=E4=B8=BA200=E6=AC=A1=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/appUser.js | 12 ++++ components/GamePassPurchasePopup.vue | 53 +++++++++++++++--- components/PaymentPopup.vue | 28 +++------- pages/cabinet/index.vue | 4 +- pages/index/index.vue | 4 +- pages/mine/index.vue | 55 +++++++++++++++--- pages/shop/index.vue | 4 +- utils/checkPhone.js | 83 ++++++++++++++++++++++------ 8 files changed, 186 insertions(+), 57 deletions(-) diff --git a/api/appUser.js b/api/appUser.js index bd238f3..778ab35 100644 --- a/api/appUser.js +++ b/api/appUser.js @@ -258,6 +258,18 @@ export function modifyUser(user_id, data) { return authRequest({ url: `/api/app/users/${user_id}`, method: 'PUT', data }) } +/** + * 获取用户资料信息(新接口) + * @returns {Promise} 用户资料信息 { id, nickname, avatar, mobile, balance, invite_code, inviter_id } + */ +export function getUserProfile() { + return authRequest({ url: '/api/app/users/profile', method: 'GET' }) +} + +/** + * 获取用户信息(兼容旧接口) + * @deprecated 建议使用 getUserProfile + */ export function getUserInfo() { const user_info = uni.getStorageSync('user_info') if (user_info) return Promise.resolve(user_info) diff --git a/components/GamePassPurchasePopup.vue b/components/GamePassPurchasePopup.vue index 0cb7bd7..8b4ad60 100644 --- a/components/GamePassPurchasePopup.vue +++ b/components/GamePassPurchasePopup.vue @@ -41,7 +41,13 @@ - - {{ counts[pkg.id] || 1 }} + +