From d4c216b635c081afacb824d83fe5c827a40aae3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8C=83=E9=B9=8F?= Date: Fri, 6 Sep 2024 18:10:50 +0800 Subject: [PATCH 1/7] =?UTF-8?q?=E9=83=A8=E5=88=86=E6=93=8D=E4=BD=9C?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=97=A0=E7=BD=91=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App.vue | 2 +- pages/createPassword/createPassword.vue | 7 ++++++- pages/lockDetail/lockDetail.vue | 4 ---- pages/passwordDetail/passwordDetail.vue | 6 +++++- pages/passwordList/passwordList.vue | 10 +++++++++- pages/searchDevice/searchDevice.vue | 6 +++++- pages/setting/setting.vue | 8 ++++++-- stores/basic.js | 4 ++++ 8 files changed, 36 insertions(+), 11 deletions(-) diff --git a/App.vue b/App.vue index 6d7b2f9..a6c7d0f 100644 --- a/App.vue +++ b/App.vue @@ -26,7 +26,7 @@ } else if(this.envVersion === 'trial') { return 'PRE' } else { - return 'PROD' + return 'XHJ' } } } diff --git a/pages/createPassword/createPassword.vue b/pages/createPassword/createPassword.vue index e45b153..4710779 100644 --- a/pages/createPassword/createPassword.vue +++ b/pages/createPassword/createPassword.vue @@ -70,7 +70,7 @@ export default { this.temporaryTime = this.setTime() }, methods: { - ...mapActions(useBasicStore, ['getDeviceInfo', 'backAndToast']), + ...mapActions(useBasicStore, ['getDeviceInfo', 'backAndToast', 'getNetworkType']), ...mapActions(useLockStore, ['getPasswordList', 'updatePasswordSearch']), setTime() { const now = new Date() @@ -89,6 +89,11 @@ export default { return } + const netWork = await this.getNetworkType() + if(!netWork) { + return + } + if(this.pending) { return } diff --git a/pages/lockDetail/lockDetail.vue b/pages/lockDetail/lockDetail.vue index 901c600..2c14044 100644 --- a/pages/lockDetail/lockDetail.vue +++ b/pages/lockDetail/lockDetail.vue @@ -143,10 +143,6 @@ export default { if(this.currentLockInfo.lockSetting.appUnlockOnline) { const netWork = await this.getNetworkType() if(!netWork) { - uni.showToast({ - title: '网络访问失败,请检查网络是否正常', - icon: 'none' - }) return } } diff --git a/pages/passwordDetail/passwordDetail.vue b/pages/passwordDetail/passwordDetail.vue index ca9feb0..f2d4002 100644 --- a/pages/passwordDetail/passwordDetail.vue +++ b/pages/passwordDetail/passwordDetail.vue @@ -54,8 +54,12 @@ export default { timeFormat, ...mapActions(useBluetoothStore, ['setLockPassword', 'closeBluetoothConnection']), ...mapActions(useLockStore, ['updatePasswordSearch', 'getPasswordList']), - ...mapActions(useBasicStore, ['backAndToast']), + ...mapActions(useBasicStore, ['backAndToast', 'getNetworkType']), async deletePassword () { + const netWork = await this.getNetworkType() + if(!netWork) { + return + } const that = this uni.showModal({ title: '提示', diff --git a/pages/passwordList/passwordList.vue b/pages/passwordList/passwordList.vue index 6efa56f..a380201 100644 --- a/pages/passwordList/passwordList.vue +++ b/pages/passwordList/passwordList.vue @@ -94,7 +94,7 @@ export default { this.clearList('password') }, methods: { - ...mapActions(useBasicStore, ['routeJump', 'getDeviceInfo']), + ...mapActions(useBasicStore, ['routeJump', 'getDeviceInfo', 'getNetworkType']), ...mapActions(useLockStore, ['getPasswordList', 'updateCurrentPasswordInfo', 'updatePasswordSearch', 'getPasswordStatus']), ...mapActions(useBluetoothStore, ['resetLockPassword', 'setLockPassword', 'closeBluetoothConnection']), toPasswordDetail(password) { @@ -104,6 +104,10 @@ export default { }) }, async deletePassword(data) { + const netWork = await this.getNetworkType() + if(!netWork) { + return + } const password = data const that = this let index = this.passwordList.findIndex(item => item.keyboardPwdId === password.keyboardPwdId) @@ -167,6 +171,10 @@ export default { }, async resetPassword() { const that = this + const netWork = await this.getNetworkType() + if(!netWork) { + return + } uni.showModal({ title: '提示', content: '确定要重置密码,该锁的所有密码都将被删除', diff --git a/pages/searchDevice/searchDevice.vue b/pages/searchDevice/searchDevice.vue index 3a33715..f9970d4 100644 --- a/pages/searchDevice/searchDevice.vue +++ b/pages/searchDevice/searchDevice.vue @@ -43,8 +43,12 @@ export default { methods: { ...mapActions(useBluetoothStore, ['getBluetoothDevices', 'stopGetBluetoothDevices', 'updateCurrentLockInfo', 'getPublicKey', 'getCommKey', 'connectBluetoothDevice', 'updateServerTimestamp', 'getLockStatus']), - ...mapActions(useBasicStore, ['getDeviceInfo', 'routeJump']), + ...mapActions(useBasicStore, ['getDeviceInfo', 'routeJump', 'getNetworkType']), async connect(device) { + const netWork = await this.getNetworkType() + if(!netWork) { + return + } uni.showLoading({ title: '连接中', mask: true diff --git a/pages/setting/setting.vue b/pages/setting/setting.vue index 18eb25a..c15ee85 100644 --- a/pages/setting/setting.vue +++ b/pages/setting/setting.vue @@ -120,7 +120,7 @@ export default { timeFormat, ...mapActions(useBluetoothStore, ['resetDevice', 'updateCurrentLockInfo']), ...mapActions(useLockStore, ['getLockList', 'updateLockSearch', 'convertWeekDaysToChineseString']), - ...mapActions(useBasicStore, ['backAndToast']), + ...mapActions(useBasicStore, ['backAndToast', 'getNetworkType']), changeRadio() { this.checked = !this.checked }, @@ -182,7 +182,11 @@ export default { }) } }, - deleteLock() { + async deleteLock() { + const netWork = await this.getNetworkType() + if(!netWork) { + return + } const that = this if(this.currentLockInfo.userType !== 110301 && this.currentLockInfo.keyRight === 1) { this.showModal = true diff --git a/stores/basic.js b/stores/basic.js index 09e440a..8183c4c 100644 --- a/stores/basic.js +++ b/stores/basic.js @@ -140,6 +140,10 @@ export const useBasicStore = defineStore('basic', { uni.getNetworkType({ success: function (res) { if(res.networkType === 'none') { + uni.showToast({ + title: '网络访问失败,请检查网络是否正常', + icon: 'none' + }) resolve(false) return } From 329f9bb5942789746a1d60b83f081d94a5df5215 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8C=83=E9=B9=8F?= Date: Sat, 7 Sep 2024 11:29:34 +0800 Subject: [PATCH 2/7] =?UTF-8?q?1.=20=E4=BF=AE=E6=94=B9=E9=87=8D=E8=BF=9E?= =?UTF-8?q?=E9=80=BB=E8=BE=91=202.=20=E4=BF=AE=E6=94=B9=E9=87=8D=E7=BD=AE?= =?UTF-8?q?=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- manifest.json | 2 +- pages/bindLock/bindLock.vue | 13 ++++++++++--- pages/searchDevice/searchDevice.vue | 13 ++++++------- stores/bluetooth.js | 25 ++++++++++++------------- 4 files changed, 29 insertions(+), 24 deletions(-) diff --git a/manifest.json b/manifest.json index f72a8c5..54b76d7 100644 --- a/manifest.json +++ b/manifest.json @@ -3,7 +3,7 @@ "appid" : "__UNI__933D519", "description" : "", "versionName" : "1.0.0", - "versionCode" : "7", + "versionCode" : "9", "transformPx" : false, /* 小程序特有相关 */ "mp-weixin" : { diff --git a/pages/bindLock/bindLock.vue b/pages/bindLock/bindLock.vue index 9aa85ee..67bb202 100644 --- a/pages/bindLock/bindLock.vue +++ b/pages/bindLock/bindLock.vue @@ -36,7 +36,7 @@ export default { ...mapActions(useBluetoothStore, ['addLockUser', 'closeBluetoothConnection', 'updateBindedDeviceName', 'closeAllBluetooth', 'initAndListenBluetooth']), ...mapActions(useLockStore, ['getLockList', 'updateLockSearch']), - ...mapActions(useBasicStore, ['backAndToast']), + ...mapActions(useBasicStore, ['backAndToast', 'getNetworkType']), uopdateName(data) { this.name = data.detail.value }, @@ -48,10 +48,15 @@ export default { }) return } + const netWork = await this.getNetworkType() + if(!netWork) { + return + } uni.showLoading({ title: '添加中', mask: true }) + this.updateBindedDeviceName(this.currentLockInfo.name) const timestamp = parseInt(new Date().getTime() / 1000) const password = (Math.floor(Math.random() * 900000) + 100000).toString() const { code: addUserCode } = await this.addLockUser({ @@ -75,12 +80,14 @@ export default { }) if(addUserCode === 0) { this.closeBluetoothConnection() - this.updateBindedDeviceName(this.currentLockInfo.name) this.closeAllBluetooth() this.initAndListenBluetooth() } else if(addUserCode === -1) { uni.hideLoading() - this.backAndToast('添加失败,请重试') + uni.showToast({ + title: '添加失败,请靠近设备并保持设备处于唤醒状态', + icon: 'none' + }) return } else { uni.hideLoading() diff --git a/pages/searchDevice/searchDevice.vue b/pages/searchDevice/searchDevice.vue index f9970d4..a489930 100644 --- a/pages/searchDevice/searchDevice.vue +++ b/pages/searchDevice/searchDevice.vue @@ -67,14 +67,14 @@ export default { deviceId: device.deviceId }) const result = await this.connectBluetoothDevice() - this.stopGetBluetoothDevices() if(result) { + this.stopGetBluetoothDevices() const { code: getPublicKeyCode } = await this.getPublicKey(this.currentLockInfo.name) console.log('获取公钥返回', getPublicKeyCode, [...this.currentLockInfo.publicKey]) if(getPublicKeyCode !== 0) { uni.hideLoading() uni.showToast({ - title: '连接失败,请重试', + title: '连接失败,请靠近设备并保持设备处于唤醒状态', icon: 'none' }) return @@ -85,7 +85,7 @@ export default { if(getCommKeyCode !== 0) { uni.hideLoading() uni.showToast({ - title: '连接失败,请重试', + title: '连接失败,请靠近设备并保持设备处于唤醒状态', icon: 'none' }) return @@ -101,7 +101,7 @@ export default { if (code !== 0) { uni.hideLoading() uni.showToast({ - title: '连接失败,请重试', + title: '连接失败,请靠近设备并保持设备处于唤醒状态', icon: 'none' }) return @@ -111,12 +111,11 @@ export default { name: 'selectAddress' }) } else { - this.getBluetoothDevices() + uni.hideLoading() uni.showToast({ - title: '连接失败,请重试', + title: '连接失败,请靠近设备并保持设备处于唤醒状态', icon: 'none' }) - uni.hideLoading() } } } diff --git a/stores/bluetooth.js b/stores/bluetooth.js index 784f5ce..c97d811 100644 --- a/stores/bluetooth.js +++ b/stores/bluetooth.js @@ -73,17 +73,15 @@ export const useBluetoothStore = defineStore('ble', { // 设备keyID keyId: '0', // 刚绑定的设备名称 - bindedDeviceName: '' + bindedDeviceNameList: [] } }, actions: { // 保存刚绑定的设备名称 updateBindedDeviceName(name) { - this.bindedDeviceName = name - setTimeout(() => { - this.bindedDeviceName = '' - console.log('清空设备名称') - }, 15000) + if(!this.bindedDeviceNameList.includes(name)) { + this.bindedDeviceNameList.push(name) + } }, // 更新keyId updateKeyId(keyId) { @@ -682,20 +680,21 @@ export const useBluetoothStore = defineStore('ble', { }) }, async fail(res) { + console.log('连接失败', res) if(res.errno === 1509007) { resolve(true) return } if(res.errno === 1509001 && number < 1) { + // 超时直接返回 + resolve(false) + return + } + + if(number < 1) { // 重新连接 resolve(await that.connectBluetoothDevice(number + 1)) } - uni.showToast({ - title: '连接失败,请靠近设备并保持设备处于唤醒状态', - icon: 'none' - }) - console.log('连接失败', res) - resolve(false) } }) }) @@ -770,7 +769,7 @@ export const useBluetoothStore = defineStore('ble', { if(deviceList[i]?.name === that.currentLockInfo.name) { const uuid = deviceList[i]?.advertisServiceUUIDs[0] console.log('设备UUID', uuid, uuid.slice(2,8), uuid.slice(30,32)) - if(uuid && uuid.slice(2,8)==='758824' && (uuid.slice(30,32)==='01' || that.bindedDeviceName === that.currentLockInfo.name)) { + if(uuid && uuid.slice(2,8)==='758824' && (uuid.slice(30,32)==='01' || that.bindedDeviceNameList.includes(that.currentLockInfo.name))) { uni.stopBluetoothDevicesDiscovery() clearTimeout(timer2) clearInterval(timer1) From 456f21be7584274322b06f8927c5e22decc0ce82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8C=83=E9=B9=8F?= Date: Sat, 7 Sep 2024 11:50:59 +0800 Subject: [PATCH 3/7] =?UTF-8?q?1.=20=E6=B7=BB=E5=8A=A0=E7=BD=91=E7=BB=9C?= =?UTF-8?q?=E5=88=A4=E6=96=AD=202.=20=E5=8E=BB=E9=99=A4=E5=8F=91=E9=80=81?= =?UTF-8?q?=E7=94=B5=E5=AD=90=E9=92=A5=E5=8C=99=E6=97=B6=E7=A9=BA=E6=98=B5?= =?UTF-8?q?=E7=A7=B0=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/createKey/createKey.vue | 8 -------- pages/home/home.vue | 6 +++++- stores/basic.js | 2 +- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/pages/createKey/createKey.vue b/pages/createKey/createKey.vue index f6d9f4e..227ee0b 100644 --- a/pages/createKey/createKey.vue +++ b/pages/createKey/createKey.vue @@ -100,14 +100,6 @@ export default { return } - if ((type === 'temporary' && this.temporaryName === '') || (type === 'permanent' && this.permanentName === '')) { - uni.showToast({ - title: '名称不能为空', - icon: 'none' - }) - return - } - if(type === 'temporary' && this.temporaryValidTime >= this.temporaryInvalidTime) { uni.showToast({ title: '失效时间必须大于生效时间', diff --git a/pages/home/home.vue b/pages/home/home.vue index b8ec76c..cf7e263 100644 --- a/pages/home/home.vue +++ b/pages/home/home.vue @@ -163,9 +163,13 @@ ...mapActions(useLockStore, ['getLockList', 'updateLockList', 'getRole', 'getTimeLimit', 'updateLockSearch', 'getPowerIcon']), ...mapActions(useBluetoothStore, ['getBluetoothStatus', 'initAndListenBluetooth', 'updateCurrentLockInfo', 'checkSetting', 'updateKeyId', 'resetDevice']), - ...mapActions(useBasicStore, ['routeJump', 'getDeviceInfo']), + ...mapActions(useBasicStore, ['routeJump', 'getDeviceInfo', 'getNetworkType']), async deleteLock(lock, groupIndex, lockIndex) { const that = this + const netWork = await this.getNetworkType() + if(!netWork) { + return + } that.$refs['swipeItem' + groupIndex][lockIndex].closeHandler() if(lock.userType !== 110301 && lock.keyRight === 1) { diff --git a/stores/basic.js b/stores/basic.js index 8183c4c..cfb8de8 100644 --- a/stores/basic.js +++ b/stores/basic.js @@ -214,7 +214,7 @@ export const useBasicStore = defineStore('basic', { title: message, icon: 'none' }) - }, 200) + }, 300) } }) } From cd14abc2774cae82e80b818f7213cc38561dc1dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8C=83=E9=B9=8F?= Date: Sat, 7 Sep 2024 13:34:37 +0800 Subject: [PATCH 4/7] =?UTF-8?q?=E9=83=A8=E5=88=86=E6=93=8D=E4=BD=9C?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=97=A0=E7=BD=91=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/createKey/createKey.vue | 7 ++++++- pages/setting/setting.vue | 4 ++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/pages/createKey/createKey.vue b/pages/createKey/createKey.vue index 227ee0b..3faf3b0 100644 --- a/pages/createKey/createKey.vue +++ b/pages/createKey/createKey.vue @@ -80,7 +80,7 @@ export default { this.temporaryInvalidTime = this.setTime() }, methods: { - ...mapActions(useBasicStore, ['getDeviceInfo', 'backAndToast']), + ...mapActions(useBasicStore, ['getDeviceInfo', 'backAndToast', 'getNetworkType']), ...mapActions(useLockStore, ['getKeyList', 'updateKeySearch']), setTime () { const now = new Date() @@ -108,6 +108,11 @@ export default { return } + const netWork = await this.getNetworkType() + if(!netWork) { + return + } + if (this.pending) { return } diff --git a/pages/setting/setting.vue b/pages/setting/setting.vue index c15ee85..94c784e 100644 --- a/pages/setting/setting.vue +++ b/pages/setting/setting.vue @@ -156,6 +156,10 @@ export default { } }, async changeUnlockApp(value) { + const netWork = await this.getNetworkType() + if(!netWork) { + return + } uni.showLoading({ title: '更新中', mask: true From 5be1b85c5cad9318bd091f9e8731b9831768e4d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8C=83=E9=B9=8F?= Date: Sat, 7 Sep 2024 13:56:25 +0800 Subject: [PATCH 5/7] =?UTF-8?q?=E9=83=A8=E5=88=86=E6=93=8D=E4=BD=9C?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=97=A0=E7=BD=91=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/safeQuestion/safeQuestion.vue | 6 +++++- pages/updateEmail/updateEmail.vue | 10 +++++++++- pages/updateName/updateName.vue | 6 +++++- pages/updatePassword/updatePassword.vue | 10 +++++++++- pages/updateSafeQuestion/updateSafeQuestion.vue | 6 +++++- pages/verifyEmail/verifyEmail.vue | 10 +++++++++- 6 files changed, 42 insertions(+), 6 deletions(-) diff --git a/pages/safeQuestion/safeQuestion.vue b/pages/safeQuestion/safeQuestion.vue index 7b59ca3..cc662c1 100644 --- a/pages/safeQuestion/safeQuestion.vue +++ b/pages/safeQuestion/safeQuestion.vue @@ -29,8 +29,12 @@ export default { this.getQuestionAnswer() }, methods: { - ...mapActions(useBasicStore, ['routeJump']), + ...mapActions(useBasicStore, ['routeJump', 'getNetworkType']), async getQuestionAnswer() { + const netWork = await this.getNetworkType() + if(!netWork) { + return + } const { code, data, message } = await getQuestionAnswerRequest() if(code === 0) { this.questionAnswer = data diff --git a/pages/updateEmail/updateEmail.vue b/pages/updateEmail/updateEmail.vue index 66242ce..f4c75ca 100644 --- a/pages/updateEmail/updateEmail.vue +++ b/pages/updateEmail/updateEmail.vue @@ -43,7 +43,7 @@ export default { }, methods: { ...mapActions(useUserStore, ['updateUserInfo']), - ...mapActions(useBasicStore, ['routeJump', 'backAndToast']), + ...mapActions(useBasicStore, ['routeJump', 'backAndToast', 'getNetworkType']), updateInputEmail(data) { this.email = data.detail.value }, @@ -61,6 +61,10 @@ export default { }) return } + const netWork = await this.getNetworkType() + if(!netWork) { + return + } const { code } = await getEmailCodeRequest({ account: this.email, channel: '2', @@ -84,6 +88,10 @@ export default { return } if (this.verificationCode.length === 6 && test.digits(this.verificationCode)) { + const netWork = await this.getNetworkType() + if(!netWork) { + return + } if(this.pending){ return } diff --git a/pages/updateName/updateName.vue b/pages/updateName/updateName.vue index 23f0ffd..ea86dd2 100644 --- a/pages/updateName/updateName.vue +++ b/pages/updateName/updateName.vue @@ -27,7 +27,7 @@ export default { }, methods: { ...mapActions(useUserStore, ['updateUserInfo']), - ...mapActions(useBasicStore, ['backAndToast']), + ...mapActions(useBasicStore, ['backAndToast', 'getNetworkType']), updateInput(data) { this.nickname = data.detail.value console.log(data) @@ -40,6 +40,10 @@ export default { }) return } + const netWork = await this.getNetworkType() + if(!netWork) { + return + } if(this.pending) { return } diff --git a/pages/updatePassword/updatePassword.vue b/pages/updatePassword/updatePassword.vue index 87e9317..ac61bd6 100644 --- a/pages/updatePassword/updatePassword.vue +++ b/pages/updatePassword/updatePassword.vue @@ -33,7 +33,7 @@ export default { }, methods: { ...mapActions(useUserStore, ['updateUserInfo']), - ...mapActions(useBasicStore, ['backAndToast']), + ...mapActions(useBasicStore, ['backAndToast', 'getNetworkType']), updateNewPassword (data) { this.password = data.detail.value }, @@ -44,6 +44,10 @@ export default { if (this.text !== '获取验证码') { return } + const netWork = await this.getNetworkType() + if(!netWork) { + return + } const { code, message } = await getEmailCodeRequest({ channel: '1', codeType: 9 @@ -92,6 +96,10 @@ export default { }) return } + const netWork = await this.getNetworkType() + if(!netWork) { + return + } if(this.pending) { return } diff --git a/pages/updateSafeQuestion/updateSafeQuestion.vue b/pages/updateSafeQuestion/updateSafeQuestion.vue index 40bbf71..598b6f1 100644 --- a/pages/updateSafeQuestion/updateSafeQuestion.vue +++ b/pages/updateSafeQuestion/updateSafeQuestion.vue @@ -76,7 +76,7 @@ export default { }, methods: { ...mapActions(useUserStore, ['updateUserInfo']), - ...mapActions(useBasicStore, ['backAndToast']), + ...mapActions(useBasicStore, ['backAndToast', 'getNetworkType']), async updateAnswer() { console.log('答案', this.answer) for(let i = 0; i < this.answer.length; i++) { @@ -97,6 +97,10 @@ export default { return } } + const netWork = await this.getNetworkType() + if(!netWork) { + return + } if(this.pending) { return } diff --git a/pages/verifyEmail/verifyEmail.vue b/pages/verifyEmail/verifyEmail.vue index a0740ef..1e5519e 100644 --- a/pages/verifyEmail/verifyEmail.vue +++ b/pages/verifyEmail/verifyEmail.vue @@ -29,11 +29,15 @@ export default { }, methods: { ...mapActions(useUserStore, ['updateUserInfo']), - ...mapActions(useBasicStore, ['routeJump']), + ...mapActions(useBasicStore, ['routeJump', 'getNetworkType']), async getEmailCode() { if(this.text !== '获取验证码') { return } + const netWork = await this.getNetworkType() + if(!netWork) { + return + } const { code } = await getEmailCodeRequest({ channel: '2', codeType: 7 @@ -49,6 +53,10 @@ export default { }, async toUpdateEmail() { if(this.verificationCode.length === 6 && test.digits(this.verificationCode)) { + const netWork = await this.getNetworkType() + if(!netWork) { + return + } const { code, data, message } = await unbindEmailTokenRequest({ verificationCode: this.verificationCode }) From 4210d5436e5720428dcdea8e3063ad2c66acbb09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8C=83=E9=B9=8F?= Date: Sat, 7 Sep 2024 14:20:45 +0800 Subject: [PATCH 6/7] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=BF=9C=E7=A8=8B?= =?UTF-8?q?=E5=BC=80=E9=94=81=E6=98=BE=E7=A4=BAbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/home/home.vue | 4 ++-- pages/keyList/keyList.vue | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pages/home/home.vue b/pages/home/home.vue index cf7e263..50d97d5 100644 --- a/pages/home/home.vue +++ b/pages/home/home.vue @@ -43,13 +43,13 @@ 余{{lock.days}}天 未生效 已冻结 - 远程开锁 {{ getTimeLimit(lock.keyType) }} diff --git a/pages/keyList/keyList.vue b/pages/keyList/keyList.vue index 4aa2274..eab770d 100644 --- a/pages/keyList/keyList.vue +++ b/pages/keyList/keyList.vue @@ -23,8 +23,8 @@ {{ key.keyName }} - + {{ getKeyStatus(key.keyStatus) }} From b4ffb0df321c8a348c96639b4bd294bb6b3a962d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8C=83=E9=B9=8F?= Date: Sat, 7 Sep 2024 14:44:29 +0800 Subject: [PATCH 7/7] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=BF=9C=E7=A8=8B?= =?UTF-8?q?=E5=BC=80=E9=94=81=E6=98=BE=E7=A4=BAbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/home/home.vue | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pages/home/home.vue b/pages/home/home.vue index 50d97d5..3900ae7 100644 --- a/pages/home/home.vue +++ b/pages/home/home.vue @@ -43,14 +43,15 @@ 余{{lock.days}}天 未生效 已冻结 - 远程开锁 + 远程开锁 + !((lock.remoteEnable === 1 && lock.keyRight === 0) || (lock.lockSetting.remoteUnlock === 1 + && lock.keyRight === 1)) === 0 ? '12rpx 24rpx 0 24rpx' :'6rpx 24rpx 0 24rpx'}"> {{ getTimeLimit(lock.keyType) }}