diff --git a/App.vue b/App.vue index 59b7ce6..4de6a36 100644 --- a/App.vue +++ b/App.vue @@ -2,7 +2,7 @@ import config from '@/config' import request from './utils/request'; import { - setTenantId, + setTenantId, getToken } from '@/utils/auth' export default { @@ -10,15 +10,14 @@ /*#ifdef MP*/ return /*#endif*/ - - - - + + + + if (!getToken()) { return } console.log('rescueDriverVersion'); - let version = config.appInfo.version request({ url: '/system/config/configKey/rescueDriverVersion', @@ -26,7 +25,7 @@ params: '' }).then(res => { - if (res.code == 200 && res.msg && res.msg != version) { + if (res.code == 200 && res.data && res.data != version) { uni.showModal({ title: '版本升级', @@ -62,7 +61,8 @@ success: res => { if (res.confirm) { //更新完重启app - plus.runtime.restart(); + plus.runtime + .restart(); } } }); @@ -105,4 +105,4 @@ // @import "uview-ui/index.scss"; @import "@/node_modules/uview-ui/index.scss"; /*每个页面公共css */ - + \ No newline at end of file