Skip to content

Let's use AI to Earn!

feat: 补充参数

牛文政992b9ad6e454
diff --git a/src/api/task.ts b/src/api/task.ts
index 52bc8c32..5492963c 100644
--- a/src/api/task.ts
+++ b/src/api/task.ts
@@ -6,7 +6,7 @@
* @Description: 任务
*/
import http, { hotHttp } from './request';
-import { MineTaskListParams, TaskListParams, UserTask } from './types/task';
+import { ApplyTask, MineTaskListParams, UserTask } from './types/task';
import { Task, TaskDataInfo } from 'commont/types/task';
import { Pagination } from './types';
import { UserWalletRecord } from './types/finance';
@@ -69,14 +69,10 @@ export const taskApi = {
/**
* 申请任务
*/
- taskApply<T extends TaskDataInfo>(id: string) {
- return http.post<Task<T>>(
- `/tasks/apply/${id}`,
- {},
- {
- isToken: true,
- },
- );
+ taskApply<T extends TaskDataInfo>(id: string, data: ApplyTask) {
+ return http.post<Task<T>>(`/tasks/apply/${id}`, data, {
+ isToken: true,
+ });
},
/**
diff --git a/src/api/types/task.ts b/src/api/types/task.ts
index f971484e..e5180723 100644
--- a/src/api/types/task.ts
+++ b/src/api/types/task.ts
@@ -7,6 +7,7 @@
*/
import { Task, TaskDataInfo, TaskType } from 'commont/types/task';
import { ApiCorrectQuery } from '.';
+import { AccountType } from '@@/AccountEnum';
export enum UserTaskStatus {
DODING = 'doing', // 进行中
@@ -55,3 +56,9 @@ export interface UserTask<T extends Task<TaskDataInfo> | string> {
createTime: string;
updateTime: string;
}
+
+export interface ApplyTask {
+ account: string;
+ uid: string;
+ accountType: AccountType;
+}
diff --git a/src/api/types/user-t.ts b/src/api/types/user-t.ts
index 261f561c..aa0edead 100644
--- a/src/api/types/user-t.ts
+++ b/src/api/types/user-t.ts
@@ -2,7 +2,6 @@ export interface PhoneLoginParams {
phone: string;
code: string;
openId?: string; // 微信公众号的openId
- invitePhone?: string;
inviteCode?: string;
}
diff --git a/src/api/user.ts b/src/api/user.ts
index 5f7bcd19..63d04a5b 100644
--- a/src/api/user.ts
+++ b/src/api/user.ts
@@ -79,4 +79,9 @@ export const userApi = {
bindPhone(data: { phone: string; code: string; userId: string }) {
return http.post('/api/user/bind-phone', data);
},
+
+ // 获取我的邀请码
+ getMinePopularizeCode() {
+ return http.get<string>('user/pop/code');
+ },
};