This commit is contained in:
parent
4b59b1a18d
commit
06a2e6e4ac
|
|
@ -62,6 +62,8 @@ export const getUpdateUrl = (env: string) => {
|
|||
switch (env) {
|
||||
case 'xy':
|
||||
return 'https://meeting-api.23544.com/meeting/xysz'
|
||||
case 'development':
|
||||
return 'http://192.168.2.9:8827'
|
||||
default:
|
||||
return 'https://meeting-api.23544.com/meeting/update'
|
||||
}
|
||||
|
|
@ -70,6 +72,8 @@ export const getTitle = (env: string) => {
|
|||
switch (env) {
|
||||
case 'xy':
|
||||
return '湖北襄阳四中教研平台'
|
||||
case 'development':
|
||||
return '智汇享'
|
||||
default:
|
||||
return '智汇享'
|
||||
}
|
||||
|
|
@ -91,7 +95,7 @@ export const compareVersions = (version1: string, version2: string): number => {
|
|||
}
|
||||
|
||||
export const isVersion = (callBack: Function) => {
|
||||
axios.get(import.meta.env.VITE_ENV !== 'development' ? 'https://meeting-api.23544.com/meeting/update' : 'http://192.168.2.9:8827/latest.yml').then(res => {
|
||||
axios.get(`${getUpdateUrl(import.meta.env.VITE_ENV)}/latest.yml`).then(res => {
|
||||
if (res.status === 200 && res.data) {
|
||||
const data = yaml.load(res.data); // 解析 YAML 内容
|
||||
window.electron.getVersion().then(req => {
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@ module.exports = {
|
|||
switch (env) {
|
||||
case 'xy':
|
||||
return 'https://meeting-api.23544.com/meeting/xysz'
|
||||
case 'development':
|
||||
return 'http://192.168.2.9:8827'
|
||||
default:
|
||||
return 'https://meeting-api.23544.com/meeting/update'
|
||||
}
|
||||
|
|
@ -11,6 +13,8 @@ module.exports = {
|
|||
switch (env) {
|
||||
case 'xy':
|
||||
return '湖北襄阳四中教研平台'
|
||||
case 'development':
|
||||
return '智汇享'
|
||||
default:
|
||||
return '智汇享'
|
||||
}
|
||||
|
|
@ -19,6 +23,8 @@ module.exports = {
|
|||
switch (env) {
|
||||
case 'xy':
|
||||
return 'icon54'
|
||||
case 'development':
|
||||
return 'icon'
|
||||
default:
|
||||
return 'icon'
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue