21
This commit is contained in:
+2
-2
@@ -2,8 +2,8 @@
|
|||||||
"name" : "瞬聊",
|
"name" : "瞬聊",
|
||||||
"appid" : "__UNI__E41111F",
|
"appid" : "__UNI__E41111F",
|
||||||
"description" : "一款即时聊天软件",
|
"description" : "一款即时聊天软件",
|
||||||
"versionName" : "3.3.6",
|
"versionName" : "3.3.7",
|
||||||
"versionCode" : 336,
|
"versionCode" : 337,
|
||||||
"transformPx" : false,
|
"transformPx" : false,
|
||||||
"app-plus" : {
|
"app-plus" : {
|
||||||
"bounce" : "none",
|
"bounce" : "none",
|
||||||
|
|||||||
+1
-5
@@ -35,11 +35,7 @@
|
|||||||
"path": "pages/conversation/conversationList/index",
|
"path": "pages/conversation/conversationList/index",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "",
|
"navigationBarTitleText": "",
|
||||||
"enablePullDownRefresh": false,
|
"enablePullDownRefresh": true
|
||||||
"disableScroll": true,
|
|
||||||
"app-plus": {
|
|
||||||
"bounce": "none"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -185,7 +185,7 @@
|
|||||||
this.onUserMessageEvent({type: 'cancelSelect'});
|
this.onUserMessageEvent({type: 'cancelSelect'});
|
||||||
},
|
},
|
||||||
async doForwarMsg(userList, groupList, msgiem)
|
async doForwarMsg(userList, groupList, msgiem)
|
||||||
{b
|
{
|
||||||
//console.log(userList,groupList);
|
//console.log(userList,groupList);
|
||||||
const _this = this;
|
const _this = this;
|
||||||
for (var i = 0; i < userList.length; i++) {
|
for (var i = 0; i < userList.length; i++) {
|
||||||
@@ -219,7 +219,7 @@
|
|||||||
uni.$u.toast(errMsg);
|
uni.$u.toast(errMsg);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
onUserMessageEvent(e, data) {
|
async onUserMessageEvent(e, data) {
|
||||||
const _this = this;
|
const _this = this;
|
||||||
if (e.type == 'select') {
|
if (e.type == 'select') {
|
||||||
this.selectFlag = true;
|
this.selectFlag = true;
|
||||||
@@ -248,8 +248,9 @@
|
|||||||
if (e.type == 'deleteMsg' || e.type == 'deleteServerMsg') {
|
if (e.type == 'deleteMsg' || e.type == 'deleteServerMsg') {
|
||||||
let method = IMSDK.IMMethods.DeleteMessageFromLocalStorage;
|
let method = IMSDK.IMMethods.DeleteMessageFromLocalStorage;
|
||||||
if(e.type == 'deleteServerMsg'){
|
if(e.type == 'deleteServerMsg'){
|
||||||
method = IMSDK.IMMethods.DeleteMessage
|
method = IMSDK.IMMethods.RevokeMessage
|
||||||
}
|
}
|
||||||
|
console.log(method);
|
||||||
let deleteMsgs = [];
|
let deleteMsgs = [];
|
||||||
if (!data) {
|
if (!data) {
|
||||||
deleteMsgs = [...this.selectItems];
|
deleteMsgs = [...this.selectItems];
|
||||||
@@ -258,10 +259,11 @@
|
|||||||
}
|
}
|
||||||
for (let i = 0; i < deleteMsgs.length; i++) {
|
for (let i = 0; i < deleteMsgs.length; i++) {
|
||||||
let element = deleteMsgs[i];
|
let element = deleteMsgs[i];
|
||||||
IMSDK.asyncApi(method, IMSDK.uuid(), {
|
let a = await IMSDK.asyncApi(method, IMSDK.uuid(), {
|
||||||
conversationID: _this.storeCurrentConversation.conversationID,
|
conversationID: _this.storeCurrentConversation.conversationID,
|
||||||
clientMsgID: element.clientMsgID
|
clientMsgID: element.clientMsgID
|
||||||
});
|
});
|
||||||
|
console.log(a);
|
||||||
}
|
}
|
||||||
this.selectItems = [];
|
this.selectItems = [];
|
||||||
this.$refs.chatingListRef.loadMessageList();
|
this.$refs.chatingListRef.loadMessageList();
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<view class="left_info">
|
<view class="left_info">
|
||||||
<view class="avatar">
|
<view class="avatar">
|
||||||
<my-avatar :isGroup="isGroup" :isNotify="isNotify" :src="source.faceURL" :desc="source.showName" size="46" />
|
<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>
|
||||||
<view class="details">
|
<view class="details">
|
||||||
<view class="title">
|
<view class="title">
|
||||||
|
|||||||
@@ -1,27 +1,15 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="conversation_container">
|
<view class="conversation_container">
|
||||||
<chat-header ref="chatHeaderRef" />
|
<chat-header ref="chatHeaderRef" />
|
||||||
<scroll-view class="scroll-view"
|
<uni-swipe-action ref="swipe_action">
|
||||||
scroll-y="true"
|
<uni-swipe-action-item
|
||||||
refresher-enabled="true"
|
:right-options="swipe_actions"
|
||||||
:refresher-triggered="refreshing"
|
@click="actionClick($event,item)"
|
||||||
:scroll-top="scrollTop"
|
v-for="item in storeConversationList"
|
||||||
:scroll-with-animation="true"
|
:key="item.conversationID" >
|
||||||
@scroll="scroll"
|
<conversation-item @longtapEvent="showExtendMenu(item)" :source="item"/>
|
||||||
@refresherrefresh="onRefresh"
|
</uni-swipe-action-item>
|
||||||
@refresherrestore="onRestore"
|
</uni-swipe-action>
|
||||||
@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>
|
|
||||||
<view class="loading_wrap" v-if="storeProgress > 0 && storeProgress < 100">
|
<view class="loading_wrap" v-if="storeProgress > 0 && storeProgress < 100">
|
||||||
<u-loading-icon :vertical="true" :text="storeProgress + '%'"></u-loading-icon>
|
<u-loading-icon :vertical="true" :text="storeProgress + '%'"></u-loading-icon>
|
||||||
</view>
|
</view>
|
||||||
@@ -174,32 +162,33 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
scroll(e) {
|
|
||||||
this.old.scrollTop = e.detail.scrollTop;
|
|
||||||
},
|
|
||||||
onRefresh() {
|
onRefresh() {
|
||||||
if (this.refreshing) return;
|
if (this.refreshing) return;
|
||||||
console.log('onRefresh');
|
console.log('onRefresh');
|
||||||
this.refreshing = true;
|
this.refreshing = true;
|
||||||
this.queryList(true);
|
this.queryList(true);
|
||||||
},
|
},
|
||||||
onRestore() {
|
|
||||||
this.refreshing = false;
|
|
||||||
console.log("onRestore");
|
|
||||||
},
|
|
||||||
scrolltolower() {
|
scrolltolower() {
|
||||||
this.queryList();
|
this.queryList();
|
||||||
},
|
},
|
||||||
async queryList(isFirstPage = false) {
|
async queryList(isFirstPage = false) {
|
||||||
console.log(1);
|
|
||||||
await this.$store.dispatch("conversation/getConversationList",isFirstPage);
|
await this.$store.dispatch("conversation/getConversationList",isFirstPage);
|
||||||
console.log(2);
|
uni.stopPullDownRefresh();
|
||||||
this.refreshing = false;
|
this.refreshing = false;
|
||||||
},
|
},
|
||||||
closeAllSwipe() {
|
closeAllSwipe() {
|
||||||
this.$refs.swipeWrapperRef.closeAll();
|
this.$refs.swipeWrapperRef.closeAll();
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
onReachBottom() {
|
||||||
|
this.scrolltolower();
|
||||||
|
},
|
||||||
|
onPullDownRefresh() {
|
||||||
|
this.queryList(true);
|
||||||
|
},
|
||||||
|
onPageScroll(res) {
|
||||||
|
this.old.scrollTop = res.scrollTop;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -225,11 +214,6 @@
|
|||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.scroll-view {
|
|
||||||
height: 0;
|
|
||||||
flex: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
.loading_wrap {
|
.loading_wrap {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 50%;
|
top: 50%;
|
||||||
|
|||||||
@@ -56,6 +56,7 @@ const actions = {
|
|||||||
count: 500,
|
count: 500,
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
console.log(data);
|
||||||
commit("SET_CONVERSATION_LIST", [
|
commit("SET_CONVERSATION_LIST", [
|
||||||
...(isFirstPage ? [] : state.conversationList),
|
...(isFirstPage ? [] : state.conversationList),
|
||||||
...data,
|
...data,
|
||||||
|
|||||||
Reference in New Issue
Block a user