退出清理
This commit is contained in:
@@ -63,3 +63,4 @@ export function prologue() {
|
|||||||
export function comment() {
|
export function comment() {
|
||||||
return getAxios({ url: 'api/common/comment' })
|
return getAxios({ url: 'api/common/comment' })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ import { getToken, setToken, setUser, setUserPass, getUserPass } from '@/stores/
|
|||||||
import { ElLoading, ElMessage } from 'element-plus';
|
import { ElLoading, ElMessage } from 'element-plus';
|
||||||
|
|
||||||
|
|
||||||
let version = ref('1.5.4');
|
let version = ref('1.5.5');
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,11 @@
|
|||||||
<div class="main">
|
<div class="main">
|
||||||
<el-scrollbar class="left"> <!-- 左边栏 -->
|
<el-scrollbar class="left"> <!-- 左边栏 -->
|
||||||
<LeftToolbar :buttons="buttons" :active-key="activeKey" :is-locked="isLocked" @click="handleBtnClick" />
|
<LeftToolbar :buttons="buttons" :active-key="activeKey" :is-locked="isLocked" @click="handleBtnClick" />
|
||||||
<el-button style="position: absolute;left: 20px; bottom: 20px;" @click="showHostDlg = true">执行主播库</el-button>
|
<div style="position: absolute;left: 20px; bottom: 20px;">
|
||||||
|
<el-button @click="showHostDlg = true">执行主播库</el-button>
|
||||||
|
<el-button type="info" @click="uploadLogFile">上传日志</el-button>
|
||||||
|
</div>
|
||||||
|
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
<!-- 中间手机区域 -->
|
<!-- 中间手机区域 -->
|
||||||
<div class="content" @click.self="selectedDevice = 999">
|
<div class="content" @click.self="selectedDevice = 999">
|
||||||
@@ -65,7 +69,7 @@ import {
|
|||||||
setphoneXYinfo, getphoneXYinfo, getUser,
|
setphoneXYinfo, getphoneXYinfo, getUser,
|
||||||
getHostList, setHostList, addToHostList, getContentpriList,
|
getHostList, setHostList, addToHostList, getContentpriList,
|
||||||
setContentpriList, getContentList, setContentList,
|
setContentpriList, getContentList, setContentList,
|
||||||
setsessionId, getsessionId
|
setsessionId, getsessionId, getToken
|
||||||
} from '@/stores/storage'
|
} from '@/stores/storage'
|
||||||
import { toBufferBtn, stringToUtf8ByteArray, getClipboard, setClipboard, bufferToString, startsWithHeader, trimLongArray, base64ToBinary, toBuffer } from '@/utils/bufferUtils';
|
import { toBufferBtn, stringToUtf8ByteArray, getClipboard, setClipboard, bufferToString, startsWithHeader, trimLongArray, base64ToBinary, toBuffer } from '@/utils/bufferUtils';
|
||||||
import { createWsActions } from '@/utils/wsActions';
|
import { createWsActions } from '@/utils/wsActions';
|
||||||
@@ -77,7 +81,7 @@ import ChatDialog from '@/components/ChatDialog.vue'
|
|||||||
// import { splitArray } from '@/utils/arrUtil' //分割数组 分配主播 已废弃
|
// import { splitArray } from '@/utils/arrUtil' //分割数组 分配主播 已废弃
|
||||||
import { chooseFile } from '@/utils/fileUtil'
|
import { chooseFile } from '@/utils/fileUtil'
|
||||||
import { connectSSE } from '@/utils/sseUtils'
|
import { connectSSE } from '@/utils/sseUtils'
|
||||||
import { prologue, comment } from '@/api/account';
|
import { prologue, comment, } from '@/api/account';
|
||||||
import { createTaskQueue } from '@/composables/useTaskQueue' //创建任务
|
import { createTaskQueue } from '@/composables/useTaskQueue' //创建任务
|
||||||
import { useCanvasPointer } from '@/composables/useCanvasPointer' //canvas 初始化 点击转换
|
import { useCanvasPointer } from '@/composables/useCanvasPointer' //canvas 初始化 点击转换
|
||||||
import { attachTrimmerForIndex } from '@/composables/useVideoStream' //修剪器
|
import { attachTrimmerForIndex } from '@/composables/useVideoStream' //修剪器
|
||||||
@@ -951,6 +955,10 @@ const handleVisibilityChange = () => {
|
|||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
// document.addEventListener("visibilitychange", handleVisibilityChange);
|
// document.addEventListener("visibilitychange", handleVisibilityChange);
|
||||||
|
// getExpiredTime().then((res) => {
|
||||||
|
// console.log('time:', res);
|
||||||
|
// })
|
||||||
|
|
||||||
ObtainDeviceInformation();
|
ObtainDeviceInformation();
|
||||||
// window.addEventListener('keydown', (e) => {
|
// window.addEventListener('keydown', (e) => {
|
||||||
// // console.log('触发按键了 键盘事件有效', e)
|
// // console.log('触发按键了 键盘事件有效', e)
|
||||||
@@ -1066,6 +1074,7 @@ onBeforeUnmount(() => {
|
|||||||
// 组件卸载时清理
|
// 组件卸载时清理
|
||||||
onUnmounted(() => {
|
onUnmounted(() => {
|
||||||
console.log("卸载组件");
|
console.log("卸载组件");
|
||||||
|
td.disposeAll('logout')
|
||||||
cloesMonitor(); //关闭检测消息
|
cloesMonitor(); //关闭检测消息
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -1483,6 +1492,43 @@ function manualGc() {
|
|||||||
window.electronAPI.manualGc()
|
window.electronAPI.manualGc()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function uploadLogFile() {
|
||||||
|
try {
|
||||||
|
// 先弹出确认框
|
||||||
|
await ElMessageBox.confirm(
|
||||||
|
'确定要上传日志文件吗?',
|
||||||
|
'提示',
|
||||||
|
{
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning',
|
||||||
|
}
|
||||||
|
)
|
||||||
|
// 如果点了确定,就会走到这里
|
||||||
|
const loading = ElLoading.service({
|
||||||
|
lock: true,
|
||||||
|
text: '上传中...',
|
||||||
|
background: 'rgba(0, 0, 0, 0.7)',
|
||||||
|
})
|
||||||
|
const res = await window.electronAPI.uploadLogFile(userdata)
|
||||||
|
loading.close()
|
||||||
|
if (res.success) {
|
||||||
|
console.log("✅ 上传成功:", res)
|
||||||
|
ElMessage.success('✅ 上传成功')
|
||||||
|
} else {
|
||||||
|
console.error("❌ 上传失败:", res.msg)
|
||||||
|
ElMessage.error('❌ 上传失败: ' + (res.msg || '未知错误'))
|
||||||
|
}
|
||||||
|
} catch (err) {
|
||||||
|
// 如果用户点了取消,会进入这里
|
||||||
|
if (err === 'cancel' || err === 'close') {
|
||||||
|
ElMessage.info('已取消上传')
|
||||||
|
} else {
|
||||||
|
console.error("❌ 上传异常:", err)
|
||||||
|
ElMessage.error('❌ 上传异常: ' + err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user