|
@@ -237,6 +237,45 @@ export class UpgradePackageItem extends DataModel<UpgradePackageItem> {
|
|
|
deletetime = '' as string | null;
|
|
deletetime = '' as string | null;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+export class GrowthTaskItem extends DataModel<GrowthTaskItem> {
|
|
|
|
|
+ constructor() {
|
|
|
|
|
+ super(GrowthTaskItem, '成长任务');
|
|
|
|
|
+ this.setNameMapperCase('Camel', 'Snake');
|
|
|
|
|
+ this._convertTable = {
|
|
|
|
|
+ id: { clientSide: 'number', serverSide: 'number', clientSideRequired: true },
|
|
|
|
|
+ villageId: { clientSide: 'number', serverSide: 'number' },
|
|
|
|
|
+ points: { clientSide: 'number', serverSide: 'number' },
|
|
|
|
|
+ limitNum: { clientSide: 'number', serverSide: 'number' },
|
|
|
|
|
+ rewardWater: { clientSide: 'number', serverSide: 'number' },
|
|
|
|
|
+ rewardLight: { clientSide: 'number', serverSide: 'number' },
|
|
|
|
|
+ rewardFruit: { clientSide: 'number', serverSide: 'number' },
|
|
|
|
|
+ status: { clientSide: 'number', serverSide: 'number' },
|
|
|
|
|
+ weight: { clientSide: 'number', serverSide: 'number' },
|
|
|
|
|
+ };
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ id!: number;
|
|
|
|
|
+ taskKey = '';
|
|
|
|
|
+ villageId = 0;
|
|
|
|
|
+ name = '';
|
|
|
|
|
+ desc = '';
|
|
|
|
|
+ points = 0;
|
|
|
|
|
+ /** 限制类型: unlimited=无限制, day=每日限制, total=次数限制 */
|
|
|
|
|
+ limitType = '' as 'unlimited' | 'day' | 'total' | string;
|
|
|
|
|
+ limitNum = 0;
|
|
|
|
|
+ rewardWater = 0;
|
|
|
|
|
+ rewardLight = 0;
|
|
|
|
|
+ rewardFruit = 0;
|
|
|
|
|
+ /** 状态: 0=未启用, 1=启用 */
|
|
|
|
|
+ status = 0;
|
|
|
|
|
+ weight = 0;
|
|
|
|
|
+ limitTypeText = '';
|
|
|
|
|
+ statusText = '';
|
|
|
|
|
+ createtime = '' as string | null;
|
|
|
|
|
+ updatetime = '' as string | null;
|
|
|
|
|
+ deletetime = '' as string | null;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
export class DropFruitResult extends DataModel<DropFruitResult> {
|
|
export class DropFruitResult extends DataModel<DropFruitResult> {
|
|
|
constructor() {
|
|
constructor() {
|
|
|
super(DropFruitResult, '产果结果');
|
|
super(DropFruitResult, '产果结果');
|
|
@@ -479,6 +518,28 @@ export class TreeApi extends AppServerRequestModule<DataModel> {
|
|
|
return { list, total: list.length };
|
|
return { list, total: list.length };
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ /** 任务列表 */
|
|
|
|
|
+ async getTaskList(options?: {
|
|
|
|
|
+ page?: number;
|
|
|
|
|
+ pageSize?: number;
|
|
|
|
|
+ keywords?: string;
|
|
|
|
|
+ }) {
|
|
|
|
|
+ const res = await this.post<PagedGrowthResponse>(
|
|
|
|
|
+ '/village/growth/taskList',
|
|
|
|
|
+ '任务列表',
|
|
|
|
|
+ {
|
|
|
|
|
+ page: options?.page,
|
|
|
|
|
+ pageSize: options?.pageSize,
|
|
|
|
|
+ keywords: options?.keywords,
|
|
|
|
|
+ },
|
|
|
|
|
+ );
|
|
|
|
|
+ return this.parsePagedList<GrowthTaskItem>(
|
|
|
|
|
+ GrowthTaskItem,
|
|
|
|
|
+ res.requireData(),
|
|
|
|
|
+ '成长任务',
|
|
|
|
|
+ );
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
/** 任务日志列表 */
|
|
/** 任务日志列表 */
|
|
|
async getTaskLogList(search?: GrowthLogSearch) {
|
|
async getTaskLogList(search?: GrowthLogSearch) {
|
|
|
const res = await this.post<PagedGrowthResponse>(
|
|
const res = await this.post<PagedGrowthResponse>(
|