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 }} + +