plus.runtime.getProperty(plus.runtime.appid, (info) => {
that.version = info.version;
that.getSysAppAuth();
})
getSysAppAuth(){
请求接口
if (this.version != res.data.data.ver) {
uni.showModal({
title: '发现新版本',
content: res.data.data.upgradeReminder,
showCancel: false,
success: function(modalRes) {
if (modalRes.confirm) {
uni.showToast({
icon: 'success',
mask: true,
title: "开始下载了",
})
// #ifdef APP-PLUS
var dtask = plus.downloader.createDownload(
that.$BASE_URL + '/patient/rhFileDownload/fileDownload?fileId=' + res.data.data
.appstoreUrl, {
method: "GET"
}, (d, status) => {
if (status == 200) {
plus.runtime.install(d.filename)
} else {
plus.nativeUI.alert("安装失败,请稍候重试: " + status)
}
});
dtask.start();
// #endif
}
}
});
}
}
07-06
2749
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
02-13
8387
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
05-28
2042
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
11-05
1万+
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
03-28
“相关推荐”对你有帮助么?
-
非常没帮助
-
没帮助
-
一般
-
有帮助
-
非常有帮助
提交