Merge branch 'v2-dev-buy' into v2-dev

This commit is contained in:
xiaojunnuo
2025-11-09 02:06:57 +08:00
13 changed files with 216 additions and 89 deletions
@@ -1,5 +1,6 @@
import { ALL, Body, Controller, Inject, Post, Provide } from '@midwayjs/core';
import { BaseController, PlusService, SysInstallInfo, SysSettingsService } from '@certd/lib-server';
import { logger } from '@certd/basic';
/**
*/
@@ -31,15 +32,20 @@ export class SysPlusController extends BaseController {
installInfo.bindUrl = url;
await this.sysSettingsService.saveSetting(installInfo);
//重新验证配置
await this.plusService.verify();
//重新验证vip
try{
await this.plusService.verify();
}catch(e){
logger.error(`验证配置失败:${e}`);
}
return this.ok(true);
}
@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);
}
//
@@ -134,6 +134,8 @@ export class CnameRecordService extends BaseService<CnameRecordEntity> {
if (!param.id) {
throw new ValidateException("id不能为空");
}
//hostRecord包含所有权校验信息,不允许用户修改hostRecord
delete param.hostRecord
const old = await this.info(param.id);
if (!old) {