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