初始化2

This commit is contained in:
2026-04-08 17:10:58 +08:00
commit 4986d90eb9
532 changed files with 112617 additions and 0 deletions

18
app/api/user/index.ts Normal file
View File

@@ -0,0 +1,18 @@
import request from '@/utils/request';
import type { ApiResult } from '@/api';
import type { User } from './model';
import { SERVER_API_URL } from '@/config/setting';
/**
* 修改当前登录用户信息
*/
export async function authUser(data: User) {
const res = await request.put<ApiResult<unknown>>(
SERVER_API_URL + '/auth/user',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}