Browse Source

修改更新

hella_vue3
lijuncheng 8 months ago
parent
commit
77d44406e0
  1. 20
      src/common/appUpdate.js
  2. 6
      src/manifest.json

20
src/common/appUpdate.js

@ -22,7 +22,7 @@ export function appUpdate(isShowHint) {
var content = res.data.updateContent;
var version = res.data.installPackageVersion;
var isForcedUpdate = res.data.isForcedUpdate
var versionName =res.data.installPackageName
var versionName = res.data.installPackageName
console.log("新版本提示")
showDialog(versionName, content, isForcedUpdate, downUrl)
@ -45,7 +45,7 @@ export function appUpdate(isShowHint) {
// }
// })
} else {
if(isShowHint){
if (isShowHint) {
uni.showToast({
title: "当前是最新版本"
})
@ -124,12 +124,16 @@ export function confirm(downUrl) {
showLoading.setTitle("已连接到服务器");
break;
case 3:
prg = parseInt(
(parseFloat(task.downloadedSize) /
parseFloat(task.totalSize)) *
100
);
showLoading.setTitle(" 正在下载" + prg + "% ");
if (task.totalSize && > task.totalSize0) {
prg = parseInt(
(parseFloat(task.downloadedSize) /
parseFloat(task.totalSize)) *
100
);
showLoading.setTitle("正在下载" + prg + "% ");
}else {
showLoading.setTitle("正在下载");
}
break;
case 4:
plus.nativeUI.closeWaiting();

6
src/manifest.json

@ -44,9 +44,9 @@
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
"<uses-feature android:name=\"android.hardware.camera\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
"<uses-permission android:name=\"android.permission.INSTALL_PACKAGES\"/>",
"<uses-permission android:name=\"android.permission.REQUEST_INSTALL_PACKAGES\"/>"
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>",
"<uses-permission android:name=\"android.permission.INSTALL_PACKAGES\"/>",
"<uses-permission android:name=\"android.permission.REQUEST_INSTALL_PACKAGES\"/>"
],
"abiFilters" : [ "armeabi-v7a", "arm64-v8a", "x86" ],
"minSdkVersion" : 23

Loading…
Cancel
Save