From 707fe99b35c8e090f839d247bea1ad3db06334e8 Mon Sep 17 00:00:00 2001 From: zhouwenxuan <1175765986@qq.com> Date: 星期三, 27 三月 2024 15:06:15 +0800 Subject: [PATCH] 更改地址 --- pages/tabBar/current/current.vue | 17 +++++++++++++++-- 1 files changed, 15 insertions(+), 2 deletions(-) diff --git a/pages/tabBar/current/current.vue b/pages/tabBar/current/current.vue index 24a0a5f..b5f4e8f 100644 --- a/pages/tabBar/current/current.vue +++ b/pages/tabBar/current/current.vue @@ -6,8 +6,11 @@ <view class="statusBar" :style="{ paddingTop: statusBarHeight + 'px' }"></view> <!-- 真正的导航栏内容 --> <view class="navBar"> - <u-icon style=" margin-left: -25px;" name="arrow-left" color="black" size="17" @click="goBack" v-if="role!='工作人员'" /> + <u-icon style=" margin-left: 13px;" name="arrow-left" color="black" size="17" @click="goBack" v-if="role!='工作人员'" /> <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'> @@ -132,6 +135,13 @@ this.getInfoList(); }, methods: { + loginOut() { + uni.clearStorageSync(); + uni.clearStorage(); + uni.navigateTo({ + url: '/pages/index/index' + }) + }, goBack() { uni.switchTab({ url:'/pages/tabBar/firstPage/firstPage' @@ -169,6 +179,8 @@ }, toDetail(item) { item.responsesRate = item.responsesRate.replace(/%/g, '%25'); + uni.setStorageSync('fdetailData', item); + uni.setStorageSync('backFlag','current'); uni.navigateTo({ url: `/pages/tabBar/notice/detail?data=` + encodeURIComponent(JSON.stringify(item)) }) @@ -205,7 +217,7 @@ setTimeout(() => { uni.stopPullDownRefresh(); this.getInfoList(); - }, 1000); + }, 2000); }, clickSwitch(e) { this.data.pageIndex = 1 @@ -263,6 +275,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