This commit is contained in:
阿梦 2026-05-27 20:03:56 +09:00
commit dc501d8f87
3 changed files with 14 additions and 25 deletions

View File

@ -254,30 +254,21 @@ const globalApi = {
// 检查APK版本 // 检查APK版本
getVersions: async (params: anyObj) => { getVersions: async (params: anyObj) => {
const url = location.href params = {
if ( ...(params || {}),
url.includes('localhost') || magic: str.getMagic(),
url.includes('192.168.') ||
url.includes('127.0.0.1') ||
url.includes('lingxixue.com')
) {
params = {
magic: str.getMagic(),
...(params || {}),
}
} }
return get<any>('/apkManagement/list', params) return get<any>('/apkManagement/list', params)
}, },
// 检查版本 // 检查版本
checkVersion: (params: anyObj) => checkVersion: (params: anyObj) => {
http.request({ params = {
url: '/apkManagement/queryLatest', ...(params || {}),
headers: { magic: str.getMagic(),
Authorization: '', }
}, return get<any>('/apkManagement/queryLatest', params)
params, },
}),
// 更新APPs // 更新APPs
updateApps: (data: anyObj) => updateApps: (data: anyObj) =>

View File

@ -84,7 +84,7 @@ const startStudentShareScreenLive = (msg: anyObj) => {
stopClassMonitor() stopClassMonitor()
monitorSessionId = sessionKey monitorSessionId = sessionKey
monitorState = 1 monitorState = 1
showMonitorTip('已进入课堂监控状态') // showMonitorTip('已进入课堂监控状态')
if (!applyStudentShareStart(msg)) { if (!applyStudentShareStart(msg)) {
monitorState = 0 monitorState = 0
monitorSessionId = '' monitorSessionId = ''
@ -112,7 +112,7 @@ export const stopClassMonitor = (showTip = false) => {
$XXL.stopStudentShareScreen() $XXL.stopStudentShareScreen()
} }
if (showTip && isMonitoring) { if (showTip && isMonitoring) {
showMonitorTip('已结束课堂监控') // showMonitorTip('已结束课堂监控')
} }
monitorSessionId = '' monitorSessionId = ''
monitorState = 0 monitorState = 0
@ -133,7 +133,7 @@ const startClassMonitor = (msg: anyObj) => {
stopClassMonitor() stopClassMonitor()
monitorSessionId = String(sessionId) monitorSessionId = String(sessionId)
monitorState = 1 monitorState = 1
showMonitorTip('已进入课堂监控状态') // showMonitorTip('已进入课堂监控状态')
if (!applyStudentShareStart(msg)) { if (!applyStudentShareStart(msg)) {
monitorState = 0 monitorState = 0
monitorSessionId = '' monitorSessionId = ''

View File

@ -214,9 +214,7 @@ export const globalStore = defineStore('global', () => {
// 检测更新 // 检测更新
const checkStudyMachineUpdate = async (checkWeb = true) => { const checkStudyMachineUpdate = async (checkWeb = true) => {
if (isNotStudyMachine) return if (isNotStudyMachine) return
const { const res = await globalApi.checkVersion({
data: { data: res },
} = await globalApi.checkVersion({
model: getManufacturer(), model: getManufacturer(),
}) })
system.latestVersion = res system.latestVersion = res