This commit is contained in:
cansnow
2026-01-11 15:48:41 +08:00
parent 2a0677014a
commit e39c06526d
6 changed files with 30 additions and 47 deletions
+6 -4
View File
@@ -185,7 +185,7 @@
this.onUserMessageEvent({type: 'cancelSelect'});
},
async doForwarMsg(userList, groupList, msgiem)
{b
{
//console.log(userList,groupList);
const _this = this;
for (var i = 0; i < userList.length; i++) {
@@ -219,7 +219,7 @@
uni.$u.toast(errMsg);
});
},
onUserMessageEvent(e, data) {
async onUserMessageEvent(e, data) {
const _this = this;
if (e.type == 'select') {
this.selectFlag = true;
@@ -248,8 +248,9 @@
if (e.type == 'deleteMsg' || e.type == 'deleteServerMsg') {
let method = IMSDK.IMMethods.DeleteMessageFromLocalStorage;
if(e.type == 'deleteServerMsg'){
method = IMSDK.IMMethods.DeleteMessage
method = IMSDK.IMMethods.RevokeMessage
}
console.log(method);
let deleteMsgs = [];
if (!data) {
deleteMsgs = [...this.selectItems];
@@ -258,10 +259,11 @@
}
for (let i = 0; i < deleteMsgs.length; i++) {
let element = deleteMsgs[i];
IMSDK.asyncApi(method, IMSDK.uuid(), {
let a = await IMSDK.asyncApi(method, IMSDK.uuid(), {
conversationID: _this.storeCurrentConversation.conversationID,
clientMsgID: element.clientMsgID
});
console.log(a);
}
this.selectItems = [];
this.$refs.chatingListRef.loadMessageList();
@@ -3,7 +3,7 @@
<view class="left_info">
<view class="avatar">
<my-avatar :isGroup="isGroup" :isNotify="isNotify" :src="source.faceURL" :desc="source.showName" size="46" />
<u-badge max="99" :value="source.unreadCount"></u-badge>
<u-badge v-if="source.unreadCount>0" max="99" :value="source.unreadCount"></u-badge>
</view>
<view class="details">
<view class="title">
+19 -35
View File
@@ -1,27 +1,15 @@
<template>
<view class="conversation_container">
<chat-header ref="chatHeaderRef" />
<scroll-view class="scroll-view"
scroll-y="true"
refresher-enabled="true"
: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
:right-options="swipe_actions"
@click="actionClick($event,item)"
v-for="item in storeConversationList"
:key="item.conversationID" >
<conversation-item @longtapEvent="showExtendMenu(item)" :source="item"/>
</uni-swipe-action-item>
</uni-swipe-action>
</scroll-view>
<uni-swipe-action ref="swipe_action">
<uni-swipe-action-item
:right-options="swipe_actions"
@click="actionClick($event,item)"
v-for="item in storeConversationList"
:key="item.conversationID" >
<conversation-item @longtapEvent="showExtendMenu(item)" :source="item"/>
</uni-swipe-action-item>
</uni-swipe-action>
<view class="loading_wrap" v-if="storeProgress > 0 && storeProgress < 100">
<u-loading-icon :vertical="true" :text="storeProgress + '%'"></u-loading-icon>
</view>
@@ -174,32 +162,33 @@
})
},
scroll(e) {
this.old.scrollTop = e.detail.scrollTop;
},
onRefresh() {
if (this.refreshing) return;
console.log('onRefresh');
this.refreshing = true;
this.queryList(true);
},
onRestore() {
this.refreshing = false;
console.log("onRestore");
},
scrolltolower() {
this.queryList();
},
async queryList(isFirstPage = false) {
console.log(1);
await this.$store.dispatch("conversation/getConversationList",isFirstPage);
console.log(2);
uni.stopPullDownRefresh();
this.refreshing = false;
},
closeAllSwipe() {
this.$refs.swipeWrapperRef.closeAll();
},
},
onReachBottom() {
this.scrolltolower();
},
onPullDownRefresh() {
this.queryList(true);
},
onPageScroll(res) {
this.old.scrollTop = res.scrollTop;
}
};
</script>
@@ -225,11 +214,6 @@
overflow-y: auto;
}
.scroll-view {
height: 0;
flex: 1;
}
.loading_wrap {
position: absolute;
top: 50%;