From ed76f58db04d612fd61c598cb86e29cb4154f56b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8C=83=E9=B9=8F?= Date: Tue, 8 Apr 2025 15:33:12 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=AE=8C=E6=88=90wifi=E9=94=81?= =?UTF-8?q?=E9=85=8D=E7=BD=91=E4=B8=8E=E7=BB=91=E5=AE=9A=E7=9B=B8=E5=85=B3?= =?UTF-8?q?=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .eslintrc.cjs | 17 +- config/env.js | 12 +- pages/addDevice/addLockGuid.vue | 4 +- pages/addDevice/bindLock.vue | 3 + pages/addDevice/distributionNetwork.vue | 424 ++++++++++-------------- pages/addDevice/searchDevice.vue | 2 +- pages/main/customBox.vue | 12 +- pages/p2p/authorizeWechat.vue | 9 +- pages/p2p/p2pPlayer.vue | 4 +- pages/setting/catEye.vue | 2 +- stores/bluetooth.js | 159 ++++++++- 11 files changed, 372 insertions(+), 276 deletions(-) diff --git a/.eslintrc.cjs b/.eslintrc.cjs index 2e0c9c9..3128e38 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -8,7 +8,8 @@ module.exports = { globals: { uni: 'writable', getApp: 'writable', - wx: 'writable' + wx: 'writable', + getCurrentPages: 'writable' }, // 指定如何解析语法 parser: 'vue-eslint-parser', @@ -41,17 +42,15 @@ module.exports = { 'no-var': 'error', // 要求使用 let 或 const 而不是 var 'no-multiple-empty-lines': ['error', { max: 1 }], // 不允许多个空行 'prefer-const': 'off', // 使用 let 关键字声明但在初始分配后从未重新分配的变量,要求使用 const - 'no-use-before-define': 'error', // 禁止在 函数/类/变量 定义之前使用它们 + 'no-use-before-define': 'off', // 禁止在 函数/类/变量 定义之前使用它们 'no-irregular-whitespace': 'off', // 禁止不规则的空白 'no-undef': 'error', // 禁止使用未声明的变量 - 'vue/script-setup-uses-vars': 'off', // 关闭此规则,因为它可能会干扰no-undef的检测 + 'no-unused-vars': 'error', // 禁止出现未使用过的变量 + 'vue/script-setup-uses-vars': 'error', // 确保script setup中的变量必须正确定义 'vue/no-undef-components': 'off', // 关闭组件未定义的检查 - 'vue/no-undef-properties': [ - 'error', - { - ignore: ['getDeviceInfo', 'getBluetoothDevices', 'stopGetBluetoothDevices'] - } - ], // 忽略特定方法的未定义检查 + 'vue/no-undef-properties': 'off', // 关闭属性未定义的检查 + 'vue/no-unused-vars': 'error', // 禁止Vue组件中出现未使用的变量 + 'import/no-unused-modules': 'off', // 关闭模块导出检查 'import/no-cycle': 0, 'no-nested-ternary': 0, 'import/prefer-default-export': 0, diff --git a/config/env.js b/config/env.js index d64d6c6..75636f8 100644 --- a/config/env.js +++ b/config/env.js @@ -9,14 +9,17 @@ uni.getSystemInfo({ const DEV = { name: 'dev', - baseUrl: 'https://dev.lock.star-lock.cn/api', - webviewBaseUrl: 'https://dev.lock.star-lock.cn', + appName: '星星锁Lite', + baseUrl: 'https://lock.dev.star-lock.cn/api', + webviewBaseUrl: 'https://lock.dev.star-lock.cn', version, buildNumber } + const PRE = { name: 'pre', - baseUrl: 'https://pre.lock.star-lock.cn/api', + appName: '星星锁Lite', + baseUrl: 'https://lock.pre.star-lock.cn/api', webviewBaseUrl: 'https://lock.xhjcn.ltd', version, buildNumber @@ -24,6 +27,7 @@ const PRE = { const XHJ = { name: 'xhj', + appName: '星星锁Lite', baseUrl: 'https://lock.xhjcn.ltd/api', webviewBaseUrl: 'https://lock.xhjcn.ltd', version, @@ -32,6 +36,7 @@ const XHJ = { const SKY = { name: 'sky', + appName: '星星锁Lite', baseUrl: 'https://lock.skychip.top/api', webviewBaseUrl: 'https://lock.skychip.top', version, @@ -40,6 +45,7 @@ const SKY = { const GE = { name: 'ge', + appName: '星星锁Lite', baseUrl: 'http://lock.ge.star-lock.cn/api', webviewBaseUrl: 'http://lock.ge.star-lock.cn', version, diff --git a/pages/addDevice/addLockGuid.vue b/pages/addDevice/addLockGuid.vue index 1f0c932..b3accef 100644 --- a/pages/addDevice/addLockGuid.vue +++ b/pages/addDevice/addLockGuid.vue @@ -12,10 +12,10 @@ - - diff --git a/pages/addDevice/searchDevice.vue b/pages/addDevice/searchDevice.vue index c1a7c66..abdb58f 100644 --- a/pages/addDevice/searchDevice.vue +++ b/pages/addDevice/searchDevice.vue @@ -139,7 +139,7 @@ } this.routeJump({ type: 'redirectTo', - name: 'selectAddress' + name: false ? 'selectAddress' : 'distributionNetwork' }) } else { uni.hideLoading() diff --git a/pages/main/customBox.vue b/pages/main/customBox.vue index 0893cda..2249512 100644 --- a/pages/main/customBox.vue +++ b/pages/main/customBox.vue @@ -13,12 +13,12 @@