退出清理

This commit is contained in:
2025-08-26 13:03:08 +08:00
parent a8889e1ce6
commit 3a7c5556fd
3 changed files with 53 additions and 6 deletions

View File

@@ -62,4 +62,5 @@ export function prologue() {
//获取评论
export function comment() {
return getAxios({ url: 'api/common/comment' })
}
}

View File

@@ -79,7 +79,7 @@ import { getToken, setToken, setUser, setUserPass, getUserPass } from '@/stores/
import { ElLoading, ElMessage } from 'element-plus';
let version = ref('1.5.4');
let version = ref('1.5.5');
onMounted(() => {

View File

@@ -2,7 +2,11 @@
<div class="main">
<el-scrollbar class="left"> <!-- 左边栏 -->
<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>
<!-- 中间手机区域 -->
<div class="content" @click.self="selectedDevice = 999">
@@ -65,7 +69,7 @@ import {
setphoneXYinfo, getphoneXYinfo, getUser,
getHostList, setHostList, addToHostList, getContentpriList,
setContentpriList, getContentList, setContentList,
setsessionId, getsessionId
setsessionId, getsessionId, getToken
} from '@/stores/storage'
import { toBufferBtn, stringToUtf8ByteArray, getClipboard, setClipboard, bufferToString, startsWithHeader, trimLongArray, base64ToBinary, toBuffer } from '@/utils/bufferUtils';
import { createWsActions } from '@/utils/wsActions';
@@ -77,7 +81,7 @@ import ChatDialog from '@/components/ChatDialog.vue'
// import { splitArray } from '@/utils/arrUtil' //分割数组 分配主播 已废弃
import { chooseFile } from '@/utils/fileUtil'
import { connectSSE } from '@/utils/sseUtils'
import { prologue, comment } from '@/api/account';
import { prologue, comment, } from '@/api/account';
import { createTaskQueue } from '@/composables/useTaskQueue' //创建任务
import { useCanvasPointer } from '@/composables/useCanvasPointer' //canvas 初始化 点击转换
import { attachTrimmerForIndex } from '@/composables/useVideoStream' //修剪器
@@ -623,7 +627,7 @@ const initVideoStream = async (udid, index) => {
}, 800)
} else if (resData.type == 'tomy') {//打开主页
phoneXYinfo.value[index].tomy = { x: resData.x * iponeCoefficient.value[index].width, y: resData.y * iponeCoefficient.value[index].height }
} else if (resData.type == 'Attention') {//关注、打开私信
} else if (resData.type == 'Attention') {//关注、打开私信
phoneXYinfo.value[index].Attention = { x: resData.x * iponeCoefficient.value[index].width, y: resData.y * iponeCoefficient.value[index].height }
// LikesToCommentToComPush(deviceInformation.value[index].udid, index) //是否继续循环任务
} else if (resData.type == 'return') {//私信评论
@@ -951,6 +955,10 @@ const handleVisibilityChange = () => {
onMounted(() => {
// document.addEventListener("visibilitychange", handleVisibilityChange);
// getExpiredTime().then((res) => {
// console.log('time:', res);
// })
ObtainDeviceInformation();
// window.addEventListener('keydown', (e) => {
// // console.log('触发按键了 键盘事件有效', e)
@@ -1066,6 +1074,7 @@ onBeforeUnmount(() => {
// 组件卸载时清理
onUnmounted(() => {
console.log("卸载组件");
td.disposeAll('logout')
cloesMonitor(); //关闭检测消息
});
@@ -1483,6 +1492,43 @@ function 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>