提交 eff146bf authored 作者: lidongxu's avatar lidongxu

refactor(version): 修改:暂时隐藏版本提示效果

上级 9a0deb76
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<div class="right-menu"> <div class="right-menu">
<template v-if="appStore.device !== 'mobile'"> <template v-if="appStore.device !== 'mobile'">
<!-- 新版本 --> <!-- 新版本 -->
<div class="right-menu-item hover-effect new-version" <!-- <div class="right-menu-item hover-effect new-version"
@click="showVersionFn"> @click="showVersionFn">
<svg-icon icon-class="new-version" /> <svg-icon icon-class="new-version" />
</div> </div>
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
<version-notice v-model="showVersionNoticeVisible" <version-notice v-model="showVersionNoticeVisible"
:nowVersion="nowVersion" :nowVersion="nowVersion"
:versionList="showVersionList" :versionList="showVersionList"
@confirm="saveNowVersion" /> @confirm="saveNowVersion" /> -->
<header-search id="header-search" <header-search id="header-search"
class="right-menu-item" /> class="right-menu-item" />
...@@ -107,12 +107,12 @@ const nowVersion = ref('') // 当前最新版本 ...@@ -107,12 +107,12 @@ const nowVersion = ref('') // 当前最新版本
// 判断是否有新版本出现 // 判断是否有新版本出现
onMounted(() => { onMounted(() => {
const oldVersion = proxy.$cache.local.get('version') // const oldVersion = proxy.$cache.local.get('version')
const versionObj = versionStore.version[0] // const versionObj = versionStore.version[0]
nowVersion.value = versionObj.version // nowVersion.value = versionObj.version
if (oldVersion !== nowVersion.value) { // if (oldVersion !== nowVersion.value) {
handleVersionList() // handleVersionList()
} // }
}) })
// 展示版本通知弹框 // 展示版本通知弹框
const showVersionFn = () => { const showVersionFn = () => {
......
...@@ -10,12 +10,13 @@ export default defineStore( ...@@ -10,12 +10,13 @@ export default defineStore(
// 获取版本信息 // 获取版本信息
getVersion() { getVersion() {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
getVersionAPI().then(res => { // getVersionAPI().then(res => {
this.version = res.data // this.version = res.data
resolve(res) // resolve(res)
}).catch(error => { // }).catch(error => {
reject(error) // reject(error)
}) // })
resolve()
}) })
} }
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论