From 86bb6d7a965e2adb292f695c2eedd219bda53389 Mon Sep 17 00:00:00 2001 From: "3321822538@qq.com" <3321822538@qq.com> Date: Tue, 11 Jun 2024 18:02:33 +0800 Subject: [PATCH] aaa --- pages/fengxiang/index.vue | 42 +++++++++++++++++++-------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/pages/fengxiang/index.vue b/pages/fengxiang/index.vue index b49d072..b54b642 100644 --- a/pages/fengxiang/index.vue +++ b/pages/fengxiang/index.vue @@ -38,7 +38,6 @@ - {{item.name}} @@ -240,7 +239,10 @@ 关闭分享 - + + + + @@ -292,7 +294,8 @@ disabledflag: false, tokenflag: false, total:0, - showflag:false + showflag:false, + masks:false }; }, onShow() { @@ -757,9 +760,9 @@ }, // 发请求拿数据 async pageData(page, apiary_id, qrcode) { - uni.showLoading({ - title: '加载中...', - }) + // uni.showLoading({ + // title: '加载中...', + // }) await request.get('/api/beehive/index?page=' + this.page, { params: { page, @@ -767,9 +770,9 @@ qrcode } }).then(res => { + this.masks = false uni.hideLoading() wx.setStorageSync('user_id', res.data.data[0].user_id); - // this.listData = JSON.parse(JSON.stringify(res.data.data)) this.total = res.data.total if (res.data.data.length > 0) { // 有数据,追加到列表 @@ -777,10 +780,6 @@ this.page++ // uni.hideLoading() } - // wx.pageScrollTo({ - // scrollTop: 0, - // duration: 300 - // }); // 停止下拉刷新状态 wx.stopPullDownRefresh(); // this.$forceUpdate() @@ -827,25 +826,26 @@ }) }, clicktabs(event) { - // this.currentindex= - console.log('调用了', event); - console.log('调用了', this.tabitems); + uni.showLoading({ + title: '加载中', + mask: true + }) this.page = 1 this.listData = [] + this.masks = true if (event.index = 0) { this.checkid = '' this.currentindex = 0 + } else { this.checkid = event.id const index = this.tabitems.findIndex(item => item.id === this.checkid); - - // 将索引赋值给this.currentindex - this.currentindex = index; - console.log(this.currentindex, 'this.currentindex this.currentindex '); - // this.currentindex=0 + this.currentindex = index + } - this.refresh() - // this.pageData('', event.id) + setTimeout(()=>{ + this.refresh() + },1000) }, }, };