Compare commits
10 Commits
baa05faa24
...
0e640c7ad6
Author | SHA1 | Date | |
---|---|---|---|
|
0e640c7ad6 | ||
|
010528e52e | ||
380b0120bc | |||
894bb9bf28 | |||
11ef845e9c | |||
cba592b87d | |||
3fe60616a5 | |||
|
28625c7943 | ||
98e3a0710a | |||
747653f54a |
12
src/App.vue
12
src/App.vue
@ -11,13 +11,13 @@ const userStore = useUserStore()
|
||||
const root = document.documentElement
|
||||
root.style.setProperty('--statusBarHeight', `${statusBarHeight.value}px`)
|
||||
const handleWebview = () => {
|
||||
let statusBarHeight = window?.plus?.navigator?.getStatusbarHeight()
|
||||
let statusBarHeight_ = window?.plus?.navigator?.getStatusbarHeight()
|
||||
const webview = plus.webview.currentWebview()
|
||||
webview.setStyle({
|
||||
top: statusBarHeight,
|
||||
bottom: 0,
|
||||
})
|
||||
// console.log(webview)
|
||||
// webview.setStyle({
|
||||
// top: statusBarHeight_,
|
||||
// bottom: 0,
|
||||
// })
|
||||
console.log("webview", webview)
|
||||
token.value = webview.token
|
||||
}
|
||||
const init = () => {
|
||||
|
@ -6,7 +6,11 @@
|
||||
props.subBtnText ? 'apposition-btn-style' : '',
|
||||
]"
|
||||
>
|
||||
<wd-button custom-class="custom-sub-btn-class" v-if="props.subBtnText">
|
||||
<wd-button
|
||||
custom-class="custom-sub-btn-class"
|
||||
v-if="props.subBtnText"
|
||||
@click="clickSubBtn"
|
||||
>
|
||||
{{ props.subBtnText }}
|
||||
</wd-button>
|
||||
<wd-button
|
||||
@ -24,7 +28,7 @@
|
||||
import { reactive } from 'vue'
|
||||
import { defineProps, defineEmits } from 'vue'
|
||||
const state = reactive({})
|
||||
const emits = defineEmits(['clickBtn'])
|
||||
const emits = defineEmits(['clickSubBtn', 'clickBtn'])
|
||||
const props = defineProps({
|
||||
isBottom: false, //是否底部按钮
|
||||
btnText: '', //按钮文字
|
||||
@ -33,7 +37,12 @@ const props = defineProps({
|
||||
plain: false, //是否镂空
|
||||
})
|
||||
|
||||
//点击
|
||||
//点击副按钮
|
||||
const clickSubBtn = () => {
|
||||
emits('clickSubBtn')
|
||||
}
|
||||
|
||||
//点击主按钮
|
||||
const clickBtn = () => {
|
||||
emits('clickBtn')
|
||||
}
|
||||
|
@ -32,6 +32,11 @@ class Talk extends Base {
|
||||
*/
|
||||
talk_type = 0
|
||||
|
||||
/**
|
||||
* 文件上传唯一随机值
|
||||
*/
|
||||
fileNum = ''
|
||||
|
||||
/**
|
||||
* 初始化构造方法
|
||||
*
|
||||
@ -43,6 +48,10 @@ class Talk extends Base {
|
||||
this.sender_id = resource.sender_id
|
||||
this.receiver_id = resource.receiver_id
|
||||
this.talk_type = resource.talk_type
|
||||
// this.fileNum = resource.file_num
|
||||
if(resource.file_num){
|
||||
resource.data.file_num = resource.file_num
|
||||
}
|
||||
this.resource = resource.data
|
||||
|
||||
this.handle()
|
||||
|
@ -684,6 +684,8 @@ const confirmSelectMembers = () => {
|
||||
resp.then(({ code, data }) => {
|
||||
console.log(data)
|
||||
if (code == 200) {
|
||||
// console.error(-selectedUserIds.split(',').length)
|
||||
emits('updateSelectedMembersNum', -selectedUserIds.split(',').length)
|
||||
useDialogueStore().updateGroupMembers()
|
||||
groupStore.ServeGroupDetail()
|
||||
} else {
|
||||
|
@ -262,7 +262,9 @@ onLoad(async (options) => {
|
||||
console.log(options.groupId)
|
||||
state.groupId = Number(options.groupId)
|
||||
await groupStore.ServeGroupDetail()
|
||||
await groupStore.ServeGetGroupNotices()
|
||||
if (dialogueParams.type === 2) {
|
||||
await groupStore.ServeGetGroupNotices()
|
||||
}
|
||||
}
|
||||
if (options.sessionId) {
|
||||
state.sessionId = Number(options.sessionId)
|
||||
|
@ -2,8 +2,11 @@
|
||||
<div class="choose-deps-page">
|
||||
<zPaging ref="zPaging" :show-scrollbar="false">
|
||||
<template #top>
|
||||
<div :class="state.chooseMode === 3 ? 'top_bg': ''">
|
||||
<customNavbar :class="state.chooseMode === 3 ? 'index_top_navbar': ''" :title="pageTitle"></customNavbar>
|
||||
<div :class="state.chooseMode === 3 ? 'top_bg' : ''">
|
||||
<customNavbar
|
||||
:class="state.chooseMode === 3 ? 'index_top_navbar' : ''"
|
||||
:title="pageTitle"
|
||||
></customNavbar>
|
||||
<div class="pl-[32rpx] pr-[32rpx] pt-[32rpx] pb-[32rpx]">
|
||||
<customInput
|
||||
:searchText="searchVal"
|
||||
@ -14,33 +17,33 @@
|
||||
</template>
|
||||
<div class="choose-deps">
|
||||
<div class="w-full pl-[32rpx] pr-[32rpx]">
|
||||
<div
|
||||
v-if="crumbs.length"
|
||||
class="w-full overflow-x-auto mt-[22rpx] leading-[48rpx] text-[#2F2F2F] flex items-center no-scrollbar"
|
||||
ref="crumbsContainer"
|
||||
>
|
||||
<div
|
||||
v-if="crumbs.length"
|
||||
class="w-full overflow-x-auto mt-[22rpx] leading-[48rpx] text-[#2F2F2F] flex items-center no-scrollbar"
|
||||
ref="crumbsContainer"
|
||||
v-for="(item, index) in crumbs"
|
||||
class="flex items-center text-[28rpx] leading-[48rpx] whitespace-nowrap"
|
||||
:class="[
|
||||
index === crumbsIndex ? 'text-[#747474]' : 'text-[#46299D]',
|
||||
index === 0 ? '' : 'ml-[12rpx]',
|
||||
]"
|
||||
@click="handleCrumbsClick(index)"
|
||||
>
|
||||
<div>{{ item.name }}</div>
|
||||
<div
|
||||
v-for="(item, index) in crumbs"
|
||||
class="flex items-center text-[28rpx] leading-[48rpx] whitespace-nowrap"
|
||||
:class="[
|
||||
index === crumbsIndex ? 'text-[#747474]' : 'text-[#46299D]',
|
||||
index === 0 ? '' : 'ml-[12rpx]',
|
||||
]"
|
||||
@click="handleCrumbsClick(index)"
|
||||
v-if="index !== crumbs.length - 1"
|
||||
class="ml-[20rpx] flex items-center mb-[2rpx]"
|
||||
>
|
||||
<div>{{ item.name }}</div>
|
||||
<div
|
||||
v-if="index !== crumbs.length - 1"
|
||||
class="ml-[20rpx] flex items-center mb-[2rpx]"
|
||||
>
|
||||
<tm-icon
|
||||
name="tmicon-angle-right"
|
||||
:font-size="20"
|
||||
:color="index !== crumbs.length - 1 ? '#7A58DE' : '#C1B4EA'"
|
||||
></tm-icon>
|
||||
</div>
|
||||
<tm-icon
|
||||
name="tmicon-angle-right"
|
||||
:font-size="20"
|
||||
:color="index !== crumbs.length - 1 ? '#7A58DE' : '#C1B4EA'"
|
||||
></tm-icon>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
v-if="
|
||||
(state.chooseMode === 1 || state.chooseMode === 2) &&
|
||||
@ -460,6 +463,7 @@ import downDep from '@/static/image/chatList/downDep.png'
|
||||
import downDepDis from '@/static/image/chatList/downDepDis.png'
|
||||
import checkBox from '@/components/checkBox/index.vue'
|
||||
import lodash from 'lodash'
|
||||
import { handleSetWebviewStyle } from '@/utils/common'
|
||||
|
||||
import { useI18n } from 'vue-i18n'
|
||||
const { t } = useI18n()
|
||||
@ -990,6 +994,7 @@ const checkCurrentItem = (item) => {
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
handleSetWebviewStyle()
|
||||
init()
|
||||
})
|
||||
|
||||
@ -1106,18 +1111,18 @@ const toUserDetail = (userItem) => {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
}
|
||||
::v-deep .index_top_navbar .tmicon-angle-left{
|
||||
color:#fff !important;
|
||||
::v-deep .index_top_navbar .tmicon-angle-left {
|
||||
color: #fff !important;
|
||||
}
|
||||
::v-deep .index_top_navbar .text-weight-b{
|
||||
color:#fff !important;
|
||||
::v-deep .index_top_navbar .text-weight-b {
|
||||
color: #fff !important;
|
||||
}
|
||||
|
||||
::v-deep .index_top_navbar .statusHeightTop > .noNvueBorder:first-child {
|
||||
background: transparent !important;
|
||||
border: none !important;
|
||||
}
|
||||
.top_bg{
|
||||
.top_bg {
|
||||
background: url('@/static/image/mine/page_top.png') no-repeat;
|
||||
background-size: cover;
|
||||
background-position: bottom center;
|
||||
|
@ -186,7 +186,7 @@ import customBtn from '@/components/custom-btn/custom-btn.vue'
|
||||
import groupMemberList from '../chatSettings/components/groupMembersList.vue'
|
||||
import avatarModule from '@/components/avatar-module/index.vue'
|
||||
|
||||
import { ref, watch, computed } from 'vue'
|
||||
import { ref, watch, computed, onMounted } from 'vue'
|
||||
import { onShow, onLoad } from '@dcloudio/uni-app'
|
||||
import { useChatList } from '@/store/chatList/index.js'
|
||||
import { useAuth } from '@/store/auth'
|
||||
@ -195,6 +195,7 @@ import addCircle from '@/static/image/chatList/addCircle.png'
|
||||
import cahtPopover from '@/static/image/chatList/cahtPopover.png'
|
||||
import { ServeCreateGroup } from '@/api/group/index'
|
||||
import { useGroupTypeStore } from '@/store/groupType'
|
||||
import { handleSetWebviewStyle } from '@/utils/common'
|
||||
|
||||
const {
|
||||
groupName,
|
||||
@ -217,6 +218,10 @@ onLoad(()=> {
|
||||
groupStore.$reset()
|
||||
})
|
||||
|
||||
onMounted(() => {
|
||||
handleSetWebviewStyle()
|
||||
})
|
||||
|
||||
//群类型
|
||||
const groupType = computed(() => {
|
||||
let group_type = ''
|
||||
|
@ -74,7 +74,7 @@ const photoActionsSelect = (index) => {
|
||||
console.log(res,'res');
|
||||
res.tempFiles.forEach(async (file) => {
|
||||
let data = await onUploadImageVideo(file, 'image')
|
||||
emit('selectImg', data)
|
||||
emit('selectImg', data, data.file_num)
|
||||
})
|
||||
}
|
||||
})
|
||||
@ -84,7 +84,7 @@ const photoActionsSelect = (index) => {
|
||||
success: async (res) => {
|
||||
console.log(res,'res');
|
||||
let data = await onUploadImageVideo(res.tempFile, 'video',res.tempFilePath)
|
||||
emit('selectImg', data)
|
||||
emit('selectImg', data, data.file_num)
|
||||
}
|
||||
})
|
||||
}
|
||||
@ -119,6 +119,7 @@ const onUploadImageVideo = async (file, type = 'image',fileUrl) => {
|
||||
is_read: 0,
|
||||
is_revoke: 0,
|
||||
msg_id: randomId,
|
||||
file_num: randomId,
|
||||
msg_type: 3,
|
||||
nickname: userStore.nickname,
|
||||
receiver_id: dialogueStore.talk.receiver_id,
|
||||
@ -137,7 +138,8 @@ const onUploadImageVideo = async (file, type = 'image',fileUrl) => {
|
||||
url: data.ori_url,
|
||||
size: file.size,
|
||||
width: image.width,
|
||||
height: image.height
|
||||
height: image.height,
|
||||
file_num: randomId,
|
||||
})
|
||||
} else {
|
||||
resolve('')
|
||||
@ -171,6 +173,7 @@ const onUploadImageVideo = async (file, type = 'image',fileUrl) => {
|
||||
is_read: 0,
|
||||
is_revoke: 0,
|
||||
msg_id: randomId,
|
||||
file_num: randomId,
|
||||
msg_type: 5,
|
||||
nickname: userStore.nickname,
|
||||
receiver_id: dialogueStore.talk.receiver_id,
|
||||
@ -189,7 +192,8 @@ const onUploadImageVideo = async (file, type = 'image',fileUrl) => {
|
||||
url: data.ori_url,
|
||||
cover: data.cover_url,
|
||||
duration: parseInt(resp.duration),
|
||||
size: file.size
|
||||
size: file.size,
|
||||
file_num: randomId,
|
||||
})
|
||||
} else {
|
||||
// resolve('')
|
||||
@ -313,6 +317,7 @@ const chooseFile = () => {
|
||||
is_read: 0,
|
||||
is_revoke: 0,
|
||||
msg_id: randomId,
|
||||
file_num: randomId,
|
||||
msg_type: 6,
|
||||
nickname: userStore.nickname,
|
||||
receiver_id: dialogueStore.talk.receiver_id,
|
||||
|
@ -62,12 +62,43 @@
|
||||
<customBtn
|
||||
:isBottom="true"
|
||||
:btnText="$t('user.detail.sendMsg')"
|
||||
:subBtnText="$t('user.detail.ringBell')"
|
||||
:subBtnText="
|
||||
state.userInfo.sys_id === state.uid
|
||||
? ''
|
||||
: $t('user.detail.ringBell')
|
||||
"
|
||||
@clickBtn="toTalkUser"
|
||||
@clickSubBtn="handleCall"
|
||||
></customBtn>
|
||||
</template>
|
||||
</ZPaging>
|
||||
</div>
|
||||
<tm-drawer
|
||||
placement="bottom"
|
||||
v-model:show="state.isShowPhoneCall"
|
||||
:hideHeader="true"
|
||||
:height="416"
|
||||
:round="6"
|
||||
>
|
||||
<div class="do-phone-call">
|
||||
<div class="do-phone-call-header">
|
||||
<span>{{ $t('popup.title.phone') }}</span>
|
||||
<img
|
||||
src="/src/static/image/login/check-circle-filled@3x.png"
|
||||
@click="hidePhoneCallPopup"
|
||||
/>
|
||||
</div>
|
||||
<div class="do-phone-call-number">
|
||||
<span>{{ state.phoneNumber }}</span>
|
||||
</div>
|
||||
<div class="do-phone-call-btn">
|
||||
<customBtn
|
||||
:btnText="$t('do.phone.call')"
|
||||
@clickBtn="doPhoneCall"
|
||||
></customBtn>
|
||||
</div>
|
||||
</div>
|
||||
</tm-drawer>
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
@ -76,8 +107,9 @@ import ZPaging from '@/uni_modules/z-paging/components/z-paging/z-paging.vue'
|
||||
import { onLoad } from '@dcloudio/uni-app'
|
||||
import { reactive } from 'vue'
|
||||
|
||||
import { useTalkStore } from '@/store'
|
||||
import { useTalkStore, useUserStore } from '@/store'
|
||||
const talkStore = useTalkStore()
|
||||
const userStore = useUserStore()
|
||||
|
||||
import { getUserInfoByClickAvatar } from '@/api/user/index'
|
||||
|
||||
@ -88,6 +120,9 @@ const state = reactive({
|
||||
erpUserId: '', //erp用户id
|
||||
userInfo: null, //用户详情
|
||||
userBasicInfos: [], //用户基本信息
|
||||
isShowPhoneCall: false, //是否显示电话拨号弹框
|
||||
phoneNumber: '', //手机号
|
||||
uid: computed(() => userStore.uid), //当前用户id
|
||||
})
|
||||
|
||||
onLoad((options) => {
|
||||
@ -167,6 +202,7 @@ const getUserInfo = () => {
|
||||
value: data.enter_date,
|
||||
},
|
||||
]
|
||||
state.phoneNumber = data.tel_num
|
||||
} else {
|
||||
}
|
||||
})
|
||||
@ -174,10 +210,33 @@ const getUserInfo = () => {
|
||||
resp.catch(() => {})
|
||||
}
|
||||
|
||||
//点击唤起拨号弹框
|
||||
const handleCall = () => {
|
||||
state.isShowPhoneCall = true
|
||||
}
|
||||
|
||||
//点击隐藏拨号弹框
|
||||
const hidePhoneCallPopup = () => {
|
||||
state.isShowPhoneCall = false
|
||||
}
|
||||
|
||||
//点击对用户发起单聊
|
||||
const toTalkUser = () => {
|
||||
talkStore.toTalk(1, state.userInfo.sys_id, state.erpUserId)
|
||||
}
|
||||
|
||||
//点击拨打唤起拨号
|
||||
const doPhoneCall = () => {
|
||||
uni.makePhoneCall({
|
||||
phoneNumber: state.phoneNumber,
|
||||
success: () => {
|
||||
console.log('拨号成功')
|
||||
},
|
||||
fail: (err) => {
|
||||
console.error('失败:', err)
|
||||
},
|
||||
})
|
||||
}
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
.outer-layer {
|
||||
@ -290,4 +349,58 @@ const toTalkUser = () => {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.do-phone-call {
|
||||
.do-phone-call-header {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 42rpx 0;
|
||||
position: relative;
|
||||
span {
|
||||
font-size: 28rpx;
|
||||
line-height: 40rpx;
|
||||
color: #747474;
|
||||
font-weight: 400;
|
||||
}
|
||||
img {
|
||||
position: absolute;
|
||||
top: 44rpx;
|
||||
right: 30rpx;
|
||||
width: 36rpx;
|
||||
height: 36rpx;
|
||||
}
|
||||
}
|
||||
.do-phone-call-number {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 32rpx 0;
|
||||
border-top: 2rpx solid #e7e7e7;
|
||||
border-bottom: 2rpx solid #e7e7e7;
|
||||
span {
|
||||
font-size: 32rpx;
|
||||
line-height: 44rpx;
|
||||
color: #1a1a1a;
|
||||
font-weight: 400;
|
||||
}
|
||||
}
|
||||
.do-phone-call-btn {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 50rpx 0;
|
||||
:deep(.custom-btn-class) {
|
||||
width: 690rpx;
|
||||
font-size: 32rpx;
|
||||
line-height: 44rpx;
|
||||
padding: 18rpx 0;
|
||||
height: 80rpx;
|
||||
background: linear-gradient(to right, #674bbc, #46299d);
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
@ -24,7 +24,10 @@
|
||||
<div class="text-[24rpx] text-[#999999]">公司群</div>
|
||||
</template>
|
||||
<template #right>
|
||||
<div class="mr-[36rpx] toChatSetting_btn">
|
||||
<div
|
||||
class="mr-[36rpx] toChatSetting_btn"
|
||||
v-if="!talkParams.isDismiss"
|
||||
>
|
||||
<tm-icon
|
||||
color="rgb(51, 51, 51)"
|
||||
:font-size="36"
|
||||
@ -70,9 +73,18 @@
|
||||
:datetime="item.created_at"
|
||||
:msg_id="item.msg_id"
|
||||
>
|
||||
<template v-if="canEditRevokedMessage(item) && item.user_id === userStore.uid">
|
||||
<span class="edit-revoked-message" @click="restoreRevokedMessage(item)">重新编辑</span>
|
||||
</template>
|
||||
<template
|
||||
v-if="
|
||||
canEditRevokedMessage(item) && item.user_id === userStore.uid
|
||||
"
|
||||
>
|
||||
<span
|
||||
class="edit-revoked-message"
|
||||
@click="restoreRevokedMessage(item)"
|
||||
>
|
||||
重新编辑
|
||||
</span>
|
||||
</template>
|
||||
</revoke-message>
|
||||
</div>
|
||||
|
||||
@ -133,7 +145,7 @@
|
||||
<deepBubble
|
||||
@clickMenu="(menuType) => onContextMenu(menuType, item)"
|
||||
:isShowCopy="isShowCopy(item)"
|
||||
:isShowWithdraw="isRevoke(talkParams.uid, item)"
|
||||
:isShowWithdraw="isRevoke(talkParams.uid, item) || isLeader"
|
||||
>
|
||||
<component
|
||||
class="component-content"
|
||||
@ -522,6 +534,8 @@ const talkParams = reactive({
|
||||
online: computed(() => dialogueStore.online),
|
||||
keyboard: computed(() => dialogueStore.keyboard),
|
||||
num: computed(() => dialogueStore.members.length),
|
||||
isDismiss: computed(() => dialogueStore.isDismiss),
|
||||
adminList: computed(() => dialogueStore.getAdminList),
|
||||
})
|
||||
|
||||
const state = ref({
|
||||
@ -788,8 +802,8 @@ const onEditorChange = () => {
|
||||
// emit('editor-event', emitCall('input_event', text))
|
||||
// 清理过期的撤回消息(超过5分钟)
|
||||
const now = new Date().getTime()
|
||||
Object.keys(state.value.revokedMessages).forEach(msgId => {
|
||||
if ((now - state.value.revokedMessages[msgId].revokeTime) > 5 * 60 * 1000) {
|
||||
Object.keys(state.value.revokedMessages).forEach((msgId) => {
|
||||
if (now - state.value.revokedMessages[msgId].revokeTime > 5 * 60 * 1000) {
|
||||
delete state.value.revokedMessages[msgId]
|
||||
}
|
||||
})
|
||||
@ -869,8 +883,8 @@ const editorOption = {
|
||||
placeholder: '',
|
||||
}
|
||||
|
||||
const handleSelectImg = (data) => {
|
||||
onSendMessage({ ...data })
|
||||
const handleSelectImg = (data, file_num) => {
|
||||
onSendMessage({ ...data, file_num })
|
||||
}
|
||||
|
||||
const virtualListChange = (vList) => {
|
||||
@ -952,27 +966,26 @@ const withdrawerConfirm = () => {
|
||||
|
||||
// 添加检查是否可以重新编辑撤回消息的函数
|
||||
const canEditRevokedMessage = (item) => {
|
||||
console.log( item)
|
||||
if(item.is_revoke === 1 && item.msg_type === 1) {
|
||||
const now = new Date().getTime();
|
||||
const revokeTime = new Date(item.created_at).getTime();
|
||||
console.log(item)
|
||||
if (item.is_revoke === 1 && item.msg_type === 1) {
|
||||
const now = new Date().getTime()
|
||||
const revokeTime = new Date(item.created_at).getTime()
|
||||
console.log(now)
|
||||
// 检查是否在5分钟内
|
||||
return (now - revokeTime) <= 5 * 60 * 1000
|
||||
return now - revokeTime <= 5 * 60 * 1000
|
||||
}
|
||||
return false
|
||||
|
||||
}
|
||||
|
||||
// 添加恢复撤回消息到输入框的函数
|
||||
const restoreRevokedMessage = async (item) => {
|
||||
// 接口拿数据,之后把查询的内容给输入框
|
||||
const res = await detailGetRecordsContext({
|
||||
msgId: item.msg_id
|
||||
msgId: item.msg_id,
|
||||
})
|
||||
console.log(res)
|
||||
if(res.code == 200) {
|
||||
const content = res.data.item?.extra?.content;
|
||||
if (res.code == 200) {
|
||||
const content = res.data.item?.extra?.content
|
||||
const quill = getQuill()
|
||||
quill.setText(content)
|
||||
// 将光标设置到文本末尾
|
||||
@ -990,7 +1003,6 @@ const restoreRevokedMessage = async (item) => {
|
||||
// 可以根据需要添加其他类型消息的处理
|
||||
}
|
||||
|
||||
|
||||
const actionDelete = (item) => {
|
||||
console.log('删除')
|
||||
item.isCheck = true
|
||||
@ -1102,7 +1114,7 @@ const onScrollToLower = () => {
|
||||
} else {
|
||||
if (tempVirtualList[0].sequence > dialogueList.records[0].sequence) {
|
||||
virtualList.value = dialogueList.records
|
||||
.slice(0, recordIndex)
|
||||
.slice(Math.max(0, recordIndex - 10), recordIndex)
|
||||
.concat(tempVirtualList)
|
||||
.reverse()
|
||||
// zpagingRef.value.setLocalPaging(
|
||||
@ -1139,27 +1151,22 @@ const onScrollToUpper = () => {
|
||||
tempVirtualList[tempVirtualList.length - 1].sequence <
|
||||
dialogueList.records[dialogueList.records.length - 1].sequence
|
||||
) {
|
||||
// 记住加载更多前消息的ID
|
||||
const currentMsgId = tempVirtualList[tempVirtualList.length - 1].msg_id
|
||||
|
||||
virtualList.value = tempVirtualList
|
||||
.concat(
|
||||
dialogueList.records.slice(
|
||||
recordIndex + 1,
|
||||
Math.min(recordIndex + 11, dialogueList.records.length),
|
||||
dialogueList.records.length,
|
||||
),
|
||||
)
|
||||
.reverse()
|
||||
// zpagingRef.value.setLocalPaging(
|
||||
// tempVirtualList
|
||||
// .concat(
|
||||
// dialogueList.records.slice(
|
||||
// recordIndex + 1,
|
||||
// dialogueList.records.length,
|
||||
// ),
|
||||
// )
|
||||
// .reverse(),
|
||||
// // zpagingRef.value.scrollIntoViewById('zp-id-' + virtualList.value[virtualList.value.length - 1].msg_id)
|
||||
// )
|
||||
|
||||
console.log(virtualList.value)
|
||||
// 数据更新后,滚动到之前的位置
|
||||
nextTick(() => {
|
||||
zpagingRef.value?.scrollIntoViewById('zp-id-' + currentMsgId)
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1310,7 +1317,32 @@ const queryRecordsByMsgInfo = (msgInfo) => {
|
||||
}
|
||||
}
|
||||
|
||||
//是否是管理员
|
||||
const isLeader = computed(() => {
|
||||
if (talkParams.adminList.length > 0) {
|
||||
return (
|
||||
talkParams.adminList.filter(
|
||||
(adminItem) => adminItem.erp_user_id === useAuth()?.userInfo?.value?.ID,
|
||||
).length > 0
|
||||
)
|
||||
}
|
||||
return false
|
||||
})
|
||||
|
||||
onMounted(async () => {
|
||||
if (typeof plus !== 'undefined') {
|
||||
const webview = plus.webview.currentWebview()
|
||||
webview.setStyle({
|
||||
bottom: 0,
|
||||
})
|
||||
} else {
|
||||
document.addEventListener('plusready', () => {
|
||||
const webview = plus.webview.currentWebview()
|
||||
webview.setStyle({
|
||||
bottom: 0,
|
||||
})
|
||||
})
|
||||
}
|
||||
nextTick(() => {
|
||||
state.value.mentionSelectHeight = pxTorPx(
|
||||
uni.getSystemInfoSync().windowHeight * 0.86,
|
||||
@ -1360,7 +1392,7 @@ onUnmounted(() => {
|
||||
|
||||
.edit-revoked-message {
|
||||
margin-left: 10rpx;
|
||||
color: #46299D;
|
||||
color: #46299d;
|
||||
cursor: pointer;
|
||||
font-size: 24rpx;
|
||||
|
||||
|
@ -131,6 +131,7 @@ import addCircle from '@/static/image/chatList/addCircle.png'
|
||||
import cahtPopover from '@/static/image/chatList/cahtPopover.png'
|
||||
import zu3289 from '@/static/image/chatList/zu3289@2x.png'
|
||||
import ZPaging from '@/uni_modules/z-paging/components/z-paging/z-paging.vue'
|
||||
import { handleSetWebviewStyle } from '@/utils/common'
|
||||
const paging = ref()
|
||||
const isEmptyViewShow = ref(false)
|
||||
const talkStore = useTalkStore()
|
||||
@ -214,6 +215,7 @@ const toAddressBookPage = () => {
|
||||
); */
|
||||
|
||||
onShow(() => {
|
||||
handleSetWebviewStyle(true)
|
||||
// 页面显示时重新加载数据
|
||||
talkStore
|
||||
.loadTalkList()
|
||||
|
@ -275,6 +275,7 @@ const resultDetail = computed(() => {
|
||||
padding: 2rpx 14rpx;
|
||||
border: 2rpx solid #000;
|
||||
border-radius: 6rpx;
|
||||
flex-shrink: 0;
|
||||
span {
|
||||
line-height: 34rpx;
|
||||
}
|
||||
@ -299,6 +300,7 @@ const resultDetail = computed(() => {
|
||||
.info-detail-searchRecordDetail {
|
||||
span {
|
||||
color: $theme-text;
|
||||
word-break: break-all;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -117,6 +117,10 @@ import { useI18n } from 'vue-i18n'
|
||||
import { ref, reactive, defineEmits, defineProps, onMounted } from 'vue'
|
||||
import pointerIconSrc from '@/static/image/search/search-item-pointer.png'
|
||||
|
||||
import lodash from 'lodash'
|
||||
import { useUserStore } from '@/store'
|
||||
const userStore = useUserStore()
|
||||
|
||||
const zPaging = ref()
|
||||
useZPaging(zPaging)
|
||||
|
||||
@ -131,6 +135,7 @@ const state = reactive({
|
||||
searchResultList: [], //搜素结果列表
|
||||
searchResult: null, //搜索结果
|
||||
pageNum: 1, //当前请求数据页数
|
||||
uid: computed(() => userStore.uid), //当前用户id
|
||||
})
|
||||
|
||||
const props = defineProps({
|
||||
@ -197,10 +202,29 @@ const queryAllSearch = (pageNum, searchResultPageSize) => {
|
||||
})
|
||||
}
|
||||
if ((data.talk_record_infos || []).length > 0) {
|
||||
let receiverInfo = lodash.cloneDeep(data.talk_record_infos[0])
|
||||
if (receiverInfo.talk_type === 1) {
|
||||
//单聊才需此判断
|
||||
if (receiverInfo.user_id === state.uid) {
|
||||
//发送人是自己,接收人不需要变
|
||||
}
|
||||
if (receiverInfo.receiver_id === state.uid) {
|
||||
//接收人是自己,这里需要变成对方
|
||||
let temp_id = receiverInfo.receiver_id
|
||||
let temp_name = receiverInfo.receiver_name
|
||||
let temp_avatar = receiverInfo.receiver_avatar
|
||||
receiverInfo.receiver_id = receiverInfo.user_id
|
||||
receiverInfo.receiver_name = receiverInfo.user_name
|
||||
receiverInfo.receiver_avatar = receiverInfo.user_avatar
|
||||
receiverInfo.user_id = temp_id
|
||||
receiverInfo.user_name = temp_name
|
||||
receiverInfo.user_avatar = temp_avatar
|
||||
}
|
||||
}
|
||||
state.first_talk_record_infos = Object.assign(
|
||||
{},
|
||||
state.first_talk_record_infos,
|
||||
data.talk_record_infos[0],
|
||||
receiverInfo,
|
||||
)
|
||||
;(data.talk_record_infos || []).forEach((item) => {
|
||||
item.group_type = 0
|
||||
|
@ -14,6 +14,16 @@
|
||||
<script setup>
|
||||
import searchList from './components/searchList.vue'
|
||||
import { ServeSeachQueryAll } from '@/api/search/index'
|
||||
import { onMounted } from 'vue'
|
||||
import { handleSetWebviewStyle } from '@/utils/common'
|
||||
|
||||
import { useDialogueStore } from '@/store'
|
||||
|
||||
const dialogueStore = useDialogueStore()
|
||||
|
||||
onMounted(() => {
|
||||
handleSetWebviewStyle()
|
||||
})
|
||||
|
||||
//点击跳转到更多结果页面
|
||||
const toMoreResultPage = (searchResultKey, searchText) => {
|
||||
@ -32,9 +42,24 @@ const clickSearchItem = (
|
||||
searchResultKey,
|
||||
talk_type,
|
||||
receiver_id,
|
||||
res,
|
||||
) => {
|
||||
console.log(searchResultKey)
|
||||
if (searchResultKey === 'general_infos') {
|
||||
const result = JSON.parse(decodeURIComponent(res))
|
||||
console.log(result)
|
||||
if (searchResultKey === 'user_infos') {
|
||||
|
||||
|
||||
} else if (searchResultKey === 'combinedGroup') {
|
||||
dialogueStore.setDialogue({
|
||||
name: result.name || result.group_name,
|
||||
talk_type: result.type || 2,
|
||||
receiver_id: result.id || result.group_id,
|
||||
})
|
||||
uni.navigateTo({
|
||||
url: '/pages/dialog/index',
|
||||
})
|
||||
} else if (searchResultKey === 'general_infos') {
|
||||
uni.navigateTo({
|
||||
url:
|
||||
'/pages/search/moreResult/moreResultDetail?searchText=' +
|
||||
|
@ -24,6 +24,10 @@ import {
|
||||
} from '@/api/search/index'
|
||||
import { reactive } from 'vue'
|
||||
|
||||
import { useDialogueStore } from '@/store'
|
||||
|
||||
const dialogueStore = useDialogueStore()
|
||||
|
||||
const state = reactive({
|
||||
apiRequest: Function,
|
||||
apiParams: String,
|
||||
@ -86,8 +90,27 @@ const lastIdChange = (last_id, last_group_id, last_member_id) => {
|
||||
}
|
||||
|
||||
//点击了搜索结果项
|
||||
const clickSearchItem = (searchText) => {
|
||||
if (state.searchResultKey === 'general_infos') {
|
||||
const clickSearchItem = (
|
||||
searchText,
|
||||
searchResultKey,
|
||||
talk_type,
|
||||
receiver_id,
|
||||
res,
|
||||
) => {
|
||||
console.log(state.searchResultKey)
|
||||
const result = JSON.parse(decodeURIComponent(res))
|
||||
console.log(result)
|
||||
if (state.searchResultKey === 'user_infos') {
|
||||
} else if (state.searchResultKey === 'combinedGroup') {
|
||||
dialogueStore.setDialogue({
|
||||
name: result.name || result.group_name,
|
||||
talk_type: result.type || 2,
|
||||
receiver_id: result.id || result.group_id,
|
||||
})
|
||||
uni.navigateTo({
|
||||
url: '/pages/dialog/index',
|
||||
})
|
||||
} else if (state.searchResultKey === 'general_infos') {
|
||||
uni.navigateTo({
|
||||
url: '/pages/search/moreResult/moreResultDetail?searchText=' + searchText,
|
||||
})
|
||||
|
@ -20,13 +20,16 @@ import searchList from '../components/searchList.vue'
|
||||
import { onLoad } from '@dcloudio/uni-app'
|
||||
import { ServeTalkRecord } from '@/api/search/index'
|
||||
import { reactive } from 'vue'
|
||||
import { useDialogueStore } from "@/store";
|
||||
import { useDialogueStore, useUserStore } from '@/store'
|
||||
import lodash from 'lodash'
|
||||
|
||||
const dialogueStore = useDialogueStore();
|
||||
const dialogueStore = useDialogueStore()
|
||||
const userStore = useUserStore()
|
||||
|
||||
const state = reactive({
|
||||
apiParams: String,
|
||||
searchText: String,
|
||||
uid: computed(() => userStore.uid), //当前用户id
|
||||
})
|
||||
|
||||
onLoad((options) => {
|
||||
@ -80,15 +83,42 @@ const clickSearchItem = (
|
||||
receiver_id,
|
||||
res,
|
||||
) => {
|
||||
console.log(searchResultKey)
|
||||
let result = JSON.parse(decodeURIComponent(res))
|
||||
console.log(result)
|
||||
let receiverInfo = lodash.cloneDeep(result)
|
||||
if (receiverInfo.talk_type === 1) {
|
||||
//单聊才需此判断
|
||||
if (receiverInfo.user_id === state.uid) {
|
||||
//发送人是自己,接收人不需要变
|
||||
}
|
||||
if (receiverInfo.receiver_id === state.uid) {
|
||||
//接收人是自己,这里需要变成对方
|
||||
let temp_id = receiverInfo.receiver_id
|
||||
let temp_name = receiverInfo.receiver_name
|
||||
let temp_avatar = receiverInfo.receiver_avatar
|
||||
receiverInfo.receiver_id = receiverInfo.user_id
|
||||
receiverInfo.receiver_name = receiverInfo.user_name
|
||||
receiverInfo.receiver_avatar = receiverInfo.user_avatar
|
||||
receiverInfo.user_id = temp_id
|
||||
receiverInfo.user_name = temp_name
|
||||
receiverInfo.user_avatar = temp_avatar
|
||||
}
|
||||
}
|
||||
dialogueStore.setDialogue({
|
||||
name: result.receiver_name,
|
||||
name: receiverInfo.receiver_name,
|
||||
talk_type: talk_type,
|
||||
receiver_id: receiver_id,
|
||||
})
|
||||
uni.navigateTo({
|
||||
url: '/pages/dialog/index?msgInfo=' + res,
|
||||
receiver_id: receiverInfo.receiver_id,
|
||||
})
|
||||
if (searchResultKey === 'talk_record_infos_receiver') {
|
||||
uni.navigateTo({
|
||||
url: '/pages/dialog/index',
|
||||
})
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: '/pages/dialog/index?msgInfo=' + res,
|
||||
})
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped lang="scss"></style>
|
||||
|
@ -351,7 +351,7 @@ onMounted(() => {
|
||||
const ServeQueryTalkDate = (month) => {
|
||||
let params = {
|
||||
month: month,
|
||||
talk_type: 2, //1私聊2群聊
|
||||
talk_type: dialogueParams.talk_type, //1私聊2群聊
|
||||
receiver_id: state.receiver_id, //目标人id
|
||||
}
|
||||
const resp = ServeTalkDate(params)
|
||||
@ -477,12 +477,14 @@ const queryAllSearch = () => {
|
||||
if (data?.items?.length > 0) {
|
||||
data.items.forEach((item) => {
|
||||
item.dateTime = parseTime(item?.created_at, '{m}/{d}')
|
||||
item.extra.fileSize = fileFormatSize(item?.extra?.size)
|
||||
item.extra.typeText = item?.extra?.name
|
||||
? fileSuffix(item?.extra?.name)
|
||||
: ''
|
||||
item.extra.file_avatar = fileTypeAvatar(item?.extra?.typeText)
|
||||
console.log(item.extra.type)
|
||||
if (item?.extra) {
|
||||
item.extra.fileSize = fileFormatSize(item?.extra?.size)
|
||||
item.extra.typeText = item?.extra?.name
|
||||
? fileSuffix(item?.extra?.name)
|
||||
: ''
|
||||
item.extra.file_avatar = fileTypeAvatar(item?.extra?.typeText)
|
||||
console.log(item.extra.type)
|
||||
}
|
||||
let year = new Date(item.created_at).getFullYear()
|
||||
let month = new Date(item.created_at).getMonth() + 1
|
||||
let dateMonth =
|
||||
|
@ -4,8 +4,8 @@ import { userInfoApi } from "@/api/user";
|
||||
|
||||
import {ref} from 'vue'
|
||||
export const useAuth = createGlobalState(() => {
|
||||
// const token = useStorage('token', '', uniStorage)
|
||||
const token = ref("79b5c732d96d2b27a48a99dfd4a5566c43aaa5796242e854ebe3ffc198d6876b9628e7b764d9af65ab5dbb2d517ced88170491b74b048c0ba827c0d3741462cb89dc59ed46653a449af837a8262941caaef1334d640773710f8cd96473bacfb190cba595a5d6a9c87d70f0999a3ebb41147213b31b4bdccffca66a56acf3baab5af0154f0dce360079f37709f78e13711036899344bddb0fb4cf0f2890287cb62c3fcbe33368caa5e213624577be8b8420ab75b1f50775ee16142a4321c5d56995f37354a66a969da98d95ba6e65d142ed097e04b411c1ebad2f62866d0ec7e1838420530a9941dbbcd00490199f8b8942f76b6f248056e8ae1134eda922b6ba0e5d75a00b2e866b08fec48a0d1de7e6dff8d8a40ac1eb46bf79c6331a1a3cd43209d09865bc0ee5dc9c23d2413e0d85d2380202ce4de1e128063926efae4cb1")
|
||||
const token = useStorage('token', '', uniStorage)
|
||||
// const token = ref("79b5c732d96d2b27a48a99dfd4a5566c43aaa5796242e854ebe3ffc198d6876b9628e7b764d9af65ab5dbb2d517ced88170491b74b048c0ba827c0d3741462cb89dc59ed46653a449af837a8262941caaef1334d640773710f8cd96473bacfb190cba595a5d6a9c87d70f0999a3ebb41147213b31b4bdccffca66a56acf3baab5af0154f0dce360079f37709f78e13711036899344bddb0fb4cf0f2890287cb62c3fcbe33368caa5e213624577be8b8420ab75b1f50775ee16142a4321c5d56995f37354a66a969da98d95ba6e65d142ed097e04b411c1ebad2f62866d0ec7e1838420530a9941dbbcd00490199f8b899eade812a32201a0a025612a7615c43b1ac91d78661c4e9b7d0ca9701e2ea152073ff929e2cc3f2f29c1934a8873a44886758d3cf16439dfda105c00c3c2e0d8748163a63ce7ce8e44f599b42a89d2b6")
|
||||
const refreshToken = useStorage('refreshToken', '', uniStorage)
|
||||
const userInfo = useStorage('userInfo', {}, uniStorage)
|
||||
const leaderList = useStorage('leaderList', [], uniStorage)
|
||||
|
@ -48,6 +48,9 @@ export const useDialogueStore = defineStore('dialogue', {
|
||||
// 是否显示会话列表
|
||||
isShowSessionList: true,
|
||||
|
||||
//是否已被解散
|
||||
isDismiss: false,
|
||||
|
||||
// 群成员列表
|
||||
members: [],
|
||||
|
||||
@ -98,6 +101,8 @@ export const useDialogueStore = defineStore('dialogue', {
|
||||
this.unreadBubble = 0
|
||||
this.isShowEditor = data?.is_robot === 0
|
||||
|
||||
this.isDismiss = data?.is_dismiss === 1 ? true : false
|
||||
|
||||
this.members = []
|
||||
if (data.talk_type == 2) {
|
||||
this.updateGroupMembers()
|
||||
|
@ -7,6 +7,7 @@ import { createGlobalState, useStorage } from '@vueuse/core'
|
||||
import { uniStorage } from '@/utils/uniStorage.js'
|
||||
|
||||
export const useDialogueListStore = createGlobalState(() => {
|
||||
// const dialogueList = useStorage('dialogueList', [], uniStorage)
|
||||
const dialogueList = ref([])
|
||||
const zpagingRef = ref()
|
||||
const virtualList = ref([])
|
||||
@ -106,7 +107,18 @@ export const useDialogueListStore = createGlobalState(() => {
|
||||
const addChatRecord = (indexName, item) => {
|
||||
const dialogue = lodash.cloneDeep(useDialogueStore())
|
||||
if (dialogue?.index_name === indexName) {
|
||||
zpagingRef.value?.addChatRecordData(item, false, false)
|
||||
const index = virtualList.value.findIndex(
|
||||
(v) => v?.file_num === item?.file_num,
|
||||
)
|
||||
if (index > -1) {
|
||||
// 保持响应性的同时替换整个对象
|
||||
virtualList.value.splice(index, 1, {
|
||||
...virtualList.value[index], // 保留原有不需要修改的字段
|
||||
...item, // 覆盖需要更新的字段
|
||||
})
|
||||
} else {
|
||||
zpagingRef.value?.addChatRecordData(item, false, false)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -104,7 +104,7 @@ export const useUploadsStore = defineStore('uploads', {
|
||||
console.log(msgId,'msgId');
|
||||
|
||||
updateUploadProgress(msgId,100)
|
||||
this.sendUploadMessage(item)
|
||||
this.sendUploadMessage(item, msgId)
|
||||
} else {
|
||||
const percentage = (item.uploadIndex / item.files.length) * 100
|
||||
item.percentage = percentage.toFixed(1)
|
||||
@ -124,11 +124,12 @@ export const useUploadsStore = defineStore('uploads', {
|
||||
},
|
||||
|
||||
// 发送上传消息
|
||||
sendUploadMessage(item: any) {
|
||||
sendUploadMessage(item: any, file_num: String) {
|
||||
ServeSendTalkFile({
|
||||
upload_id: item.upload_id,
|
||||
receiver_id: item.receiver_id,
|
||||
talk_type: item.talk_type
|
||||
talk_type: item.talk_type,
|
||||
file_num: file_num
|
||||
})
|
||||
}
|
||||
}
|
||||
|
@ -151,5 +151,7 @@
|
||||
"button.text.close": "关闭",
|
||||
"choose.deps.all": "全部",
|
||||
"choose.deps.current": "当前",
|
||||
"chat.mention.select": "选择提醒的人"
|
||||
"chat.mention.select": "选择提醒的人",
|
||||
"do.phone.call": "拨打",
|
||||
"popup.title.phone": "电话"
|
||||
}
|
||||
|
@ -64,7 +64,7 @@ export function clipboard(text, callback) {
|
||||
|
||||
export async function clipboardImage(src, callback) {
|
||||
const { state } = await navigator.permissions.query({
|
||||
name: 'clipboard-write'
|
||||
name: 'clipboard-write',
|
||||
})
|
||||
|
||||
if (state != 'granted') return
|
||||
@ -77,8 +77,8 @@ export async function clipboardImage(src, callback) {
|
||||
if (blob.type == 'image/png') {
|
||||
await navigator.clipboard.write([
|
||||
new ClipboardItem({
|
||||
[blob.type]: blob
|
||||
})
|
||||
[blob.type]: blob,
|
||||
}),
|
||||
])
|
||||
|
||||
return callback()
|
||||
@ -112,7 +112,7 @@ export async function clipboardImage(src, callback) {
|
||||
URL.revokeObjectURL(objectURL)
|
||||
},
|
||||
'image/png',
|
||||
1
|
||||
1,
|
||||
)
|
||||
}
|
||||
} catch (err) {
|
||||
@ -180,13 +180,13 @@ export function getVideoImage(file, time = 1) {
|
||||
width: video.videoWidth,
|
||||
height: video.videoHeight,
|
||||
duration: video.duration,
|
||||
file: null
|
||||
file: null,
|
||||
}
|
||||
|
||||
canvas.toBlob((blob) => {
|
||||
data.file = new File([blob], 'image.jpeg', {
|
||||
type: blob.type,
|
||||
lastModified: Date.now()
|
||||
lastModified: Date.now(),
|
||||
})
|
||||
|
||||
URL.revokeObjectURL(objectURL)
|
||||
@ -196,3 +196,20 @@ export function getVideoImage(file, time = 1) {
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
//处理webview样式
|
||||
export function handleSetWebviewStyle(hasTabBar) {
|
||||
const setWebviewStyle = () => {
|
||||
const webview = plus.webview.currentWebview()
|
||||
webview.setStyle({
|
||||
bottom: hasTabBar ? webview.tabBarHeight : 0,
|
||||
})
|
||||
}
|
||||
if (typeof plus !== 'undefined') {
|
||||
setWebviewStyle()
|
||||
} else {
|
||||
document.addEventListener('plusready', () => {
|
||||
setWebviewStyle()
|
||||
})
|
||||
}
|
||||
}
|
||||
|
@ -38,13 +38,14 @@ export function formatTalkItem(params) {
|
||||
is_disturb: 0,
|
||||
is_top: 0,
|
||||
is_online: 0,
|
||||
is_dismiss: 0,
|
||||
is_robot: 0,
|
||||
unread_num: 0,
|
||||
content: '......',
|
||||
draft_text: '',
|
||||
msg_text: '',
|
||||
index_name: '',
|
||||
updated_at: parseTime(new Date())
|
||||
updated_at: parseTime(new Date()),
|
||||
}
|
||||
|
||||
options = { ...options, ...params }
|
||||
|
@ -7,7 +7,7 @@ const request = axios.create({
|
||||
baseURL: import.meta.env.VITE_BASEURL,
|
||||
|
||||
// 请求超时时间
|
||||
timeout: 10000
|
||||
timeout: 60000
|
||||
})
|
||||
|
||||
let once = false
|
||||
|
Loading…
Reference in New Issue
Block a user