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'