更新.env.test文件中的API地址,调整FileMessage.vue组件的样式,增加高度和灵活性,优化auth.js中的token获取逻辑,增强MultiSelectFooter.vue中的批量删除功能,添加确认框提示。
This commit is contained in:
parent
57f169ca78
commit
5bda2be585
10
env/.env.test
vendored
10
env/.env.test
vendored
@ -2,10 +2,10 @@ ENV = 'development'
|
||||
|
||||
VITE_BASE=/
|
||||
VUE_APP_PREVIEW=false
|
||||
VITE_BASE_API=http://192.168.88.21:9503
|
||||
VITE_EPR_BASEURL=http://114.218.158.24:9020
|
||||
VITE_SOCKET_API=ws://192.168.88.21:9504
|
||||
# VITE_BASE_API=http://114.218.158.24:8503
|
||||
# VITE_SOCKET_API=ws://114.218.158.24:8504
|
||||
#VITE_BASE_API=http://192.168.88.21:9503
|
||||
|
||||
#VITE_SOCKET_API=ws://192.168.88.21:9504
|
||||
VITE_BASE_API=http://114.218.158.24:8503
|
||||
VITE_SOCKET_API=ws://114.218.158.24:8504
|
||||
VITE_EPR_BASEURL=http://114.218.158.24:9020
|
||||
VUE_APP_WEBSITE_NAME=""
|
49
src/components/confirm-box/index.vue
Normal file
49
src/components/confirm-box/index.vue
Normal file
@ -0,0 +1,49 @@
|
||||
<script setup>
|
||||
import { ref, watch } from 'vue'
|
||||
import XNModal from '@/components/x-naive-ui/x-n-modal/index.vue'
|
||||
const emit = defineEmits(['cancel','confirm'])
|
||||
const show=defineModel('show')
|
||||
const props = defineProps({
|
||||
title:{
|
||||
type:String,
|
||||
default:'提示'
|
||||
},
|
||||
content:{
|
||||
type:String,
|
||||
default:'内容'
|
||||
},
|
||||
cancelText:{
|
||||
type:String,
|
||||
default:'取消'
|
||||
},
|
||||
confirmText:{
|
||||
type:String,
|
||||
default:'确定'
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
||||
<XNModal v-model:show="show" :closable="false" class="w-724px" content-style="padding:0px" @after-leave="emit('after-leave')">
|
||||
<div class="flex flex-col w-full px-25px pb-49px">
|
||||
<div class="text-20px text-#1F2225 w-full text-center border-b-1px border-b-solid border-b-#E9E9E9 py-25px">{{ title }}</div>
|
||||
<div class="py-60px text-center text-20px text-#1F2225">
|
||||
{{ content }}
|
||||
</div>
|
||||
<div class="flex w-full justify-center">
|
||||
<n-button color="#C7C7C9" class="text-14px text-#fff w-161px h-34px mr-10px"
|
||||
@click="() => { show=false; emit('cancel') }"
|
||||
>{{ cancelText }}</n-button>
|
||||
<n-button color="#46299D" class="text-14px text-#fff w-161px h-34px"
|
||||
@click="() => { show=false; emit('confirm') }"
|
||||
>{{ confirmText }}</n-button>
|
||||
</div>
|
||||
</div>
|
||||
</XNModal>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
</style>
|
32
src/components/confirm-box/service.js
Normal file
32
src/components/confirm-box/service.js
Normal file
@ -0,0 +1,32 @@
|
||||
import { createVNode, nextTick, render } from 'vue'
|
||||
import ConfirmBox from './index.vue'
|
||||
|
||||
export function confirmBox(options) {
|
||||
return new Promise((resolve, reject) => {
|
||||
const container = document.createElement('div')
|
||||
document.body.appendChild(container)
|
||||
|
||||
const props = {
|
||||
...options,
|
||||
show: false,
|
||||
onCancel: () => {
|
||||
reject()
|
||||
|
||||
},
|
||||
onAfterLeave:()=>{
|
||||
render(null, container)
|
||||
document.body.removeChild(container)
|
||||
},
|
||||
onConfirm: () => {
|
||||
resolve()
|
||||
|
||||
},
|
||||
}
|
||||
|
||||
const vnode = createVNode(ConfirmBox, props)
|
||||
render(vnode, container)
|
||||
nextTick(() => {
|
||||
vnode.component.props.show = true
|
||||
})
|
||||
})
|
||||
}
|
@ -113,7 +113,7 @@ const handleDownload = () => {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="file-message" @click="handleClick">
|
||||
<div class="file-message flex flex-col" @click="handleClick">
|
||||
<!-- 文件头部信息 -->
|
||||
<div class="file-header">
|
||||
<!-- 文件名 -->
|
||||
@ -163,7 +163,7 @@ const handleDownload = () => {
|
||||
</div>
|
||||
</div>
|
||||
<!-- 文件大小信息 -->
|
||||
<div class="flex justify-between items-center">
|
||||
<div class="flex justify-between items-center grow-1">
|
||||
<div class="file-size">{{ fileFormatSize(extra.size) }}</div>
|
||||
<div class="flex items-center" v-if="!extra.is_uploading">
|
||||
<div class="flex items-center" @click.stop="handleDownload"> <img class="w-11.7px h-11.74px mr-7px" src="@/assets/image/dofd.png" alt=""> <span class="text-12px text-#46299D">下载</span></div>
|
||||
@ -206,6 +206,7 @@ const handleDownload = () => {
|
||||
}
|
||||
|
||||
.file-icon-container {
|
||||
height: 48px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
@ -229,7 +230,6 @@ const handleDownload = () => {
|
||||
.file-size {
|
||||
color: #747474;
|
||||
font-size: 12px;
|
||||
padding: 5px 0 11px;
|
||||
}
|
||||
|
||||
.circle-progress-container {
|
||||
|
@ -18,7 +18,7 @@ export function isLoggedIn() {
|
||||
*/
|
||||
export function getAccessToken() {
|
||||
// return storage.get(AccessToken) || ''
|
||||
return JSON.parse(localStorage.getItem('token'))||'79b5c732d96d2b27a48a99dfd4a5566c43aaa5796242e854ebe3ffc198d6876b9628e7b764d9af65ab5dbb2d517ced88170491b74b048c0ba827c0d3741462cb89dc59ed46653a449af837a8262941caaef1334d640773710f8cd96473bacfb190cba595a5d6a9c87d70f0999a3ebb41147213b31b4bdccffca66a56acf3baab5af0154f0dce360079f37709f78e13711036899344bddb0fb4cf0f2890287cb62c3fcbe33368caa5e213624577be8b8420ab75b1f50775ee16142a4321c5d56995f37354a66a969da98d95ba6e65d142ed097e04b411c1ebad2f62866d0ec7e1838420530a9941dbbcd00490199f8b89eb1ea28c6224649ca60080b7243593f7462085111e3bd3868564aa9a65a16e171ba833d4955a4555f3376cb64b66eb2304dafb03f182fe1719d09e84d345954edbf75b17358196e1378893c8c97b56a6'
|
||||
return JSON.parse(localStorage.getItem('token'))||'46d71a72d8d845ad7ed23eba9bdde260e635407190c2ce1bf7fd22088e41682ea07773ec65cae8946d2003f264d55961f96e0fc5da10eb96d3a348c1664e9644ce2108c311309f398ae8ea1b8200bfd490e5cb6e8c52c9e5d493cbabb163368f8351420451a631dbfa749829ee4cda49b77b5ed2d3dced5d0f2b7dd9ee76ba5465c84a17c23af040cd92b6b2a4ea48befbb5c729dcdad0a9c9668befe84074cc24f78899c1d947f8e7f94c7eda5325b8ed698df729e76febb98549ef3482ae942fb4f4a1c92d21836fa784728f0c5483aab2760a991b6b36e6b10c84f840a6433a6ecc31dee36e8f1c6158818bc89d22cb993eb73d0e2c0e0c8f627f3a8550a8e846cd26e5ec6abe0b57b0470a33b33c4b097d9fc113aa020f9751b55320b4f6b3f812fa4cc357f90f8db108a250b14e477c1e1b2292799d3c8831f7a47de2d6'
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1,7 +1,7 @@
|
||||
<script lang="ts" setup>
|
||||
import { ref } from 'vue'
|
||||
import { useDialogueStore } from '@/store'
|
||||
import { Share, ShareThree, Delete, Close } from '@icon-park/vue-next'
|
||||
import {confirmBox} from '@/components/confirm-box/service.js'
|
||||
|
||||
import ContactModal from '@/components/user/ContactModal.vue'
|
||||
|
||||
@ -31,12 +31,19 @@ const onSingleForward = () => {
|
||||
}
|
||||
|
||||
const onMultiDelete = () => {
|
||||
// 批量删除
|
||||
confirmBox({
|
||||
content:'确定删除聊天记录',
|
||||
confirmText:'删除'
|
||||
}).then(()=>{
|
||||
let msgIds = dialogueStore.selectItems.map((item: any) => item.msg_id)
|
||||
|
||||
if (!msgIds.length) return
|
||||
if (!msgIds.length) return
|
||||
|
||||
dialogueStore.ApiDeleteRecord(msgIds)
|
||||
|
||||
})
|
||||
// 批量删除
|
||||
|
||||
dialogueStore.ApiDeleteRecord(msgIds)
|
||||
}
|
||||
|
||||
const onContactModal = (data: { receiver_id: number; talk_type: number }[]) => {
|
||||
|
Loading…
Reference in New Issue
Block a user