Browse Source

配置文件修改

fanghuisheng 1 month ago
parent
commit
838e1585fc
2 changed files with 63 additions and 58 deletions
  1. 23 18
      src/store/modules/setting.js
  2. 40 40
      unpackage/config/setting.js

+ 23 - 18
src/store/modules/setting.js

@@ -307,32 +307,37 @@ const settingStores = defineStore("storage-setting", {
             }
             // 智能会议
             else if (config.appInfo.appid === "__UNI__F3963F8") {
+                data.appKey = platform === "android" ? "455032139442b1fe00b75b231474792e" : "455032139442b1fe00b75b231474792e"
             }
             // 智能门禁
             else if (config.appInfo.appid === "__UNI__8D6E9FD") {
+                data.appKey = platform === "android" ? "625265d978931967076754b784b676fe" : "625265d978931967076754b784b676fe"
             }
 
             modal.loading("加载中");
-            checkUpdates(data).then((res) => {
-                if (res.code == 0) {
-                    if (res.data.buildHaveNewVersion == true) {
+            checkUpdates(data)
+                .then((res) => {
+                    if (res.code == 0 && res.data.buildHaveNewVersion == true) {
                         //安卓手机弹窗升级
                         if (platform === "android") {
                             success(res)
                         }
                         //IOS无法在线升级提示到商店下载
                         else {
+                            //#ifdef APP-PLUS 
                             let appleId = 6449016600
                             plus.runtime.launchApplication({
                                 action: `itms-apps://itunes.apple.com/cn/app/id${appleId}`,
                             })
+                            //#endif
                         }
                     } else {
                         modal.msg("您的软件版本已是最新");
                     }
                     modal.closeLoading();
-                }
-            });
+                }).catch((err) => {
+                    modal.closeLoading();
+                });
         },
 
         /**
@@ -362,32 +367,32 @@ const settingStores = defineStore("storage-setting", {
         handleLogout() {
             const useStore = useStores();
             //#ifdef APP-PLUS
-            if(config.appInfo.appid == '__UNI__BF1A1F0'){
-                modal.confirmInput("确定注销并退出系统吗?","请输入密码").then((res) => {
-                    if(res.confirm){
-                        if(!res.content){
+            if (config.appInfo.appid == '__UNI__BF1A1F0') {
+                modal.confirmInput("确定注销并退出系统吗?", "请输入密码").then((res) => {
+                    if (res.confirm) {
+                        if (!res.content) {
                             modal.msg("请输入密码")
-                        }else if(res.content == "sh628628"){
+                        } else if (res.content == "sh628628") {
                             useStore.LogOut().then(() => {
                                 modal.msgSuccess("退出成功")
                                 tab.reLaunch("/pages/index");
                             });
-                        }else{
+                        } else {
                             modal.msg("密码错误")
                         }
                     }
                 });
-            }else{
-                modal.confirmInput("确定注销并退出系统吗?","请输入密码").then((res) => {
-                    if(res.confirm){
-                        if(!res.content){
+            } else {
+                modal.confirmInput("确定注销并退出系统吗?", "请输入密码").then((res) => {
+                    if (res.confirm) {
+                        if (!res.content) {
                             modal.msg("请输入密码")
-                        }else if(res.content == "sh628628"){
+                        } else if (res.content == "sh628628") {
                             useStore.LogOut().then(() => {
                                 modal.msgSuccess("退出成功")
                                 tab.reLaunch("/pages/index");
                             });
-                        }else{
+                        } else {
                             modal.msg("密码错误")
                         }
                     }
@@ -409,7 +414,7 @@ const settingStores = defineStore("storage-setting", {
                 });
             });
             //#endif
-            
+
         },
         /**
          * @初始化默认主题

+ 40 - 40
unpackage/config/setting.js

@@ -32,10 +32,10 @@ filesToModify.forEach((file) => {
                 geolocation.tencent.apikey_ios = "EGOBZ-74ZET-ST7XS-VYICT-RBLHZ-KLFEX"
                 geolocation.tencent.apikey_android = "EGOBZ-74ZET-ST7XS-VYICT-RBLHZ-KLFEX"
                 icons.android = {
-                    "hdpi" : "unpackage/res/icons/72x72.png",
-                    "xhdpi" : "unpackage/res/icons/96x96.png",
-                    "xxhdpi" : "unpackage/res/icons/144x144.png",
-                    "xxxhdpi" : "unpackage/res/icons/192x192.png"
+                    "hdpi": "unpackage/res/icons/72x72.png",
+                    "xhdpi": "unpackage/res/icons/96x96.png",
+                    "xxhdpi": "unpackage/res/icons/144x144.png",
+                    "xxxhdpi": "unpackage/res/icons/192x192.png"
                 }
                 icons.ios.appstore = "unpackage/res/icons/1024x1024.png"
                 icons.ios.ipad = {
@@ -60,11 +60,11 @@ filesToModify.forEach((file) => {
                     "spotlight@3x": "unpackage/res/icons/120x120.png"
                 }
                 push.unipush.icons.small = {
-                    "hdpi" : "unpackage/res/push/36x36.png",
-                    "ldpi" : "unpackage/res/push/18x18.png",
-                    "mdpi" : "unpackage/res/push/24x24.png",
-                    "xhdpi" : "unpackage/res/push/48x48.png",
-                    "xxhdpi" : "unpackage/res/push/72x72.png"
+                    "hdpi": "unpackage/res/push/36x36.png",
+                    "ldpi": "unpackage/res/push/18x18.png",
+                    "mdpi": "unpackage/res/push/24x24.png",
+                    "xhdpi": "unpackage/res/push/48x48.png",
+                    "xxhdpi": "unpackage/res/push/72x72.png"
                 }
             } else if (args === 'xunJian') {
                 state.name = '智能巡更'
@@ -84,10 +84,10 @@ filesToModify.forEach((file) => {
                 geolocation.tencent.apikey_ios = "EGOBZ-74ZET-ST7XS-VYICT-RBLHZ-KLFEX"
                 geolocation.tencent.apikey_android = "EGOBZ-74ZET-ST7XS-VYICT-RBLHZ-KLFEX"
                 icons.android = {
-                    "hdpi" : "unpackage/res/icons-xunJian/72x72.png",
-                    "xhdpi" : "unpackage/res/icons-xunJian/96x96.png",
-                    "xxhdpi" : "unpackage/res/icons-xunJian/144x144.png",
-                    "xxxhdpi" : "unpackage/res/icons-xunJian/192x192.png"
+                    "hdpi": "unpackage/res/icons-xunJian/72x72.png",
+                    "xhdpi": "unpackage/res/icons-xunJian/96x96.png",
+                    "xxhdpi": "unpackage/res/icons-xunJian/144x144.png",
+                    "xxxhdpi": "unpackage/res/icons-xunJian/192x192.png"
                 }
                 icons.ios.appstore = "unpackage/res/icons-xunJian/1024x1024.png"
                 icons.ios.ipad = {
@@ -112,18 +112,18 @@ filesToModify.forEach((file) => {
                     "spotlight@3x": "unpackage/res/icons-xunJian/120x120.png"
                 }
                 push.unipush.icons.small = {
-                    "hdpi" : "unpackage/res/push-xunJian/36x36.png",
-                    "ldpi" : "unpackage/res/push-xunJian/18x18.png",
-                    "mdpi" : "unpackage/res/push-xunJian/24x24.png",
-                    "xhdpi" : "unpackage/res/push-xunJian/48x48.png",
-                    "xxhdpi" : "unpackage/res/push-xunJian/72x72.png"
+                    "hdpi": "unpackage/res/push-xunJian/36x36.png",
+                    "ldpi": "unpackage/res/push-xunJian/18x18.png",
+                    "mdpi": "unpackage/res/push-xunJian/24x24.png",
+                    "xhdpi": "unpackage/res/push-xunJian/48x48.png",
+                    "xxhdpi": "unpackage/res/push-xunJian/72x72.png"
                 }
             } else if (args === 'huiYi') {
                 state.name = '智能会议'
                 state.appid = '__UNI__F3963F8'
                 state.description = '智能会议APP,是一款集成了现代信息技术和智能化管理功能的移动应用程序,旨在提升会议体验和管理效率。'
-                state.versionName = "2.0.5"
-                state.versionCode = 1
+                state.versionName = "1.0.3"
+                state.versionCode = 3
                 state.h5.title = '智能会议'
 
                 maps.amap.name = "amapBOujshtbA"
@@ -136,10 +136,10 @@ filesToModify.forEach((file) => {
                 geolocation.tencent.apikey_ios = "EGOBZ-74ZET-ST7XS-VYICT-RBLHZ-KLFEX"
                 geolocation.tencent.apikey_android = "EGOBZ-74ZET-ST7XS-VYICT-RBLHZ-KLFEX"
                 icons.android = {
-                    "hdpi" : "unpackage/res/icons/72x72.png",
-                    "xhdpi" : "unpackage/res/icons/96x96.png",
-                    "xxhdpi" : "unpackage/res/icons/144x144.png",
-                    "xxxhdpi" : "unpackage/res/icons/192x192.png"
+                    "hdpi": "unpackage/res/icons/72x72.png",
+                    "xhdpi": "unpackage/res/icons/96x96.png",
+                    "xxhdpi": "unpackage/res/icons/144x144.png",
+                    "xxxhdpi": "unpackage/res/icons/192x192.png"
                 }
                 icons.ios.appstore = "unpackage/res/icons/1024x1024.png"
                 icons.ios.ipad = {
@@ -164,18 +164,18 @@ filesToModify.forEach((file) => {
                     "spotlight@3x": "unpackage/res/icons/120x120.png"
                 }
                 push.unipush.icons.small = {
-                    "hdpi" : "unpackage/res/push/36x36.png",
-                    "ldpi" : "unpackage/res/push/18x18.png",
-                    "mdpi" : "unpackage/res/push/24x24.png",
-                    "xhdpi" : "unpackage/res/push/48x48.png",
-                    "xxhdpi" : "unpackage/res/push/72x72.png"
+                    "hdpi": "unpackage/res/push/36x36.png",
+                    "ldpi": "unpackage/res/push/18x18.png",
+                    "mdpi": "unpackage/res/push/24x24.png",
+                    "xhdpi": "unpackage/res/push/48x48.png",
+                    "xxhdpi": "unpackage/res/push/72x72.png"
                 }
             } else if (args === 'menJin') {
                 state.name = '智能门禁'
                 state.appid = '__UNI__8D6E9FD'
                 state.description = '智能门禁APP,是一款集成了现代信息技术和智能化管理功能的移动应用程序。'
-                state.versionName = "1.0.0"
-                state.versionCode = 1
+                state.versionName = "1.0.1"
+                state.versionCode = 2
                 state.h5.title = '智能门禁'
 
                 maps.amap.name = "amapBOujshtbA"
@@ -188,10 +188,10 @@ filesToModify.forEach((file) => {
                 geolocation.tencent.apikey_ios = "EGOBZ-74ZET-ST7XS-VYICT-RBLHZ-KLFEX"
                 geolocation.tencent.apikey_android = "EGOBZ-74ZET-ST7XS-VYICT-RBLHZ-KLFEX"
                 icons.android = {
-                    "hdpi" : "unpackage/res/icons/72x72.png",
-                    "xhdpi" : "unpackage/res/icons/96x96.png",
-                    "xxhdpi" : "unpackage/res/icons/144x144.png",
-                    "xxxhdpi" : "unpackage/res/icons/192x192.png"
+                    "hdpi": "unpackage/res/icons/72x72.png",
+                    "xhdpi": "unpackage/res/icons/96x96.png",
+                    "xxhdpi": "unpackage/res/icons/144x144.png",
+                    "xxxhdpi": "unpackage/res/icons/192x192.png"
                 }
                 icons.ios.appstore = "unpackage/res/icons/1024x1024.png"
                 icons.ios.ipad = {
@@ -216,11 +216,11 @@ filesToModify.forEach((file) => {
                     "spotlight@3x": "unpackage/res/icons/120x120.png"
                 }
                 push.unipush.icons.small = {
-                    "hdpi" : "unpackage/res/push/36x36.png",
-                    "ldpi" : "unpackage/res/push/18x18.png",
-                    "mdpi" : "unpackage/res/push/24x24.png",
-                    "xhdpi" : "unpackage/res/push/48x48.png",
-                    "xxhdpi" : "unpackage/res/push/72x72.png"
+                    "hdpi": "unpackage/res/push/36x36.png",
+                    "ldpi": "unpackage/res/push/18x18.png",
+                    "mdpi": "unpackage/res/push/24x24.png",
+                    "xhdpi": "unpackage/res/push/48x48.png",
+                    "xxhdpi": "unpackage/res/push/72x72.png"
                 }
             }
         } else if ('./src/pages.json') {