diff --git a/common/globalFunction.js b/common/globalFunction.js
index e2ff269..bdd736e 100644
--- a/common/globalFunction.js
+++ b/common/globalFunction.js
@@ -1,12 +1,4 @@
-// #ifdef H5
import '@/lib/encryption/sm4.min.js'
-// #endif
-
-// #ifndef H5
-import { sm4 } from 'sm-crypto';
-// #endif
-
-
import useUserStore from "../stores/useUserStore";
import {
createRequestWithCache,
@@ -609,6 +601,7 @@ export function sm4Decrypt(key, value, mode = "hex") {
cipherType: mode === 'hex' ? 'hex' : 'base64',
padding: 'pkcs#5'
});
+
return decrypted
} catch (e) {
@@ -643,32 +636,20 @@ export function reloadBrowser() {
// 一体机环境判断
export function isY9MachineType() {
-
- try {
- const ua = navigator.userAgent;
- const isY9Machine = /Y9-ZYYH/i.test(ua); // 匹配机器型号
- return isY9Machine;
- } catch (error) {
- return false
- }
-
+ const ua = navigator.userAgent;
+ const isY9Machine = /Y9-ZYYH/i.test(ua); // 匹配机器型号
+ return isY9Machine;
}
-// 一体机环境判断
+// 爱山东环境判断
export function isAsdMachineType() {
+ return typeof lightAppJssdk !== 'undefined'
// const ua = navigator.userAgent;
// const isY9Machine = /asd_hanweb/i.test(ua); // 匹配机器型号
// return isY9Machine;
- try {
- return !!lightAppJssdk.user
- } catch (error) {
- false
- }
-
}
-
export const $api = {
msg,
prePage,
diff --git a/components/AppLayout/AppLayout.vue b/components/AppLayout/AppLayout.vue
index fe7a20d..b3c64a2 100644
--- a/components/AppLayout/AppLayout.vue
+++ b/components/AppLayout/AppLayout.vue
@@ -6,6 +6,7 @@
>
+
@@ -43,6 +45,10 @@
-
-
diff --git a/pages/index/index.vue b/pages/index/index.vue
index 3e33854..9405f20 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -18,13 +18,8 @@
v-for="(_, index) in 2"
:key="index"
>
-
-
diff --git a/stores/useScreenStore.js b/stores/useScreenStore.js
index bee858f..ad507f0 100644
--- a/stores/useScreenStore.js
+++ b/stores/useScreenStore.js
@@ -6,9 +6,9 @@ import {
computed
} from 'vue';
-// #ifndef MP-WEIXIN
+
import wideScreenStyles from '../common/wide-screen.css?inline';
-// #endif
+
// 屏幕检测管理器类
class ScreenDetectionManager {
diff --git a/utils/db.js b/utils/db.js
index c0648f4..204b468 100644
--- a/utils/db.js
+++ b/utils/db.js
@@ -1,5 +1,4 @@
import IndexedDBHelper from '@/common/IndexedDBHelper.js'
-import UniStorageHelper from '@/common/UniStorageHelper.js'
import useChatGroupDBStore from '@/stores/userChatGroupStore'
import config from '@/config'
@@ -74,7 +73,7 @@ class BaseStore {
// #ifndef H5
this.db = new UniStorageHelper(this.dbName, config.DBversion);
// #endif
-
+
return this.db.openDB([{
name: 'record',
keyPath: "id",
@@ -111,15 +110,8 @@ class BaseStore {
}
async clearDB() {
-
-
- // #ifdef H5
- return new IndexedDBHelper().deleteDB(this.dbName);
- // #endif
-
- // #ifndef H5
- return new UniStorageHelper().deleteDB(this.dbName);
- // #endif
+ // 修正拼写错误并优化 Promise 写法
+ return new IndexedDBHelper().deleteDB(this.dbName);
}
/**