APP热更新
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user