From 756c10539998ad10860956338767286329debf3d Mon Sep 17 00:00:00 2001 From: WindowBird <13870814+windows-bird@user.noreply.gitee.com> Date: Fri, 22 Aug 2025 14:56:20 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=AA=E4=BA=BA=E4=B8=AD=E5=BF=83=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2-=E6=A0=B9=E6=8D=AEisAgent=E6=B8=B2=E6=9F=93=E4=B8=8D?= =?UTF-8?q?=E5=90=8C=E7=95=8C=E9=9D=A2=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/profile/profile.vue | 40 +++++++++------------------------------ 1 file changed, 9 insertions(+), 31 deletions(-) diff --git a/pages/profile/profile.vue b/pages/profile/profile.vue index 2f83b3c..98cbb0a 100644 --- a/pages/profile/profile.vue +++ b/pages/profile/profile.vue @@ -24,14 +24,15 @@ - + + {{ userInfo.nickName || '昵称' }} - {{ formatPhone(userInfo.phonenumber) || '123****8912' }} + @@ -39,7 +40,7 @@ - + {{ financialData.balance || '0.00' }} @@ -70,7 +71,7 @@ - + 我的用户 @@ -88,7 +89,7 @@ {{ userStats.rentAmount || 0 }} - 租赁数量(个) + 租赁金额(元) @@ -99,7 +100,7 @@ 其他功能 - + @@ -109,7 +110,7 @@ - 代理权益 + 我的订单 @@ -138,7 +139,7 @@ export default { commonEnum, userInfo: { nickName: '昵称', - phonenumber: '123****8912', + avatar: '', userId: '', }, @@ -196,7 +197,6 @@ export default { console.log('用户头像:', this.userInfo.avatar) } else { console.log('用户信息获取失败,使用默认值') - console.log('当前用户信息:', this.userInfo) } // 处理财务数据 @@ -264,30 +264,9 @@ export default { } catch (error) { console.error('获取代理统计失败:', error) // 如果获取失败,使用默认数据 - return { - code: 200, - data: { - userNum: 0, - deviceNum: 0, - rentAmount: 0, - }, - } } }, - // 格式化手机号 - formatPhone(phone) { - if (!phone) return '123****8912' - if (phone.length === 11) { - return phone.replace(/(\d{3})\d{4}(\d{4})/, '$1****$2') - } - return phone - }, - - gotoPage(url) { - uni.navigateTo({ url }) - }, - // 跳转到设置页面,传递用户信息 goToSettings() { console.log('准备跳转到设置页面,当前用户信息:', this.userInfo) @@ -298,7 +277,6 @@ export default { nickName: this.userInfo.nickName || this.userInfo.nickname || '昵称', avatar: this.userInfo.avatar || '', userId: this.userInfo.userId || '', - phonenumber: this.userInfo.phonenumber || '', } uni.setStorageSync('userInfo', userInfoToStore)