Compare commits

..

No commits in common. "9e8e3aeba30866810eb387a7d2f5ea9e9c2f93a1" and "1f64ffd8aa5ec9a0177543db3c722e34275510ab" have entirely different histories.

12 changed files with 225 additions and 372 deletions

2
components.d.ts vendored
View File

@ -30,8 +30,6 @@ declare module 'vue' {
LoginMessage: typeof import('./src/components/talk/message/LoginMessage.vue')['default'] LoginMessage: typeof import('./src/components/talk/message/LoginMessage.vue')['default']
Message: typeof import('./src/components/x-message/message/index.vue')['default'] Message: typeof import('./src/components/x-message/message/index.vue')['default']
MixedMessage: typeof import('./src/components/talk/message/MixedMessage.vue')['default'] MixedMessage: typeof import('./src/components/talk/message/MixedMessage.vue')['default']
NButton: typeof import('naive-ui')['NButton']
NIcon: typeof import('naive-ui')['NIcon']
PageAnimation: typeof import('./src/components/page-animation/index.vue')['default'] PageAnimation: typeof import('./src/components/page-animation/index.vue')['default']
RevokeMessage: typeof import('./src/components/talk/message/RevokeMessage.vue')['default'] RevokeMessage: typeof import('./src/components/talk/message/RevokeMessage.vue')['default']
RouterLink: typeof import('vue-router')['RouterLink'] RouterLink: typeof import('vue-router')['RouterLink']

View File

@ -14,7 +14,6 @@ import { vLoading } from '@/components/x-loading/index.js'
import messagePopup from '@/components/x-message/useMessagePopup' import messagePopup from '@/components/x-message/useMessagePopup'
import pageAnimation from '@/components/page-animation/index.vue' import pageAnimation from '@/components/page-animation/index.vue'
import * as plugins from './plugins' import * as plugins from './plugins'
import { useDialogueStore, useTalkStore } from '@/store'
const { showMessage } = messagePopup() const { showMessage } = messagePopup()
dayjs.locale('zh-cn') dayjs.locale('zh-cn')
if (import.meta.env.VITE_SHOW_CONSOLE === 'true') { if (import.meta.env.VITE_SHOW_CONSOLE === 'true') {
@ -41,41 +40,6 @@ export function createApp() {
}) })
}, },
}) })
//获取当前聊天页面所在页面并通过当前的receiver_id判断是否要创建本地通知栏消息
window.getCurrentChatRoute = (msg) => {
let pushMsg = JSON.parse(decodeURIComponent(msg))
//当前所在聊天会话的receiver_id
const receiver_id = pushMsg?.payload?.receiver_id
// 获取当前页面路径
const pages = getCurrentPages()
const page = pages[pages.length - 1]
console.log(page.route)
const dialogueStore = useDialogueStore()
console.log(dialogueStore?.talk?.receiver_id)
if (
page?.route === 'pages/dialog/index' &&
receiver_id === dialogueStore?.talk?.receiver_id
) {
return
}
let OAWebView = plus.webview.all()
//all里面第一个是入口webview
OAWebView[0].evalJS(`doCreatePushMessage('${msg}')`)
}
//处理聊天推送弹窗点开
window.openUniPushMsg = (msg) => {
console.log("=====点击通知栏消息")
let pushMsg = JSON.parse(decodeURIComponent(msg))
console.log("=====pushMsg",pushMsg)
//由于弹窗前处理了不该弹窗的场景,因此这里弹窗可以一并处理
//也就是都跳转到聊天页面
const talkStore = useTalkStore()
talkStore.toTalk(pushMsg?.payload?.talk_type, pushMsg?.payload?.receiver_id)
}
window.message = ['success', 'error', 'warning'].reduce((acc, type) => { window.message = ['success', 'error', 'warning'].reduce((acc, type) => {
acc[type] = (message) => { acc[type] = (message) => {
if (typeof message === 'string') { if (typeof message === 'string') {

View File

@ -381,7 +381,7 @@ const handleClickItem = (item) => {
} }
if(props?.manageType === 'searchRecord'){ if(props?.manageType === 'searchRecord'){
uni.navigateTo({ uni.navigateTo({
url: '/pages/search/searchByCondition/index?condition=member&groupMemberId=' + item.id url: '/pages/search/searchByCondition/index?condition=member'
}) })
return return
} }

View File

@ -504,7 +504,8 @@ const toSearchByConditionPage = (flag) => {
condition = 'link' condition = 'link'
} }
uni.navigateTo({ uni.navigateTo({
url: '/pages/search/searchByCondition/index?condition=' + condition, url:
'/pages/search/searchByCondition/index?condition=' + condition
}) })
} }
} }
@ -643,8 +644,7 @@ const toSearchPage = () => {
'/pages/search/moreResult/moreResultDetail?talk_type=' + '/pages/search/moreResult/moreResultDetail?talk_type=' +
dialogueParams.type + dialogueParams.type +
'&receiver_id=' + '&receiver_id=' +
dialogueParams.receiver_id + dialogueParams.receiver_id,
'&hideFirstRecord=1',
}) })
} }
</script> </script>

View File

@ -561,18 +561,13 @@ const state = ref({
useCustomLoadMore: false, //使 useCustomLoadMore: false, //使
recordDate: "", // recordDate: "", //
serveFindRecord: [], // serveFindRecord: [], //
middleMsg: {}, //使 });
keepDialogInfo: false, //
})
uniOnload(async (options) => { uniOnload(async (options) => {
console.log('onLoad' + JSON.stringify(options)) console.log("onLoad" + options);
if (options.sessionId) { if (options.sessionId) {
state.value.sessionId = options.sessionId; state.value.sessionId = options.sessionId;
} }
if (options.keepDialogInfo) {
state.value.keepDialogInfo = options.keepDialogInfo === '1' ? true : false
}
if (options.msgInfo) { if (options.msgInfo) {
const msgInfo = JSON.parse(decodeURIComponent(options.msgInfo)); const msgInfo = JSON.parse(decodeURIComponent(options.msgInfo));
queryRecordsByMsgInfo(msgInfo); queryRecordsByMsgInfo(msgInfo);
@ -975,11 +970,11 @@ const withdrawerConfirm = () => {
// //
const canEditRevokedMessage = (item) => { const canEditRevokedMessage = (item) => {
// console.log(item) console.log(item);
if (item.is_revoke === 1 && item.msg_type === 1) { if (item.is_revoke === 1 && item.msg_type === 1) {
const now = new Date().getTime() const now = new Date().getTime();
const revokeTime = new Date(item.created_at).getTime() const revokeTime = new Date(item.created_at).getTime();
// console.log(now) console.log(now);
// 5 // 5
return now - revokeTime <= 5 * 60 * 1000; return now - revokeTime <= 5 * 60 * 1000;
} }
@ -1100,17 +1095,14 @@ watch(
state.value.localPageLoadDone = true; state.value.localPageLoadDone = true;
return; return;
} }
//
if (!state.value.useCustomLoadMore) {
if ( if (
newValue[newValue.length - 1]?.sequence === newValue[newValue.length - 1]?.sequence ===
dialogueList?.records?.[0]?.sequence dialogueList?.records?.[0]?.sequence
) { ) {
// //
state.value.localPageLoadDone = true state.value.localPageLoadDone = true;
} else { } else {
state.value.localPageLoadDone = false state.value.localPageLoadDone = false;
}
} }
} }
}, },
@ -1138,13 +1130,7 @@ const onScrollToLower = async () => {
); );
console.log(moreRecords); console.log(moreRecords);
// virtualList.value = moreRecords.concat(tempVirtualList).reverse();
const formattedMoreRecords = moreRecords.map((item) => ({
...item,
float: item.user_id === talkParams.uid ? 'right' : 'left',
}))
virtualList.value = formattedMoreRecords.concat(tempVirtualList).reverse()
console.log(virtualList.value); console.log(virtualList.value);
} else { } else {
@ -1188,19 +1174,12 @@ const onScrollToUpper = async () => {
const moreRecords = await findTalkRecords( const moreRecords = await findTalkRecords(
"", "",
false, false,
tempVirtualList[tempVirtualList.length - 1].sequence, tempVirtualList[tempVirtualList.length - 1].sequence
) );
console.log(moreRecords) console.log(moreRecords);
//
const formattedMoreRecords = moreRecords.map((item) => ({
...item,
float: item.user_id === talkParams.uid ? 'right' : 'left',
}))
virtualList.value = tempVirtualList virtualList.value = tempVirtualList
.concat(formattedMoreRecords.reverse()) .concat(moreRecords.reverse())
.reverse() .reverse();
console.log(virtualList.value); console.log(virtualList.value);
@ -1328,9 +1307,8 @@ const getMentionSelectLists = (mentionSelectList) => {
//msgsequence //msgsequence
const queryRecordsByMsgInfo = async (msgInfo) => { const queryRecordsByMsgInfo = async (msgInfo) => {
console.log(msgInfo) console.log(msgInfo);
state.value.middleMsg = msgInfo const dialogueList = getDialogueList(talkParams.index_name);
const dialogueList = getDialogueList(talkParams.index_name)
const recordIndex = dialogueList?.records?.findIndex( const recordIndex = dialogueList?.records?.findIndex(
(record) => record.msg_id === msgInfo.msg_id (record) => record.msg_id === msgInfo.msg_id
); );
@ -1346,15 +1324,6 @@ const queryRecordsByMsgInfo = async (msgInfo) => {
// console.log(recordIndex-startRecordIndex) // console.log(recordIndex-startRecordIndex)
recordsList = dialogueList.records.slice(startRecordIndex, endRecordIndex); recordsList = dialogueList.records.slice(startRecordIndex, endRecordIndex);
} }
// float
recordsList = recordsList.map((item) => {
return {
...item,
float: item.user_id === talkParams.uid ? 'right' : 'left',
}
})
nextTick(() => { nextTick(() => {
zpagingRef.value.complete(recordsList.reverse()); zpagingRef.value.complete(recordsList.reverse());
loadConfig.status = dialogueList?.records?.[0]?.sequence > 1 ? 1 : 2; loadConfig.status = dialogueList?.records?.[0]?.sequence > 1 ? 1 : 2;
@ -1405,9 +1374,8 @@ const findTalkRecords = (record, isMiddle, sequence, appointParams) => {
start_time: "", start_time: "",
end_time: "", end_time: "",
group_member_user_id: 0, //id group_member_user_id: 0, //id
sort_sequence: 'asc', sort_sequence: "asc",
create_time: state.value.middleMsg.created_at, };
}
if (record) { if (record) {
params = Object.assign({}, params, { params = Object.assign({}, params, {
start_time: record, start_time: record,
@ -1505,8 +1473,8 @@ const rpxToPx = (rpx) => {
}; };
onUnmounted(() => { onUnmounted(() => {
if (!state.value.keepDialogInfo) { if (!state.value.recordDate) {
dialogueStore.setDialogue({}) dialogueStore.setDialogue({});
} }
clearMultiSelect(); clearMultiSelect();
}); });

View File

@ -8,11 +8,7 @@
<div class="avatarImg"> <div class="avatarImg">
<tm-badge <tm-badge
:count="props.data.is_disturb === 1 ? props.data.unread_num : ''" :count="props.data.is_disturb === 1 ? props.data.unread_num : ''"
:dot=" :dot="props.data.is_disturb === 0 && props.data.unread_num"
props.data.is_disturb === 0 && props.data.unread_num
? true
: false
"
:maxCount="99" :maxCount="99"
class="badge" class="badge"
color="#D03050" color="#D03050"
@ -38,13 +34,10 @@
<div class="chatInfo"> <div class="chatInfo">
<div class="chatInfo_1"> <div class="chatInfo_1">
<div class="name_center"> <div class="name_center">
<div <div class="text-[#000000] text-[32rpx]
class="text-[#000000] text-[32rpx] font-bold opacity-90 name_text" font-bold opacity-90 name_text">
>
{{ formatNameText(props.data.name) }} {{ formatNameText(props.data.name) }}
<span v-if="props.data.talk_type === 2"> <span v-if="props.data.talk_type === 2">{{props.data.group_member_num}}</span>
{{ props.data.group_member_num }}
</span>
<span v-if="props.data.group_type === 2" class="depTag tag"> <span v-if="props.data.group_type === 2" class="depTag tag">
部门 部门
</span> </span>
@ -55,9 +48,9 @@
公司 公司
</span> </span>
</div> </div>
</div> </div>
<div <div style="flex-shrink: 0;"
style="flex-shrink: 0;"
class="text-[#000000] text-[28rpx] font-medium opacity-26 ml-[24rpx] time_right" class="text-[#000000] text-[28rpx] font-medium opacity-26 ml-[24rpx] time_right"
> >
{{ beautifyTime(props.data.updated_at) }} {{ beautifyTime(props.data.updated_at) }}
@ -73,12 +66,12 @@
<template #right> <template #right>
<div class="flex flex-row flex-row-center-end"> <div class="flex flex-row flex-row-center-end">
<!-- 样式占位 --> <!-- 样式占位 -->
<div style="width: 1px;"></div> <div style="width: 1px"></div>
<div <div
@click="handleTop" @click="handleTop"
class="w-[156rpx] h-[154rpx] text-[#ffffff] bg-[#F09F1F] flex items-center justify-center" class="w-[156rpx] h-[154rpx] text-[#ffffff] bg-[#F09F1F] flex items-center justify-center"
> >
{{ props.data.is_top === 1 ? '取消置顶' : '置顶' }} {{ props.data.is_top === 1 ? "取消置顶" : "置顶" }}
</div> </div>
<div <div
@click="handleDelete" @click="handleDelete"
@ -96,17 +89,17 @@
</div> </div>
</template> </template>
<script setup> <script setup>
import avatarModule from '@/components/avatar-module/index.vue' import avatarModule from "@/components/avatar-module/index.vue";
import { ref, reactive, defineProps, computed } from 'vue' import { ref, reactive, defineProps, computed } from "vue";
import dayjs from 'dayjs' import dayjs from "dayjs";
import { beautifyTime } from '@/utils/datetime' import { beautifyTime } from "@/utils/datetime";
import { ServeClearTalkUnreadNum } from '@/api/chat' import { ServeClearTalkUnreadNum } from "@/api/chat";
import { useTalkStore, useDialogueStore } from '@/store' import { useTalkStore, useDialogueStore } from "@/store";
import { useSessionMenu } from '@/hooks' import { useSessionMenu } from "@/hooks";
const talkStore = useTalkStore() const talkStore = useTalkStore();
const { onToTopTalk, onRemoveTalk } = useSessionMenu() const { onToTopTalk, onRemoveTalk } = useSessionMenu();
const dialogueStore = useDialogueStore() const dialogueStore = useDialogueStore();
const props = defineProps({ const props = defineProps({
data: { data: {
type: Object, type: Object,
@ -118,17 +111,17 @@ const props = defineProps({
default: -1, default: -1,
required: true, required: true,
}, },
}) });
// //
const formatNameText = (text, maxLength = 16) => { const formatNameText = (text, maxLength = 16) => {
return text.length > maxLength ? `${text.slice(0, maxLength - 1)}...` : text return text.length > maxLength ? `${text.slice(0, maxLength - 1)}...` : text;
} };
const cellClick = () => { const cellClick = () => {
console.log(props.data) console.log(props.data);
// //
dialogueStore.setDialogue(props.data) dialogueStore.setDialogue(props.data);
// //
if (props.data.unread_num > 0) { if (props.data.unread_num > 0) {
@ -139,24 +132,24 @@ const cellClick = () => {
talkStore.updateItem({ talkStore.updateItem({
index_name: props.data.index_name, index_name: props.data.index_name,
unread_num: 0, unread_num: 0,
}) });
}) });
} }
uni.navigateTo({ uni.navigateTo({
url: `/pages/dialog/index?sessionId=${props.data.id}`, url: `/pages/dialog/index?sessionId=${props.data.id}`,
}) });
} };
const handleTop = () => { const handleTop = () => {
console.log(props.data, 1) console.log(props.data, 1);
onToTopTalk(props.data) onToTopTalk(props.data);
} };
// //
const handleDelete = () => { const handleDelete = () => {
console.log(props.data) console.log(props.data);
onRemoveTalk(props.data) onRemoveTalk(props.data);
} };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
::v-deep .swipe_action { ::v-deep .swipe_action {

View File

@ -125,7 +125,6 @@ import { ref, watch, computed } from 'vue'
import { onShow, onLoad } from '@dcloudio/uni-app' import { onShow, onLoad } from '@dcloudio/uni-app'
import { useChatList } from '@/store/chatList/index.js' import { useChatList } from '@/store/chatList/index.js'
import { useAuth } from '@/store/auth' import { useAuth } from '@/store/auth'
import { ServeClearTalkUnreadNum } from '@/api/chat'
import { useTalkStore, useUserStore, useDialogueStore } from '@/store' import { useTalkStore, useUserStore, useDialogueStore } from '@/store'
import chatItem from './components/chatItem.vue' import chatItem from './components/chatItem.vue'
import addCircle from '@/static/image/chatList/addCircle.png' import addCircle from '@/static/image/chatList/addCircle.png'
@ -238,7 +237,6 @@ onLoad((options) => {
if (items?.value?.length > 0) { if (items?.value?.length > 0) {
items.value.forEach((openSession) => { items.value.forEach((openSession) => {
if (openSession.index_name === options?.openSessionIndexName) { if (openSession.index_name === options?.openSessionIndexName) {
setTimeout(() => {
dialogueStore.setDialogue(openSession) dialogueStore.setDialogue(openSession)
if (openSession.unread_num > 0) { if (openSession.unread_num > 0) {
ServeClearTalkUnreadNum({ ServeClearTalkUnreadNum({
@ -254,7 +252,6 @@ onLoad((options) => {
uni.navigateTo({ uni.navigateTo({
url: `/pages/dialog/index?sessionId=${openSession.id}`, url: `/pages/dialog/index?sessionId=${openSession.id}`,
}) })
}, 500)
} }
}) })
} }

View File

@ -96,7 +96,6 @@ import {
import HighlightText from './highLightText.vue' import HighlightText from './highLightText.vue'
import { useI18n } from 'vue-i18n' import { useI18n } from 'vue-i18n'
import { beautifyTime } from '@/utils/datetime' import { beautifyTime } from '@/utils/datetime'
import { ChatMsgTypeMapping } from '@/constant/message'
const { t } = useI18n() const { t } = useI18n()
const props = defineProps({ const props = defineProps({
searchItem: Object | Number, searchItem: Object | Number,
@ -176,13 +175,6 @@ const keyMapping = {
name: 'receiver_name', name: 'receiver_name',
group_num: 'group_num', group_num: 'group_num',
}, },
search_by_member_condition: {
avatar: 'avatar',
name: 'nickname',
created_at: 'created_at',
msg_type: 'msg_type',
detailKey: 'chatMessageType',
},
} }
//key //key
const getKeyValue = (keys) => { const getKeyValue = (keys) => {
@ -262,12 +254,6 @@ const resultDetail = computed(() => {
case 'extra': case 'extra':
result_detail = props.searchItem?.extra result_detail = props.searchItem?.extra
break break
case 'chatMessageType':
result_detail =
props.searchItem?.msg_type === 1
? props.searchItem?.extra?.content
: ChatMsgTypeMapping[props.searchItem?.msg_type]
break
default: default:
result_detail = '' result_detail = ''
} }

View File

@ -36,10 +36,7 @@
</span> </span>
</div> </div>
</template> </template>
<div <div class="search-record-detail" v-if="props.searchRecordDetail">
class="search-record-detail"
v-if="props.searchRecordDetail && !props?.hideFirstRecord"
>
<searchItem <searchItem
@click=" @click="
clickSearchItem( clickSearchItem(
@ -174,10 +171,6 @@ const props = defineProps({
return {} return {}
}, },
}, // }, //
hideFirstRecord: {
type: Boolean,
default: false,
}, ///
}) })
const { t } = useI18n() const { t } = useI18n()

View File

@ -7,7 +7,6 @@
:apiRequest="ServeTalkRecord" :apiRequest="ServeTalkRecord"
:apiParams="state.apiParams" :apiParams="state.apiParams"
:searchText="state.searchText" :searchText="state.searchText"
:hideFirstRecord="state.hideFirstRecord"
:isPagination="true" :isPagination="true"
:searchRecordDetail="true" :searchRecordDetail="true"
@lastIdChange="lastIdChange" @lastIdChange="lastIdChange"
@ -31,7 +30,6 @@ const state = reactive({
apiParams: '', apiParams: '',
searchText: '', searchText: '',
uid: computed(() => userStore.uid), //id uid: computed(() => userStore.uid), //id
hideFirstRecord: false, ///
}) })
onLoad((options) => { onLoad((options) => {
@ -57,10 +55,6 @@ onLoad((options) => {
} }
console.log(JSON.parse(decodeURIComponent(state.apiParams))) console.log(JSON.parse(decodeURIComponent(state.apiParams)))
if (options.hideFirstRecord) {
state.hideFirstRecord = options.hideFirstRecord === '1' ? true : false
}
}) })
//id //id
@ -122,7 +116,7 @@ const clickSearchItem = (
}) })
} else { } else {
uni.navigateTo({ uni.navigateTo({
url: '/pages/dialog/index?msgInfo=' + res + '&keepDialogInfo=1', url: '/pages/dialog/index?msgInfo=' + res,
}) })
} }
} }

View File

@ -9,7 +9,6 @@
:auto="false" :auto="false"
:loading-more-default-as-loading="true" :loading-more-default-as-loading="true"
:inside-more="true" :inside-more="true"
v-model="state.flatList"
> >
<template #top v-if="state.showPageTitle"> <template #top v-if="state.showPageTitle">
<customNavbar :title="state.pageTitle"></customNavbar> <customNavbar :title="state.pageTitle"></customNavbar>
@ -74,7 +73,11 @@
> >
<div <div
class="search-by-condition-input" class="search-by-condition-input"
v-if="state.condition === 'file' || state.condition === 'link'" v-if="
state.condition === 'file' ||
state.condition === 'link' ||
state.condition === 'member'
"
> >
<customInput <customInput
:searchText="state.searchText" :searchText="state.searchText"
@ -114,24 +117,11 @@
v-for="(item, index) in conditionItem.monthResultList" v-for="(item, index) in conditionItem.monthResultList"
:key="index" :key="index"
:style="{ :style="{
border: border: state.condition === 'imgAndVideo' ? '0' : '',
state.condition === 'imgAndVideo' ||
state.condition === 'member'
? '0'
: '',
padding: padding:
state.condition === 'imgAndVideo' ? '0 0 10rpx' : '', state.condition === 'imgAndVideo' ? '0 0 10rpx' : '',
}" }"
> >
<div class="condition-result-member">
<searchItem
@click="toDialogueByMember(item)"
:searchResultKey="'search_by_member_condition'"
:searchItem="item"
:searchText="state.searchText"
:searchRecordDetail="true"
></searchItem>
</div>
<div <div
class="condition-result-imgAndVideo" class="condition-result-imgAndVideo"
v-if="state.condition === 'imgAndVideo'" v-if="state.condition === 'imgAndVideo'"
@ -305,7 +295,6 @@ const state = reactive({
cursor: 0, // cursor: 0, //
msg_type: 0, // msg_type: 0, //
group_member_id: 0, //id group_member_id: 0, //id
flatList: [], //
}) })
onLoad((options) => { onLoad((options) => {
@ -313,10 +302,7 @@ onLoad((options) => {
if (options.condition) { if (options.condition) {
state.condition = options.condition state.condition = options.condition
if (options.condition === 'member') { if (options.condition === 'member') {
state.showPageTitle = true // queryAllSearch()
state.pageTitle = t('search.condition.member')
state.group_member_id = options.groupMemberId
queryAllSearch()
} else if (options.condition === 'date') { } else if (options.condition === 'date') {
state.showPageTitle = true state.showPageTitle = true
state.pageTitle = t('search.condition.date') state.pageTitle = t('search.condition.date')
@ -440,7 +426,6 @@ const selectDate = async (e) => {
url: url:
'/pages/dialog/index?sessionId=' + '/pages/dialog/index?sessionId=' +
sessionId + sessionId +
'&keepDialogInfo=1' +
'&recordDate=' + '&recordDate=' +
parseTime(e, '{y}-{m}-{d}'), parseTime(e, '{y}-{m}-{d}'),
}) })
@ -572,25 +557,18 @@ const queryAllSearch = () => {
} else { } else {
noMore = true noMore = true
} }
console.log(dateList)
//
state.searchResultList = dateList
// z-paging
state.flatList = dateList.reduce((acc, group) => {
return acc.concat(group.monthResultList)
}, [])
if (state.cursor === 0) { if (state.cursor === 0) {
zPaging.value?.complete(state.flatList) state.searchResultList = dateList
zPaging.value?.complete(dateList)
} else { } else {
zPaging.value?.completeByNoMore(state.flatList, noMore) state.searchResultList = dateList
zPaging.value?.completeByNoMore(dateList, noMore)
} }
state.cursor = data?.cursor state.cursor = data?.cursor
} else { } else {
if (state.cursor === 0) { if (state.cursor === 0) {
state.searchResultList = [] state.searchResultList = []
state.flatList = []
} }
zPaging.value?.complete([]) zPaging.value?.complete([])
} }
@ -599,7 +577,6 @@ const queryAllSearch = () => {
resp.catch(() => { resp.catch(() => {
if (state.cursor === 0) { if (state.cursor === 0) {
state.searchResultList = [] state.searchResultList = []
state.flatList = []
} }
zPaging.value?.complete([]) zPaging.value?.complete([])
}) })
@ -660,22 +637,6 @@ const downloadAndOpenFile = (item) => {
}) })
dtask.start() dtask.start()
} }
//
const toDialogueByMember = async (msgInfo) => {
const sessionId = await getSessionId(
dialogueParams.talk_type,
dialogueParams.receiver_id,
)
uni.navigateTo({
url:
'/pages/dialog/index?sessionId=' +
sessionId +
'&keepDialogInfo=1' +
'&msgInfo=' +
encodeURIComponent(JSON.stringify(msgInfo)),
})
}
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.search-by-date { .search-by-date {

View File

@ -144,7 +144,6 @@ export const useTalkStore = defineStore('talk', {
ServeCreateTalkList({ ServeCreateTalkList({
talk_type, talk_type,
receiver_id,
erp_user_id, erp_user_id,
}).then(({ code, data, message }) => { }).then(({ code, data, message }) => {
if (code == 200) { if (code == 200) {