From 38430ddb8612fce15a2f1c940f9bd57d4da3e70b Mon Sep 17 00:00:00 2001 From: zhangzengfei <zhangzengfei@smartai.com> Date: 星期四, 16 九月 2021 11:59:39 +0800 Subject: [PATCH] add new key --- App.vue | 168 ++++++++++++++++++++++++++++---------------------------- 1 files changed, 84 insertions(+), 84 deletions(-) diff --git a/App.vue b/App.vue index f05d266..3526264 100644 --- a/App.vue +++ b/App.vue @@ -1,85 +1,85 @@ - -<script> - - export default { - globalData:{ - version:'', - descs:[], - update:false - }, - onLaunch: function() { - this.checkUpdate(); - - }, - onShow: function() { - console.log('App Show') - this.modalShow = true; - }, - onHide: function() { - console.log('App Hide') - }, - methods: { - async checkUpdate() { - //鑾峰彇褰撳墠鐢ㄦ埛鎵嬫満绯荤粺淇℃伅 - let infos = uni.getSystemInfoSync(); - console.log(infos.platform) - let res = await this.$api.syncRequest({ - url: `/basic/api/car/app/version?curVersion=${plus.runtime.version}&platform=${infos.platform}`, - //url: '/basic/api/car/app/version?curVersion='+plus.runtime.version, - //url: 'http://smartai.com:5116/basic/api/car/app/version?curVersion='+plus.runtime.version, - loading: false - }); - console.log(res) - if (res.data.isUpgrade) { - uni.showModal({ - title: "鍙戠幇鏂扮増鏈�", - content: `鐗堟湰${res.data.latestVersion} -鏈鏇存柊(${res.data.size}): -${res.data.msg.join(',')}`, - showCancel: !res.data.forceUpgrade, - confirmText: '绔嬪埢鏇存柊', - success: sucRes => { - if (sucRes.confirm) { - plus.runtime.openURL(res.data.url) - } - } - }); - } - } - } - - } -</script> - -<style lang="scss"> - /*姣忎釜椤甸潰鍏叡css */ - .icon { - width: 1em; - height: 1em; - vertical-align: -0.15em; - fill: currentColor; - overflow: hidden; - } - - .uni-navbar--border { - border-bottom: none !important; - } - - .uni-nav-bar-right-text { - font-size: 32rpx !important; - } - .min-modal-title{ - text-align: left; - font-weight: bold; - font-size: 16px; - } - .min-modal-content{ - text-align: left; - } - .uni-modal__hd{ - text-align: left; - } - .uni-modal__bd{ - text-align: left; - } + +<script> + + export default { + globalData:{ + version:'', + descs:[], + update:false + }, + onLaunch: function() { + this.checkUpdate(); + + }, + onShow: function() { + console.log('App Show') + this.modalShow = true; + }, + onHide: function() { + console.log('App Hide') + }, + methods: { + async checkUpdate() { + //鑾峰彇褰撳墠鐢ㄦ埛鎵嬫満绯荤粺淇℃伅 + let infos = uni.getSystemInfoSync(); + console.log(infos.platform) + let res = await this.$api.syncRequest({ + url: `/basic/api/car/app/version?curVersion=${plus.runtime.version}&platform=${infos.platform}`, + //url: '/basic/api/car/app/version?curVersion='+plus.runtime.version, + //url: 'http://smartai.com:5116/basic/api/car/app/version?curVersion='+plus.runtime.version, + loading: false + }); + console.log(res) + if (res.data.isUpgrade) { + uni.showModal({ + title: "鍙戠幇鏂扮増鏈�", + content: `鐗堟湰${res.data.latestVersion} +鏈鏇存柊(${res.data.size}): +${res.data.msg.join(',')}`, + showCancel: !res.data.forceUpgrade, + confirmText: '绔嬪埢鏇存柊', + success: sucRes => { + if (sucRes.confirm) { + plus.runtime.openURL(res.data.url) + } + } + }); + } + } + } + + } +</script> + +<style lang="scss"> + /*姣忎釜椤甸潰鍏叡css */ + .icon { + width: 1em; + height: 1em; + vertical-align: -0.15em; + fill: currentColor; + overflow: hidden; + } + + .uni-navbar--border { + border-bottom: none !important; + } + + .uni-nav-bar-right-text { + font-size: 32rpx !important; + } + .min-modal-title{ + text-align: left; + font-weight: bold; + font-size: 16px; + } + .min-modal-content{ + text-align: left; + } + .uni-modal__hd{ + text-align: left; + } + .uni-modal__bd{ + text-align: left; + } </style> -- Gitblit v1.8.0