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, ...this.lockSearch,
pageNo: 1 pageNo: 1
}) })
await this.getLockList(this.lockSearch) const { code, message } = await this.getLockList(this.lockSearch)
uni.showToast({ if(code === 0) {
title: '刷新成功', uni.showToast({
icon: 'none' title: '刷新成功',
}) icon: 'none'
})
} else {
uni.showToast({
title: message,
icon: 'none'
})
}
this.refresherTriggered = false this.refresherTriggered = false
}, },
async changeSearch(data) { async changeSearch(data) {

View File

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

View File

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