优化:去掉不必要的loading

This commit is contained in:
2025-12-12 11:57:43 +08:00
parent 6e5d63febe
commit 04e2196942
8 changed files with 66 additions and 28 deletions

View File

@@ -8,7 +8,7 @@ import type { ILoginResponse } from '@/types/user'
* @param code 验证码
*/
export async function loginWithCode(tel: string, code: string) {
const res = await mainClient.request<IApiResponse<ILoginResponse>>({
const res = await mainClient.request<ILoginResponse>({
url: 'book/user/registerOrLogin',
method: 'GET',
data: { tel, code }
@@ -22,7 +22,7 @@ export async function loginWithCode(tel: string, code: string) {
* @param password 密码
*/
export async function loginWithPassword(phone: string, password: string) {
const res = await mainClient.request<IApiResponse<ILoginResponse>>({
const res = await mainClient.request<ILoginResponse>({
url: 'book/user/login',
method: 'POST',
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },