From 277d6652893fcc10fb6827b62ef16fe2910a525c Mon Sep 17 00:00:00 2001 From: zhouwenxuan <1175765986@qq.com> Date: 星期五, 15 十二月 2023 16:58:25 +0800 Subject: [PATCH] 强制更新功能 --- pages/tabBar/information/information.vue | 15 ++++++++++++++- 1 files changed, 14 insertions(+), 1 deletions(-) diff --git a/pages/tabBar/information/information.vue b/pages/tabBar/information/information.vue index 4a132b5..484ccfb 100644 --- a/pages/tabBar/information/information.vue +++ b/pages/tabBar/information/information.vue @@ -7,6 +7,9 @@ <!-- 真正的导航栏内容 --> <view class="navBar" > <view class="barText">信息发布</view> + <view > + <u-button type="text" @click="loginOut" style="color: #1890ff;margin-right: 5px;width: 65px;">退出</u-button> + </view> </view> </view> <div v-if="loading" style='display: flex;justify-content: center;position: absolute;width:100%;top: 40%;left: 0'> @@ -94,6 +97,13 @@ this.getInformationList(); }, methods: { + loginOut() { + uni.clearStorageSync(); + uni.clearStorage(); + uni.navigateTo({ + url: '/pages/index/index' + }) + }, getInformationList() { this.loading = true this.data.searchParams.reviewStatus = this.isReadOnly ? 2 : null; @@ -127,6 +137,8 @@ }, toDetail(item) { console.log("item",item) + uni.setStorageSync('fdetailData', item); + uni.setStorageSync('backFlag','info'); uni.navigateTo({ url: `/pages/tabBar/notice/detail?data=` + encodeURIComponent(JSON.stringify(item)) }) @@ -136,7 +148,7 @@ setTimeout(() => { uni.stopPullDownRefresh(); this.getInformationList(); - }, 1000); + }, 2000); }, @@ -190,6 +202,7 @@ box-shadow: 0 3px 12px rgba(0,0,0,0.05); } .barText{ + margin-left: 55px; text-align: center; width: 85%; font-size: 16px; -- Gitblit v1.9.2