From 6e3f39127fa0d1d9b42da15904cdf4217a3ae9d6 Mon Sep 17 00:00:00 2001 From: baoshiwei <baoshiwei@shlanbao.cn> Date: 星期五, 11 七月 2025 09:53:12 +0800 Subject: [PATCH] refactor(web-antd): 重构预测性维护页面 --- eims-ui-mobile/src/utils/http.ts | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/eims-ui-mobile/src/utils/http.ts b/eims-ui-mobile/src/utils/http.ts index f1d74ce..b9f2ada 100644 --- a/eims-ui-mobile/src/utils/http.ts +++ b/eims-ui-mobile/src/utils/http.ts @@ -36,10 +36,12 @@ uni.navigateTo({ url: redirectRoute }) reject(res) } else { + // 鍏朵粬閿欒 -> 鏍规嵁鍚庣閿欒淇℃伅杞绘彁绀� uni.showToast({ icon: 'none', title: (res.data as IResData<T>).msg || '璇锋眰閿欒', }) + reject(res) } } else if (res.statusCode === 401) { // 401閿欒 -> 娓呯悊鐢ㄦ埛淇℃伅锛岃烦杞埌鐧诲綍椤� @@ -117,6 +119,14 @@ }) } +export const httpDel = <T>(url: string) => { + return http<T>({ + url, + method: 'DELETE', + }) +} + http.get = httpGet http.post = httpPost http.put = httpPut +http.del = httpDel -- Gitblit v1.9.3