perf: 将请求超时和按钮禁用时间从5000毫秒增加到10000毫秒

修改了axios配置和多个页面中的按钮禁用逻辑,延长超时时间以改善用户体验
This commit is contained in:
dzq 2025-07-07 09:58:37 +08:00
parent 602c6b6b82
commit 528009e6d5
5 changed files with 5 additions and 5 deletions

View File

@ -111,7 +111,7 @@ function createRequest(instance: AxiosInstance) {
// 请求体
data: {},
// 请求超时
timeout: 5000,
timeout: 10000,
// 跨域请求时是否携带 Cookies
withCredentials: false
}

View File

@ -217,7 +217,7 @@ const handleOpenCabinet = async () => {
} finally {
setTimeout(() => {
isButtonDisabled.value = false
}, 5000)
}, 10000)
}
}

View File

@ -184,7 +184,7 @@ const handleOpenCell = async (approvalGoodsCellId: number) => {
} finally {
setTimeout(() => {
isButtonDisabled.value = false;
}, 5000);
}, 10000);
}
};

View File

@ -41,7 +41,7 @@ async function handleOpenCabinet(orderId: number, orderGoodsId: number) {
} finally {
setTimeout((currentId) => {
delete isButtonDisabled.value[currentId]
}, 5000, orderGoodsId)
}, 10000, orderGoodsId)
}
}

View File

@ -90,7 +90,7 @@ async function handleOpenCabinet(item: OrderGoods) {
} finally {
setTimeout((currentId) => {
delete isButtonDisabled.value[currentId]
}, 5000, orderGoodsId)
}, 10000, orderGoodsId)
}
}
</script>