From 3f0f349adfbc9bf6f8178f2e0255bc2fdc88a198 Mon Sep 17 00:00:00 2001 From: xiebing Date: Wed, 24 Dec 2025 15:59:42 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9B=9E=E9=80=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/globalFunction.js | 31 +- hook/useColumnCount.js | 22 +- main.js | 1 + pages/index/components/AIMatch copy.vue | 395 ------------------------ pages/index/index.vue | 9 +- stores/useScreenStore.js | 4 +- utils/db.js | 14 +- 7 files changed, 22 insertions(+), 454 deletions(-) delete mode 100644 pages/index/components/AIMatch copy.vue 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/hook/useColumnCount.js b/hook/useColumnCount.js index 8acd19f..4cc0b5e 100644 --- a/hook/useColumnCount.js +++ b/hook/useColumnCount.js @@ -53,24 +53,18 @@ export function useColumnCount(onChange = () => {}) { onMounted(() => { columnCount.value = 2 calcColumn() - try { - // if (process.client) { - window.addEventListener('resize', calcColumn) - // } - } catch (error) { - - } + // if (process.client) { + window.addEventListener('resize', calcColumn) + // } }) onUnmounted(() => { - try { - // if (process.client) { - window.removeEventListener('resize', calcColumn) - // } - } catch (error) { - - } + + // if (process.client) { + window.removeEventListener('resize', calcColumn) + // } + }) diff --git a/main.js b/main.js index 6a562ea..f908aef 100644 --- a/main.js +++ b/main.js @@ -30,6 +30,7 @@ import FileIcon from '@/components/FileIcon/fileIcon.vue' import FileText from '@/components/FileText/fileText.vue' // import Tabbar from '@/components/tabbar/midell-box.vue' // 自动导入 directives 目录下所有指令 +console.log(lightAppJssdk) const directives = import.meta.glob('./directives/*.js', { eager: true diff --git a/pages/index/components/AIMatch copy.vue b/pages/index/components/AIMatch copy.vue deleted file mode 100644 index cb06425..0000000 --- a/pages/index/components/AIMatch copy.vue +++ /dev/null @@ -1,395 +0,0 @@ - - - - - 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); } /**