Skip to content

Commit 4b1486a

Browse files
committed
refactor: 优化 HTTP 错误提示显示时长
1 parent 4b073ef commit 4b1486a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/utils/http.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,10 @@ const http: AxiosInstance = axios.create({
3636

3737
const handleError = (msg: string) => {
3838
if (msg.length >= 15) {
39-
return notificationErrorWrapper(msg || '服务器端错误')
39+
return notificationErrorWrapper({
40+
content: msg || '服务器端错误',
41+
duration: 5 * 1000,
42+
})
4043
}
4144
return messageErrorWrapper({
4245
content: msg || '服务器端错误',

0 commit comments

Comments
 (0)