优化更新检查失败文字提示
parent
da764721d9
commit
8a6ee68e58
|
@ -1,7 +1,7 @@
|
||||||
<template lang="pug">
|
<template lang="pug">
|
||||||
material-modal(:show="version.showModal" @close="handleClose")
|
material-modal(:show="version.showModal" @close="handleClose")
|
||||||
main(:class="$style.main" v-if="version.newVersion")
|
main(:class="$style.main" v-if="version.newVersion")
|
||||||
h2 {{ version.isError ? '🌟发现新版本🌟' : '🚀程序更新🚀'}}
|
h2 {{ version.isError ? isUnknow ? '❓ 版本信息获取失败 ❓' : '🌟发现新版本🌟' : '🚀程序更新🚀'}}
|
||||||
|
|
||||||
div.scroll(:class="$style.info")
|
div.scroll(:class="$style.info")
|
||||||
div(:class="$style.current")
|
div(:class="$style.current")
|
||||||
|
@ -16,7 +16,7 @@ material-modal(:show="version.showModal" @close="handleClose")
|
||||||
p(v-html="ver.desc")
|
p(v-html="ver.desc")
|
||||||
|
|
||||||
div(:class="$style.footer" v-if="version.isError")
|
div(:class="$style.footer" v-if="version.isError")
|
||||||
div(:class="$style.desc")
|
div(:class="$style.desc" v-if="!isUnknow")
|
||||||
p 发现有新版本啦,但是自动更新功能出问题了
|
p 发现有新版本啦,但是自动更新功能出问题了
|
||||||
p
|
p
|
||||||
| 如果你所用的软件是
|
| 如果你所用的软件是
|
||||||
|
@ -59,6 +59,9 @@ export default {
|
||||||
|
|
||||||
return arr
|
return arr
|
||||||
},
|
},
|
||||||
|
isUnknow() {
|
||||||
|
return this.version.newVersion.version == '0.0.0'
|
||||||
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
...mapMutations(['setVersionModalVisible', 'setSetting']),
|
...mapMutations(['setVersionModalVisible', 'setSetting']),
|
||||||
|
|
|
@ -6,10 +6,10 @@ export default {
|
||||||
getVersionInfo() {
|
getVersionInfo() {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
httpGet(`https://raw.githubusercontent.com/${author.name}/${name}/master/publish/version.json`, (err, resp, body) => {
|
httpGet(`https://raw.githubusercontent.com/${author.name}/${name}/master/publish/version.json`, (err, resp, body) => {
|
||||||
if (err) {
|
if (!err) {
|
||||||
return resolve({
|
return resolve({
|
||||||
version: '0.0.0',
|
version: '0.0.0',
|
||||||
desc: '<h3>版本获取失败</h3><ul><li>更新信息获取失败,可能是无法访问Github导致的,请手动检查更新!</li><li>检查方法:去设置-关于洛雪音乐打开<strong>开源地址</strong>或<strong>网盘地址</strong>查看<strong>版本号</strong>与当前版本对比是否最新</li></ul>',
|
desc: '<h3>版本信息获取失败</h3><ul><li>更新信息获取失败,可能是无法访问Github导致的,请手动检查更新!</li><li>检查方法:去设置-关于洛雪音乐打开<strong>开源地址</strong>或<strong>网盘地址</strong>查看<strong>版本号</strong>与当前版本对比是否最新</li></ul>',
|
||||||
history: [],
|
history: [],
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue