APP热更新

This commit is contained in:
cansnow
2026-01-11 13:51:16 +08:00
parent 941464c330
commit c38846f13b
16 changed files with 995 additions and 197 deletions
+21 -20
View File
@@ -4,12 +4,13 @@
<scroll-view class="scroll-view"
scroll-y="true"
refresher-enabled="true"
:refresher-triggered="triggered"
:refresher-triggered="refreshing"
:scroll-top="scrollTop"
:scroll-with-animation="true"
@scroll="scroll"
@refresherrefresh="onRefresh"
@refresherrestore="onRestore"
@refresherabort="onRestore"
@scrolltolower="scrolltolower">
<uni-swipe-action ref="swipe_action">
<uni-swipe-action-item
@@ -66,7 +67,6 @@
}
}
],
triggered: false,
refreshing: false,
};
},
@@ -80,17 +80,18 @@
},
onLoad() {
//console.log(this.storeConversationList);
this._freshing = false;
this.triggered = true;
setTimeout(()=>{
// uni.switchTab({
// url:"/pages/user/index/index"
// })
// uni.navigateTo({
// url:"/pages/user/vip/vip"
// });
prepareConversationState(this.storeConversationList[0]);
},1000)
this.freshing = false;
if(process.env.NODE_ENV == 'development'){
// setTimeout(()=>{
// // uni.switchTab({
// // url:"/pages/user/index/index"
// // })
// // uni.navigateTo({
// // url:"/pages/user/vip/vip"
// // });
// //prepareConversationState(this.storeConversationList[1]);
// },1000)
}
},
methods: {
test(){
@@ -177,23 +178,23 @@
this.old.scrollTop = e.detail.scrollTop;
},
onRefresh() {
if (this._freshing) return;
this._freshing = true;
if (this.refreshing) return;
console.log('onRefresh');
this.refreshing = true;
this.queryList(true);
},
onRestore() {
this.triggered = "restore";
this.refreshing = false;
console.log("onRestore");
},
scrolltolower() {
this.queryList();
},
async queryList(isFirstPage = false) {
//console.log(1);
console.log(1);
await this.$store.dispatch("conversation/getConversationList",isFirstPage);
//console.log(2);
this.triggered = false;
this._freshing = false;
console.log(2);
this.refreshing = false;
},
closeAllSwipe() {
this.$refs.swipeWrapperRef.closeAll();