// app最新版本查询
			getAppUpdate() {
				// #ifdef APP
				let vm = this;
				let type = uni.getSystemInfoSync().uniPlatform;
				if (type == 'app') {
					let system = uni.getSystemInfoSync(); // 获取系统信息
					if (system.platform === 'android') {
						// 获取wgt包版本号
						plus.runtime.getProperty(plus.runtime.appid, widgetInfo => {
							vm.oldVersion = widgetInfo.version;
							    //接口查询最新版本
                               getAppWgt().then(res => {
								if (res.data) {
									if (res.data.downloadUrl) {
										if (res.data.versionCode > parseFloat(widgetInfo.versionCode)) {
											vm.downloadFileUrl = res.data.downloadUrl;
											vm.newVersion = res.data.versionName;
											vm.updateShow = true;
										} else {
											// 最新版本查询分享弹窗
											vm.getMingmenUserSharerMethods();
										}
									} else {
										// 最新版本查询分享弹窗
										vm.getMingmenUserSharerMethods();
									}
								} else {
									// 最新版本查询分享弹窗
									vm.getMingmenUserSharerMethods();
								}
							}).catch(err => {

							})
						})
					}
					// //console.log(type, system);
				}
				// #endif
			},
// 下载wgt/apk包
			updateBtn() {
				let vm = this;
				vm.updateShow = false;
				vm.tishiShow = true;
				let dtask = uni.downloadFile({
					url: vm.downloadFileUrl,
					success: (downloadResult) => {
						if (downloadResult.statusCode === 200) {
							plus.runtime.install(downloadResult.tempFilePath, {
									force: true
								},
								() => {
									// plus.nativeUI.showWaiting("更新成功");
									vm.$refs.uToast.show({
										title: '更新成功',
										type: 'success',
									})
									setTimeout(() => {
										vm.tishiShow = false;
										plus.nativeUI.closeWaiting();
										plus.runtime.restart();
									}, 500);
								},
								function(e) {
									vm.$refs.uToast.show({
										title: '安装失败',
										type: 'error',
									})
									setTimeout(() => {
										vm.tishiShow = false;
										plus.nativeUI.closeWaiting();
									}, 1000);
									console.error('install fail...');
								});
						}
					},
					fail: (e) => {
						vm.tishiShow = false;
						plus.nativeUI.closeWaiting();
						vm.$refs.uToast.show({
							title: '下载失败',
							type: 'error',
						})
						// plus.nativeUI.showWaiting("下载失败");
						setTimeout(() => {
							vm.tishiShow = false;
							plus.nativeUI.closeWaiting();
						}, 1000);
					}
				})
				dtask.onProgressUpdate((res) => {
					vm.percent = res.progress;
				})
			},

更多推荐