新增 全局JS错误监控模块,集成WebHook上报功能

This commit is contained in:
yuantao
2025-12-01 14:40:51 +08:00
parent d6957e7f36
commit bfcf289acb
8 changed files with 837 additions and 37 deletions

View File

@@ -2,6 +2,7 @@ import App from './App'
import uviewPlus from '/uview-plus'
import globalMixin from './mixins/global'
import store from './store'
import tool from './common/utils/tool'
import { createSSRApp } from 'vue'
import './uni.promisify.adaptor'
@@ -17,5 +18,13 @@ export function createApp() {
app.use(uviewPlus)
app.use(globalMixin)
app.use(store)
// 初始化全局错误监控
tool.initErrorMonitor({
enableGlobalError: true,
enablePromiseError: true,
enableConsoleError: false, // 可选开启console错误监控
})
return { app }
}