部分操作添加无网判断

This commit is contained in:
范鹏 2024-09-07 13:34:37 +08:00
parent 456f21be75
commit cd14abc277
2 changed files with 10 additions and 1 deletions

View File

@ -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
}

View File

@ -156,6 +156,10 @@ export default {
}
},
async changeUnlockApp(value) {
const netWork = await this.getNetworkType()
if(!netWork) {
return
}
uni.showLoading({
title: '更新中',
mask: true