diff --git a/packages/libs/lib-server/src/system/basic/service/plus-service.ts b/packages/libs/lib-server/src/system/basic/service/plus-service.ts index 7472228f..2b882cea 100644 --- a/packages/libs/lib-server/src/system/basic/service/plus-service.ts +++ b/packages/libs/lib-server/src/system/basic/service/plus-service.ts @@ -111,12 +111,15 @@ export class PlusService { return res.accessToken; } - async getVipTrial() { + async getVipTrial(vipType= "plus") { await this.register(); const plusRequestService = await this.getPlusRequestService(); const res = await plusRequestService.request({ url: '/activation/subject/vip/trialGet', method: 'POST', + data:{ + vipType + } }); if (res.license) { await this.updateLicense(res.license); diff --git a/packages/ui/certd-client/src/components/vip-button/api.ts b/packages/ui/certd-client/src/components/vip-button/api.ts index 151e8fa3..7e05c337 100644 --- a/packages/ui/certd-client/src/components/vip-button/api.ts +++ b/packages/ui/certd-client/src/components/vip-button/api.ts @@ -8,10 +8,10 @@ export async function doActive(form: any) { }); } -export async function getVipTrial(vipType:string) { +export async function getVipTrial(vipType: string) { return await request({ url: "/sys/plus/getVipTrial", method: "post", - data: {vipType}, + data: { vipType }, }); } diff --git a/packages/ui/certd-server/src/controller/sys/plus/plus-controller.ts b/packages/ui/certd-server/src/controller/sys/plus/plus-controller.ts index b5af9427..0132e498 100644 --- a/packages/ui/certd-server/src/controller/sys/plus/plus-controller.ts +++ b/packages/ui/certd-server/src/controller/sys/plus/plus-controller.ts @@ -38,8 +38,8 @@ export class SysPlusController extends BaseController { } @Post('/getVipTrial', { summary: 'sys:settings:edit' }) - async getVipTrial(@Body(ALL) body) { - const res = await this.plusService.getVipTrial(); + async getVipTrial(@Body("vipType") vipType?:string) { + const res = await this.plusService.getVipTrial(vipType); return this.ok(res); } //