From 2286d6b3ad83fd25100aef7d8c849fe1e8e77e24 Mon Sep 17 00:00:00 2001 From: 13405411873 <1994398261@qq.com> Date: Mon, 28 Apr 2025 15:02:08 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BE=AE=E4=BF=A1=E9=80=9A=E7=9F=A5=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/components/notice-item.vue | 7 ++++ pages/mine/mine-index.vue | 1 + pages/notice/detail.vue | 55 ++++++++++++++++++-------------- pages/notice/subscribe-set.vue | 4 +-- 4 files changed, 41 insertions(+), 26 deletions(-) diff --git a/pages/components/notice-item.vue b/pages/components/notice-item.vue index 314bd9d..08bfcb5 100644 --- a/pages/components/notice-item.vue +++ b/pages/components/notice-item.vue @@ -77,6 +77,13 @@ {{dataObj.viewNum}} + + + + + {{dataObj.isPlatformFree==1?'平台结算':''}} + + diff --git a/pages/mine/mine-index.vue b/pages/mine/mine-index.vue index 9cfa320..6fb0ea4 100644 --- a/pages/mine/mine-index.vue +++ b/pages/mine/mine-index.vue @@ -260,6 +260,7 @@ userId: this.userInfo.userId, userType: this.localUserType }).then(res => { + this.userInfo.nickName = res.data.nickName.toString() this.userInfo.tfansNum = res.data.tfansNum.toString() this.userInfo.pointsBalance = res.data.pointsBalance.toString() this.userInfo.report = res.data.report.toString() diff --git a/pages/notice/detail.vue b/pages/notice/detail.vue index 79f739f..fce09b7 100644 --- a/pages/notice/detail.vue +++ b/pages/notice/detail.vue @@ -154,8 +154,8 @@ - - + + @@ -228,7 +228,8 @@ calculateTimeDifference } from '@/utils/common.js' import { - getJSONData + getJSONData, + getToken } from '@/utils/auth.js' import { getNoticeDetail, @@ -458,22 +459,25 @@ * 浏览通告 */ viewNotice() { - let userId = null - if (null != this.userInfo) { - userId = this.userInfo.userId - } - addView({ - noticeId: this.noticeId, - userId: userId - }).then(res => { + if (getToken()) { + let userId = null + if (null != this.userInfo) { + userId = this.userInfo.userId + } + addView({ + noticeId: this.noticeId, + userId: userId + }).then(res => { + + }).catch((e) => { + uni.showToast({ + icon: 'error', + duration: 2000, + title: e + }); + }) + } - }).catch((e) => { - uni.showToast({ - icon: 'error', - duration: 2000, - title: e - }); - }) }, // 回调图片地址 shareSuccess(e) { @@ -591,11 +595,14 @@ * 判断用户类型 */ checkUserType() { - let userType = getUserType() - if (constant.bz != userType) { - //不是博主 - this.ifBz = false + if (getToken()) { + let userType = getUserType() + if (constant.bz != userType) { + //不是博主 + this.ifBz = false + } } + }, /** * 切换当前用户类型为博主 @@ -915,7 +922,7 @@ width: 100%; .report-box { - width: calc(100% - 60rpx); + width: calc(100% - 60rpx); display: flex; justify-content: center; align-items: center; diff --git a/pages/notice/subscribe-set.vue b/pages/notice/subscribe-set.vue index 93eda2c..9962b13 100644 --- a/pages/notice/subscribe-set.vue +++ b/pages/notice/subscribe-set.vue @@ -112,7 +112,7 @@ - 订阅通告主新通告 + 关注的通告主新通告 + \ No newline at end of file