APP热更新
This commit is contained in:
@@ -119,8 +119,8 @@
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
console.log(this.storeCurrentGroup)
|
||||
console.log(this.storeCurrentMemberInGroup)
|
||||
//console.log(this.storeCurrentGroup)
|
||||
//console.log(this.storeCurrentMemberInGroup)
|
||||
this.setKeyboardListener();
|
||||
},
|
||||
beforeDestroy() {
|
||||
|
||||
@@ -117,14 +117,14 @@
|
||||
methods: {
|
||||
async init(){
|
||||
const self = this;
|
||||
//console.log(this.message?.videoElem);
|
||||
console.log(this.message?.videoElem,this.conversationID);
|
||||
const snapshotUrl = this.message?.videoElem?.snapshotUrl;
|
||||
self.coverDownloading = true;
|
||||
//console.log(snapshotUrl);
|
||||
util.cacheFile(snapshotUrl,`${this.conversationID}`).then((fn)=>{
|
||||
self.coverDownloading = false;
|
||||
self.src = fn;
|
||||
console.log(fn);
|
||||
//console.log(fn);
|
||||
});
|
||||
},
|
||||
clickMediaItem() {
|
||||
@@ -138,20 +138,22 @@
|
||||
this.loadingWidth = "auto";
|
||||
},
|
||||
onOverlayClick() {
|
||||
const _this = this;
|
||||
// 点击覆盖层:如果视频已缓存则直接播放,否则开始下载
|
||||
const url = this.message?.videoElem?.videoUrl || this.message?.videoElem?.videoPath;
|
||||
const url = _this.message?.videoElem?.videoUrl;
|
||||
if (!url) {
|
||||
uni.showToast({ title: '无可下载的视频' });
|
||||
return;
|
||||
}
|
||||
this.videoDownloading = true;
|
||||
this.videoDownloadProgress = 0;
|
||||
util.downloadFile(url, `${this.conversationID}`, (prog) => {
|
||||
//this.videoDownloadProgress = prog;
|
||||
_this.videoDownloading = true;
|
||||
_this.videoDownloadProgress = 0;
|
||||
util.cacheFile(url, `${_this.conversationID}`, (prog) => {
|
||||
//console.log(prog);
|
||||
this.videoDownloadProgress = prog;
|
||||
}).then((fn) => {
|
||||
this.videoDownloading = false;
|
||||
this.videoExists = true;
|
||||
this.playVideo(fn);
|
||||
_this.videoDownloading = false;
|
||||
_this.videoExists = true;
|
||||
_this.playVideo(fn);
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
import SelectFooter from "./components/SelectFooter";
|
||||
import {markConversationAsRead} from "@/util/imCommon";
|
||||
import IMSDK, {MessageType,GroupMemberRole} from "openim-uniapp-polyfill";
|
||||
import util from "@/util/index.js"
|
||||
export default {
|
||||
components: {
|
||||
ChatingHeader,
|
||||
@@ -110,7 +111,7 @@
|
||||
return item.serverMsgID != data.serverMsgID;
|
||||
})
|
||||
this.$store.commit('message/SET_HISTORY_MESSAGE_LIST',list);
|
||||
})
|
||||
});
|
||||
},
|
||||
onUnload() {
|
||||
IMSDK.unsubscribe(IMSDK.IMEvents.OnMsgDeleted);
|
||||
|
||||
@@ -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