From 319942dc395c0296cb099a12f5ae99ba9b892be7 Mon Sep 17 00:00:00 2001 From: panda <1565636758@qq.com> Date: Mon, 15 Dec 2025 16:33:02 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E5=88=A0=E9=99=A4httpPostOriginal?= =?UTF-8?q?=E6=96=B9=E6=B3=95=EF=BC=8C=E9=80=9A=E8=BF=87options=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/login.ts | 4 ++-- src/http/http.ts | 16 ---------------- src/http/types.ts | 2 ++ 3 files changed, 4 insertions(+), 18 deletions(-) diff --git a/src/api/login.ts b/src/api/login.ts index 8cfe2f1..7766609 100644 --- a/src/api/login.ts +++ b/src/api/login.ts @@ -70,7 +70,7 @@ export interface AuthResetPasswordReqVO { * @returns ICaptcha 验证码 */ export function getCode(data: any) { - return http.postOriginal('/system/captcha/get', data) + return http.post('/system/captcha/get', data, null, null, { original: true }) } /** @@ -79,7 +79,7 @@ export function getCode(data: any) { * @returns Promise 包含校验结果 */ export function checkCaptcha(data: any) { - return http.postOriginal('/system/captcha/check', data) + return http.post('/system/captcha/check', data, null, null, { original: true }) } /** 使用账号密码登录 */ diff --git a/src/http/http.ts b/src/http/http.ts index 8d68064..9197799 100644 --- a/src/http/http.ts +++ b/src/http/http.ts @@ -200,24 +200,8 @@ export function httpDelete(url: string, query?: Record, header?: }) } -/** - * POST 请求(返回原始数据) - */ -export function httpPostOriginal(url: string, data?: Record, query?: Record, header?: Record, options?: Partial) { - return http({ - url, - data, - query, - method: 'POST', - header, - original: true, - ...options, - }) -} - // 支持与 axios 类似的API调用 http.get = httpGet http.post = httpPost http.put = httpPut http.delete = httpDelete -http.postOriginal = httpPostOriginal diff --git a/src/http/types.ts b/src/http/types.ts index 0d0e1e1..46cf60d 100644 --- a/src/http/types.ts +++ b/src/http/types.ts @@ -34,3 +34,5 @@ export interface PageResult { list: T[] total: number } +/** 加载状态枚举 - 从 wot-design-uni 重新导出 */ +export type { LoadMoreState } from 'wot-design-uni/components/wd-loadmore/types'