1. 修改首页列表刷新提示

2. 缩短请求超时时间
3. 去除重置密码空列表判断
This commit is contained in:
范鹏 2024-09-06 11:48:10 +08:00
parent 09b45762ce
commit 95ec088d54
3 changed files with 14 additions and 14 deletions

View File

@ -355,11 +355,18 @@
...this.lockSearch,
pageNo: 1
})
await this.getLockList(this.lockSearch)
uni.showToast({
title: '刷新成功',
icon: 'none'
})
const { code, message } = await this.getLockList(this.lockSearch)
if(code === 0) {
uni.showToast({
title: '刷新成功',
icon: 'none'
})
} else {
uni.showToast({
title: message,
icon: 'none'
})
}
this.refresherTriggered = false
},
async changeSearch(data) {

View File

@ -167,13 +167,6 @@ export default {
},
async resetPassword() {
const that = this
if(this.passwordList.length === 0) {
uni.showToast({
title: '暂无密码,无需重置',
icon: 'none'
})
return
}
uni.showModal({
title: '提示',
content: '确定要重置密码,该锁的所有密码都将被删除',

View File

@ -28,13 +28,13 @@ const request = (config) => {
const timestamp = new Date().getTime()
timer = setTimeout(() => {
resolve({ code: -1, message: '网络访问失败,请检查网络是否正常' })
}, 8000)
}, 5000)
uni.request({
url: URL,
method,
header,
data,
timeout: 7000,
timeout: 4000,
async success(res) {
const { statusCode, data } = res
if(timer) {