diff --git a/.eslintrc.cjs b/.eslintrc.cjs index 769dcdb..2e0c9c9 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -27,6 +27,7 @@ module.exports = { 'plugin:prettier/recommended', './.eslintrc-auto-import.json' ], + ignorePatterns: ['utils/log.js', 'unpackage/**/*'], /** * "off" 或 0 ==> 关闭规则 * "warn" 或 1 ==> 打开的规则作为警告(不影响代码执行) @@ -40,8 +41,17 @@ module.exports = { 'no-var': 'error', // 要求使用 let 或 const 而不是 var 'no-multiple-empty-lines': ['error', { max: 1 }], // 不允许多个空行 'prefer-const': 'off', // 使用 let 关键字声明但在初始分配后从未重新分配的变量,要求使用 const - 'no-use-before-define': 'off', // 禁止在 函数/类/变量 定义之前使用它们 - 'no-irregular-whitespace': 'off', // 禁止不规则的空白\ + 'no-use-before-define': 'error', // 禁止在 函数/类/变量 定义之前使用它们 + 'no-irregular-whitespace': 'off', // 禁止不规则的空白 + 'no-undef': 'error', // 禁止使用未声明的变量 + 'vue/script-setup-uses-vars': 'off', // 关闭此规则,因为它可能会干扰no-undef的检测 + 'vue/no-undef-components': 'off', // 关闭组件未定义的检查 + 'vue/no-undef-properties': [ + 'error', + { + ignore: ['getDeviceInfo', 'getBluetoothDevices', 'stopGetBluetoothDevices'] + } + ], // 忽略特定方法的未定义检查 'import/no-cycle': 0, 'no-nested-ternary': 0, 'import/prefer-default-export': 0, @@ -60,7 +70,6 @@ module.exports = { 'no-debugger': 0, 'no-promise-executor-return': 0, // vue (https://eslint.vuejs.org/rules) - 'vue/script-setup-uses-vars': 'error', // 防止 + + diff --git a/pages/bindLock/bindLock.vue b/pages/addDevice/bindLock.vue similarity index 99% rename from pages/bindLock/bindLock.vue rename to pages/addDevice/bindLock.vue index 6489ef5..ec9e586 100644 --- a/pages/bindLock/bindLock.vue +++ b/pages/addDevice/bindLock.vue @@ -144,7 +144,7 @@ this.getLockList(this.lockSearch) setTimeout(() => { uni.hideLoading() - this.backAndToast('添加成功') + this.backAndToast('添加成功', 2) }, 1000) } else { uni.hideLoading() @@ -166,21 +166,21 @@ diff --git a/pages/addDevice/distributionNetwork.vue b/pages/addDevice/distributionNetwork.vue new file mode 100644 index 0000000..30780f7 --- /dev/null +++ b/pages/addDevice/distributionNetwork.vue @@ -0,0 +1,304 @@ + + + + + diff --git a/pages/searchDevice/searchDevice.vue b/pages/addDevice/searchDevice.vue similarity index 95% rename from pages/searchDevice/searchDevice.vue rename to pages/addDevice/searchDevice.vue index 881f5d5..c1a7c66 100644 --- a/pages/searchDevice/searchDevice.vue +++ b/pages/addDevice/searchDevice.vue @@ -14,10 +14,13 @@ @click="connect(device)" > - + {{ device.name }} - + @@ -172,16 +175,16 @@ } .device { - background: #ffffff; display: flex; align-items: center; justify-content: space-between; height: 100rpx; + background: #ffffff; .device-lock { - margin-left: 24rpx; width: 72rpx; height: 72rpx; + margin-left: 24rpx; } .device-name { diff --git a/pages/selectAddress/selectAddress.vue b/pages/addDevice/selectAddress.vue similarity index 98% rename from pages/selectAddress/selectAddress.vue rename to pages/addDevice/selectAddress.vue index 1ffd7ff..3f52fd5 100644 --- a/pages/selectAddress/selectAddress.vue +++ b/pages/addDevice/selectAddress.vue @@ -120,7 +120,7 @@ id: 1, latitude: res.latitude, longitude: res.longitude, - iconPath: '/static/images/icon_address.png', + iconPath: 'https://oss-lock.xhjcn.ltd/mp/icon_address.png', width: '48rpx', height: '48rpx' } diff --git a/pages/addLockGuid/addLockGuid.vue b/pages/addLockGuid/addLockGuid.vue deleted file mode 100644 index 4e36266..0000000 --- a/pages/addLockGuid/addLockGuid.vue +++ /dev/null @@ -1,84 +0,0 @@ - - - - - diff --git a/pages/adminDetail/adminDetail.vue b/pages/feature/adminDetail.vue similarity index 100% rename from pages/adminDetail/adminDetail.vue rename to pages/feature/adminDetail.vue diff --git a/pages/adminList/adminList.vue b/pages/feature/adminList.vue similarity index 96% rename from pages/adminList/adminList.vue rename to pages/feature/adminList.vue index e3f795d..4d7cd40 100644 --- a/pages/adminList/adminList.vue +++ b/pages/feature/adminList.vue @@ -13,9 +13,9 @@ 暂无数据 @@ -47,7 +47,11 @@ @@ -314,25 +318,25 @@ diff --git a/pages/palmVeinDetail/palmVeinDetail.vue b/pages/feature/palmVeinDetail.vue similarity index 100% rename from pages/palmVeinDetail/palmVeinDetail.vue rename to pages/feature/palmVeinDetail.vue diff --git a/pages/palmVeinList/palmVeinList.vue b/pages/feature/palmVeinList.vue similarity index 98% rename from pages/palmVeinList/palmVeinList.vue rename to pages/feature/palmVeinList.vue index 1ebf087..810bf21 100644 --- a/pages/palmVeinList/palmVeinList.vue +++ b/pages/feature/palmVeinList.vue @@ -13,9 +13,9 @@ 暂无数据 @@ -48,7 +48,7 @@ @@ -378,36 +378,36 @@ diff --git a/pages/lockDetail/lockDetail.vue b/pages/main/lockDetail.vue similarity index 84% rename from pages/lockDetail/lockDetail.vue rename to pages/main/lockDetail.vue index 1de8ac3..b4de880 100644 --- a/pages/lockDetail/lockDetail.vue +++ b/pages/main/lockDetail.vue @@ -15,7 +15,7 @@ @@ -26,7 +26,11 @@ mode="aspectFill" > {{ $bluetooth.currentLockInfo.electricQuantity }}% - + @@ -35,7 +39,11 @@ 点击开锁,长按闭锁 - + {{ $lock.getRole( $bluetooth.currentLockInfo.userType, @@ -48,8 +56,8 @@ class="bottom-icon" :src=" $bluetooth.currentLockInfo.appUnlockOnline - ? '/static/images/icon_cloud_active.png' - : '/static/images/icon_cloud.png' + ? 'https://oss-lock.xhjcn.ltd/mp/icon_cloud_active.png' + : 'https://oss-lock.xhjcn.ltd/mp/icon_cloud.png' " mode="aspectFill" style="width: 40rpx; height: 40rpx" @@ -65,7 +73,7 @@ - + 功能 @@ -76,7 +84,7 @@ > 电子钥匙 @@ -88,7 +96,10 @@ class="menu-main-view" @click="$basic.routeJump({ name: 'passwordList' })" > - + 密码 @@ -113,7 +124,10 @@ class="menu-main-view" @click="$basic.routeJump({ name: 'fingerprintList' })" > - + 指纹 - + 遥控 - + 人脸 - + 掌静脉 + + + 监控 + 授权管理员 @@ -164,9 +194,22 @@ class="menu-main-view transform-scale-105" @click="$basic.routeJump({ name: 'recordList' })" > - + 操作记录 + + + 视频日志 + 消息提醒 - + 设置 - + @@ -413,86 +460,85 @@ diff --git a/pages/mine/mine.vue b/pages/main/mine.vue similarity index 91% rename from pages/mine/mine.vue rename to pages/main/mine.vue index 3f52956..4a3e249 100644 --- a/pages/mine/mine.vue +++ b/pages/main/mine.vue @@ -4,29 +4,49 @@ 个人信息 - + 公司介绍 - + 用户协议 - + 隐私政策 - + @@ -136,7 +156,7 @@ removeStorage('userInfo') removeStorage('lockList') uni.reLaunch({ - url: '/pages/home/home' + url: '/pages/main/home' }) }, async changePhone(res) { @@ -253,30 +273,30 @@ diff --git a/pages/notificationList/notificationList.vue b/pages/main/notificationList.vue similarity index 96% rename from pages/notificationList/notificationList.vue rename to pages/main/notificationList.vue index 62fb13b..17337d0 100644 --- a/pages/notificationList/notificationList.vue +++ b/pages/main/notificationList.vue @@ -15,7 +15,7 @@ 暂无数据 @@ -36,7 +36,7 @@ @@ -44,7 +44,7 @@ @@ -76,7 +76,11 @@ @click="deleteAllNotification" v-if="isLogin && requestFinished && notificationList.length !== 0" > - +