mirror of https://github.com/certd/certd
fix: 修复某些地区被屏蔽无法激活专业版的bug
parent
8e32156aa0
commit
7532a96085
|
@ -8,7 +8,7 @@ export class HttpError extends Error {
|
||||||
status?: number;
|
status?: number;
|
||||||
statusText?: string;
|
statusText?: string;
|
||||||
code?: string;
|
code?: string;
|
||||||
request?: { url: string; method: string; params?: any; data?: any };
|
request?: { baseURL: string; url: string; method: string; params?: any; data?: any };
|
||||||
response?: { data: any };
|
response?: { data: any };
|
||||||
cause?: any;
|
cause?: any;
|
||||||
constructor(error: any) {
|
constructor(error: any) {
|
||||||
|
@ -23,6 +23,7 @@ export class HttpError extends Error {
|
||||||
this.status = error.response?.status;
|
this.status = error.response?.status;
|
||||||
this.statusText = error.response?.statusText;
|
this.statusText = error.response?.statusText;
|
||||||
this.request = {
|
this.request = {
|
||||||
|
baseURL: error.config?.baseURL,
|
||||||
url: error.config?.url,
|
url: error.config?.url,
|
||||||
method: error.config?.method,
|
method: error.config?.method,
|
||||||
params: error.config?.params,
|
params: error.config?.params,
|
||||||
|
|
|
@ -3,9 +3,10 @@
|
||||||
#plus:
|
#plus:
|
||||||
# server:
|
# server:
|
||||||
# baseUrl: 'http://127.0.0.1:11007'
|
# baseUrl: 'http://127.0.0.1:11007'
|
||||||
|
|
||||||
plus:
|
plus:
|
||||||
server:
|
server:
|
||||||
baseUrl: 'https://api.ai.handsfree.work'
|
baseUrls: ['https://api.ai.handsfree.work', 'https://api.ai.docmirror.cn']
|
||||||
#typeorm:
|
#typeorm:
|
||||||
# dataSource:
|
# dataSource:
|
||||||
# default:
|
# default:
|
||||||
|
|
|
@ -9,8 +9,7 @@ typeorm:
|
||||||
|
|
||||||
plus:
|
plus:
|
||||||
server:
|
server:
|
||||||
baseUrl: 'https://api.ai.handsfree.work'
|
baseUrls: ['https://api.ai.handsfree.work', 'https://api.ai.docmirror.cn']
|
||||||
|
|
||||||
account:
|
account:
|
||||||
server:
|
server:
|
||||||
baseUrl: 'https://ai.handsfree.work/subject'
|
baseUrl: 'https://ai.handsfree.work/subject'
|
||||||
|
|
|
@ -86,7 +86,7 @@ const development = {
|
||||||
resetAdminPasswd: false,
|
resetAdminPasswd: false,
|
||||||
},
|
},
|
||||||
plus: {
|
plus: {
|
||||||
serverBaseUrl: 'http://127.0.0.1:11007',
|
serverBaseUrls: ['http://127.0.0.1:11007'],
|
||||||
},
|
},
|
||||||
} as MidwayConfig;
|
} as MidwayConfig;
|
||||||
mergeConfig(development, 'development');
|
mergeConfig(development, 'development');
|
||||||
|
|
|
@ -9,8 +9,8 @@ import { logger } from '../../../utils/logger.js';
|
||||||
export class PlusService {
|
export class PlusService {
|
||||||
@Inject()
|
@Inject()
|
||||||
sysSettingsService: SysSettingsService;
|
sysSettingsService: SysSettingsService;
|
||||||
@Config('plus.server.baseUrl')
|
@Config('plus.server.baseUrls')
|
||||||
plusServerBaseUrl;
|
plusServerBaseUrls: string[];
|
||||||
|
|
||||||
plusRequestService: PlusRequestService;
|
plusRequestService: PlusRequestService;
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@ export class PlusService {
|
||||||
async init() {
|
async init() {
|
||||||
const installInfo: SysInstallInfo = await this.sysSettingsService.getSetting(SysInstallInfo);
|
const installInfo: SysInstallInfo = await this.sysSettingsService.getSetting(SysInstallInfo);
|
||||||
this.plusRequestService = new PlusRequestService({
|
this.plusRequestService = new PlusRequestService({
|
||||||
plusServerBaseUrl: this.plusServerBaseUrl,
|
plusServerBaseUrls: this.plusServerBaseUrls,
|
||||||
http: http,
|
http: http,
|
||||||
logger,
|
logger,
|
||||||
subjectId: installInfo.siteId,
|
subjectId: installInfo.siteId,
|
||||||
|
|
Loading…
Reference in New Issue