From f8a6995d96e051450bb31e4e290fdb5d19e86aa5 Mon Sep 17 00:00:00 2001 From: 13405411873 <1994398261@qq.com> Date: Thu, 3 Apr 2025 16:07:23 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=A2=E9=98=85=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/mine/mine-index.vue | 37 +++++++++++++++++++++++++++++-------- 1 file changed, 29 insertions(+), 8 deletions(-) diff --git a/pages/mine/mine-index.vue b/pages/mine/mine-index.vue index dc14c93..60499c3 100644 --- a/pages/mine/mine-index.vue +++ b/pages/mine/mine-index.vue @@ -11,14 +11,16 @@ - + + + - 李林 + {{userInfo.nickName||''}} - 1000 + {{userInfo.tfansNum||'0'}} @@ -40,17 +42,17 @@ - 积分140 + 积分{{userInfo.pointsBalance||'0'}} 赚积分{{item.unicode}} - + - 报名140 + 报名{{userInfo.report||'0'}} 去提额{{item.unicode}} - + @@ -132,7 +134,12 @@ formatNumberWithUnits, calculateTimeDifference } from '@/utils/common.js' - + import { + getJSONData + } from '@/utils/auth.js' + import { + bloggerDetail + } from '@/api/member/member.js' export default { components: { tabBarVue, @@ -141,17 +148,31 @@ return { //当前用户类型 nowUserType: null, + userInfo: {} } }, onLoad() { nowUserType = getUserType() }, + mounted() { + if (null != getJSONData(constant.userInfo)) { + this.userInfo = getJSONData(constant.userInfo) + this.getBloggerDetail() + } + }, computed: { windowHeight() { return uni.getSystemInfoSync().windowHeight - 50 } }, methods: { + getBloggerDetail() { + bloggerDetail(this.userInfo.userId).then(res => { + this.userInfo.tfansNum = res.data.tfansNum.toString() + this.userInfo.pointsBalance = res.data.pointsBalance.toString() + this.userInfo.report = res.data.report.toString() + }) + }, /** * 切换用户身份 */