调整日志上传

dev/supplier-email-drawer
Lei OT 9 months ago
parent b9a5446b92
commit b81ee33b9e

@ -1,4 +1,4 @@
import { loadScript } from '@/utils/commons'
import { loadScript, readWebsocketLog } from '@/utils/commons'
import { BUILD_VERSION, BUILD_DATE } from '@/config'
export const loadPageSpy = (title) => {
@ -32,6 +32,7 @@ export const loadPageSpy = (title) => {
// window.$harbor.upload({ clearCache: false, remark: '自动上传' }) // 上传日志 { clearCache: true, remark: '' }
// })
window.onerror = async function (msg, url, lineNo, columnNo, error) {
await readWebsocketLog()
// 上传最近 3 分钟的日志
const now = Date.now()
await window.$harbor.uploadPeriods({
@ -44,6 +45,7 @@ export const loadPageSpy = (title) => {
}
export const uploadPageSpyLog = async () => {
await readWebsocketLog()
// window.$pageSpy.triggerPlugins('onOfflineLog', 'upload');
if (window.$pageSpy) {
await window.$harbor.upload() // 上传日志 { clearCache: true, remark: '' }

@ -101,7 +101,6 @@ function AuthApp() {
} else {
messageApi.error('Failure')
}
clearWebsocketLog()
}
// /p...

Loading…
Cancel
Save