Browse Source

优化下载

空白格 3 năm trước cách đây
mục cha
commit
a8ec0ee88a
2 tập tin đã thay đổi với 6 bổ sung9 xóa
  1. 5 8
      App.vue
  2. 1 1
      common/config.js

+ 5 - 8
App.vue

@@ -32,7 +32,7 @@
 								confirmColor: '#EE8F57',
 								success: (res) => {
 									if (res.confirm) {
-										this.downloadAppFile();
+										this.downloadAppFile()
 									}
 								}
 							})
@@ -49,11 +49,7 @@
 				}).then(res => {
 					if (res.code === 200) {
 						this.downloadUrl = res?.msg
-						uni.getSystemInfo({
-							success: (res) => {
-								this.getVersion();
-							}
-						})
+						this.getVersion();
 					}
 				})
 			},
@@ -62,7 +58,8 @@
 			 */
 			downloadAppFile() {
 				uni.showLoading({
-					title: '下载中',
+					mask: true,
+					title: '下载中...'
 				})
 				let downloadTask = uni.downloadFile({ // 执行下载
 					url: this.downloadUrl,
@@ -76,7 +73,7 @@
 								confirmColor: '#EE8F57',
 								success: function(res) {
 									if (res.confirm) {
-										plus.runtime.install( //安装
+										plus.runtime.install( // 安装
 											downloadResult.tempFilePath, {
 												force: true
 											},

+ 1 - 1
common/config.js

@@ -1,4 +1,4 @@
 export const config = {
 	baseUrl: 'https://wx.hw.hongweisoft.com/parking/',
-	version: '0.1.1'
+	version: '0.1.2'
 }