update service list

This commit is contained in:
AceDataCloud committed 2022-12-29 18:51:17 +08:00
1 parent 0ae8c4a003
commit 7e38c8944a
29 files changed
+270 -470

No files matched your search

+2
View File
@@ -0,0 +1,2 @@
export * from './models';
export * from './operator';
+15
View File
@@ -0,0 +1,15 @@
export interface IUser {
id: string;
username?: string;
first_name?: string;
last_name?: string;
email?: string;
nickname?: string;
gender?: number;
city?: string;
province?: string;
country?: string;
avatar?: string;
}
export interface IUserDetailResponse extends IUser {}
+23
View File
@@ -0,0 +1,23 @@
import { AxiosResponse } from 'axios';
import { httpClient } from '../instance';
import { IUserDetailResponse, IUser } from './models';
class UserOperator {
async getMe(): Promise<AxiosResponse<IUserDetailResponse>> {
return httpClient.get('/me');
}
async updateMe(data: IUser): Promise<AxiosResponse<IUserDetailResponse>> {
return httpClient.put('/me', data);
}
async getVerify(): Promise<AxiosResponse<IUserDetailResponse>> {
return httpClient.get('/verify');
}
async updateVerify(data: IUser): Promise<AxiosResponse<IUserDetailResponse>> {
return httpClient.put('/verify', data);
}
}
export const userOperator = new UserOperator();