Skip to content

Let's use AI to Earn!

Merge branch 'master' of https://codeup.aliyun.com/61ceaff67f5aa2b43a094583/katuantuan/aitoearn-web

gaoSir6563cbd856bb
diff --cc src/api/apiReq.ts
index 9bf5efa8,363ffe81..8cca2e93
--- a/src/api/apiReq.ts
+++ b/src/api/apiReq.ts
@@@ -57,10 -62,82 +57,21 @@@ export const sendResetPasswordMailApi
};
// 重置密码
-export const resetPasswordApi = (data: { code: string; mail: string; password: string }) => {
- return sxRequest.post<LoginResponse>("/user/login/repassword/mail/back", data);
-};
-
-// 三方账户类型定义
-export interface SocialAccount {
- id: number;
- type: string;
- loginCookie: string;
- loginTime: string;
- uid: string;
- account: string;
- avatar: string;
- nickname: string;
- fansCount: number;
- readCount: number;
- likeCount: number;
- collectCount: number;
- forwardCount: number;
- commentCount: number;
- lastStatsTime: string;
- workCount: number;
- income: number;
- status: number;
- createTime: string;
- updateTime: string;
-}
-
-// 创建或更新账户
-export const createOrUpdateAccountApi = (data: Omit<SocialAccount, 'id'>) => {
- return sxRequest.post<SocialAccount>("/account/login", data);
-};
-
-// 更新账户状态
-export const updateAccountStatusApi = (data: { id: number; status: number }) => {
- return sxRequest.post<SocialAccount>("/account/status", data);
-};
-
-// 获取账户列表
-export const getAccountListApi = () => {
- return sxRequest.get<SocialAccount[]>("/account/list/all");
-};
-
-// 获取账户详情
-export const getAccountDetailApi = (id: number) => {
- return sxRequest.get<SocialAccount>(`/account/${id}`);
-};
-
-// 更新账户统计数据
-export interface UpdateAccountStatisticsParams {
- id: number;
- fansCount: number;
- readCount: number;
- likeCount: number;
- collectCount: number;
- commentCount: number;
- income: number;
- workCount: number;
-}
-
-export const updateAccountStatisticsApi = (data: UpdateAccountStatisticsParams) => {
- return sxRequest.post<SocialAccount>("/account/statistics/update", data);
-};
-
-// 删除账户
-export const deleteAccountApi = (id: number) => {
- return sxRequest.post<SocialAccount>(`/account/delete/${id}`);
+export const resetPasswordApi = (data: {
+ code: string;
+ mail: string;
+ password: string;
+}) => {
+ return sxRequest.post<LoginResponse>("user/login/repassword/mail/back", data);
};
+
+ // Google 登录参数
+ export interface GoogleLoginParams {
+ clientId: string;
+ credential: string;
+ }
+
+ // Google 登录
+ export const googleLoginApi = (data: GoogleLoginParams) => {
+ return sxRequest.post<LoginResponse>("/account/login/google", data);
+ };