perf: 支持绑定两个url地址

This commit is contained in:
xiaojunnuo
2026-02-02 16:36:43 +08:00
parent 0902349130
commit a2e9a41a7e
6 changed files with 80 additions and 25 deletions

View File

@@ -22,14 +22,13 @@ export class SysPlusController extends BaseController {
return this.ok(true);
}
@Post('/bindUrl', { summary: 'sys:settings:edit' })
async bindUrl(@Body(ALL) body: { url: string }) {
const { url } = body;
async bindUrl(@Body(ALL) body: { url: string ,url2?:string }) {
const { url,url2 } = body;
await this.plusService.register();
const installInfo: SysInstallInfo = await this.sysSettingsService.getSetting(SysInstallInfo);
await this.plusService.bindUrl(url);
await this.plusService.bindUrl(url,url2);
installInfo.bindUrl = url;
installInfo.bindUrl2 = url2;
await this.sysSettingsService.saveSetting(installInfo);
//重新验证vip

View File

@@ -1,9 +1,8 @@
import { CommonException, SysSettingsService } from "@certd/lib-server";
import { Autoload, Config, Init, Inject, Provide, Scope, ScopeEnum } from '@midwayjs/core';
import { IMidwayKoaContext, IWebMiddleware, NextFunction } from '@midwayjs/koa';
import { CommonException, SysSettingsService } from "@certd/lib-server";
import { UserSettingsService } from "../../modules/mine/service/user-settings-service.js";
import { UserService } from '../../modules/sys/authority/service/user-service.js';
import { logger } from '@certd/basic';
import {UserSettingsService} from "../../modules/mine/service/user-settings-service.js";
/**
* 重置密码模式