diff --git a/src/api/global.ts b/src/api/global.ts index ebfe748..213a9b2 100644 --- a/src/api/global.ts +++ b/src/api/global.ts @@ -254,30 +254,21 @@ const globalApi = { // 检查APK版本 getVersions: async (params: anyObj) => { - const url = location.href - if ( - url.includes('localhost') || - url.includes('192.168.') || - url.includes('127.0.0.1') || - url.includes('lingxixue.com') - ) { - params = { - magic: str.getMagic(), - ...(params || {}), - } + params = { + ...(params || {}), + magic: str.getMagic(), } return get('/apkManagement/list', params) }, // 检查版本 - checkVersion: (params: anyObj) => - http.request({ - url: '/apkManagement/queryLatest', - headers: { - Authorization: '', - }, - params, - }), + checkVersion: (params: anyObj) => { + params = { + ...(params || {}), + magic: str.getMagic(), + } + return get('/apkManagement/queryLatest', params) + }, // 更新APPs updateApps: (data: anyObj) => diff --git a/src/hooks/useClassMonitor.ts b/src/hooks/useClassMonitor.ts index 6158363..0bebfdf 100644 --- a/src/hooks/useClassMonitor.ts +++ b/src/hooks/useClassMonitor.ts @@ -84,7 +84,7 @@ const startStudentShareScreenLive = (msg: anyObj) => { stopClassMonitor() monitorSessionId = sessionKey monitorState = 1 - showMonitorTip('已进入课堂监控状态') + // showMonitorTip('已进入课堂监控状态') if (!applyStudentShareStart(msg)) { monitorState = 0 monitorSessionId = '' @@ -112,7 +112,7 @@ export const stopClassMonitor = (showTip = false) => { $XXL.stopStudentShareScreen() } if (showTip && isMonitoring) { - showMonitorTip('已结束课堂监控') + // showMonitorTip('已结束课堂监控') } monitorSessionId = '' monitorState = 0 @@ -133,7 +133,7 @@ const startClassMonitor = (msg: anyObj) => { stopClassMonitor() monitorSessionId = String(sessionId) monitorState = 1 - showMonitorTip('已进入课堂监控状态') + // showMonitorTip('已进入课堂监控状态') if (!applyStudentShareStart(msg)) { monitorState = 0 monitorSessionId = '' diff --git a/src/stores/global.ts b/src/stores/global.ts index 0b21ca5..e08e837 100644 --- a/src/stores/global.ts +++ b/src/stores/global.ts @@ -214,9 +214,7 @@ export const globalStore = defineStore('global', () => { // 检测更新 const checkStudyMachineUpdate = async (checkWeb = true) => { if (isNotStudyMachine) return - const { - data: { data: res }, - } = await globalApi.checkVersion({ + const res = await globalApi.checkVersion({ model: getManufacturer(), }) system.latestVersion = res