From f591c27b57e2418c9495bc02ae8cfff84d35bc18 Mon Sep 17 00:00:00 2001 From: 马宇豪 <978517621@qq.com> Date: 星期二, 16 七月 2024 16:27:56 +0800 Subject: [PATCH] init --- pages/tabBar/response/response.vue | 20 +++++++++++++++++--- 1 files changed, 17 insertions(+), 3 deletions(-) diff --git a/pages/tabBar/response/response.vue b/pages/tabBar/response/response.vue index 7d70cf9..35d8554 100644 --- a/pages/tabBar/response/response.vue +++ b/pages/tabBar/response/response.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'> @@ -70,8 +73,17 @@ uni.hideTabBar(); }, methods: { + loginOut() { + uni.clearStorageSync(); + uni.clearStorage(); + uni.navigateTo({ + url: '/pages/index/index' + }) + }, getResponseList() { this.loading = true + + getResponse(this.data).then(res => { if (res.code === 100) { let list = res.data ? res.data : []; @@ -100,6 +112,8 @@ getDetail({id: item.id}).then(res => { console.log("response",res) if(res.code == 100) { + uni.setStorageSync('fdetailData', res.data); + uni.setStorageSync('backFlag','response'); uni.navigateTo({ url: `/pages/tabBar/notice/detail?data=` + encodeURIComponent(JSON.stringify(res.data)) }) @@ -112,7 +126,7 @@ setTimeout(() => { uni.stopPullDownRefresh(); this.getResponseList(); - }, 1000); + }, 2000); }, upper: function(e) { @@ -120,7 +134,7 @@ }, lower: function(e) { if (this.data.pageIndex * this.data.pageSize >= this.total){ - uni.$u.toast('已加载全部数据') + // uni.$u.toast('已加载全部数据') return } //并且让页码+1,调用获取数据的方法获取第二页数据 @@ -146,7 +160,7 @@ box-shadow: 0 3px 12px rgba(0,0,0,0.05); } .barText{ - /* margin-left: 20px; */ + margin-left: 55px; text-align: center; width: 85%; font-size: 16px; -- Gitblit v1.9.2