ZaiZai 2 years ago
parent
commit
7888083ec2
2 changed files with 5 additions and 14 deletions
  1. 3 12
      components/hc-update/index.vue
  2. 2 2
      manifest.json

+ 3 - 12
components/hc-update/index.vue

@@ -48,7 +48,7 @@ import {getVersionData} from "~api/other";
 import website from '@/config/index';
 import {getObjValue} from "js-fast-way";
 import {filterSize} from "@/utils/utils";
-import {errorToast, successToast} from "@/utils/tools";
+import {errorToast} from "@/utils/tools";
 import {useAppStore} from "@/store";
 
 //初始变量
@@ -83,11 +83,7 @@ watch(() => [
     store.onUpdate
 ], ([val]) => {
     if (val) {
-        const { version } = appInfo.value
-        const { versionNumber } = versionData.value
-        if (versionNumber > version) {
-            isShow.value = true
-        }
+        getVersionDataApi()
     }
 })
 
@@ -159,15 +155,10 @@ const downloadFile = (fileUrl) => {
 
 //安装相关资源文件
 const installAppFile = (file) => {
-    //0 完整安装包, 1 wgt热更新包
-    const {fileType} = versionData.value
     plus.runtime.install(file, {
         force: false
     }, function() {
-        successToast('本次升级成功')
-        setTimeout(() => {
-            plus.runtime.restart();
-        }, 1500)
+        plus.runtime.restart();
     }, function(e) {
         console.log(e)
         errorToast('本次升级失败,请联系管理员')

+ 2 - 2
manifest.json

@@ -2,8 +2,8 @@
     "name" : "数字工程",
     "appid" : "__UNI__A0B807E",
     "description" : "",
-    "versionName" : "1.2.0",
-    "versionCode" : 120,
+    "versionName" : "1.2.2",
+    "versionCode" : 122,
     "transformPx" : false,
     "networkTimeout" : {
         "request" : 300000,