@certd/lib-server 1.38.4 → 1.38.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -9,7 +9,7 @@ export declare class PlusService {
9
9
  active(code: string, inviteCode?: string): Promise<void>;
10
10
  updateLicense(license: string): Promise<void>;
11
11
  verify(): Promise<void>;
12
- bindUrl(url: string): Promise<any>;
12
+ bindUrl(url: string, url2?: string): Promise<any>;
13
13
  register(): Promise<void>;
14
14
  userPreBind(userId: number): Promise<void>;
15
15
  sendEmail(email: any): Promise<void>;
@@ -17,5 +17,6 @@ export declare class PlusService {
17
17
  getVipTrial(vipType?: string): Promise<{
18
18
  duration: any;
19
19
  }>;
20
+ getTodayOrderCount(): Promise<any>;
20
21
  requestWithToken(config: HttpRequestConfig): Promise<any>;
21
22
  }
@@ -23,6 +23,7 @@ let PlusService = class PlusService {
23
23
  const installInfo = await this.sysSettingsService.getSetting(SysInstallInfo);
24
24
  const subjectId = installInfo.siteId;
25
25
  const bindUrl = installInfo.bindUrl;
26
+ const bindUrl2 = installInfo.bindUrl2;
26
27
  const installTime = installInfo.installTime;
27
28
  const saveLicense = async (license) => {
28
29
  let licenseInfo = await this.sysSettingsService.getSetting(SysLicenseInfo);
@@ -32,7 +33,7 @@ let PlusService = class PlusService {
32
33
  licenseInfo.license = license;
33
34
  await this.sysSettingsService.saveSetting(licenseInfo);
34
35
  };
35
- return new PlusRequestService({ subjectId, bindUrl, installTime, saveLicense });
36
+ return new PlusRequestService({ subjectId, bindUrl, bindUrl2, installTime, saveLicense });
36
37
  }
37
38
  async getSubjectId() {
38
39
  const installInfo = await this.sysSettingsService.getSetting(SysInstallInfo);
@@ -51,9 +52,9 @@ let PlusService = class PlusService {
51
52
  const licenseInfo = await this.sysSettingsService.getSetting(SysLicenseInfo);
52
53
  await plusRequestService.verify({ license: licenseInfo.license });
53
54
  }
54
- async bindUrl(url) {
55
+ async bindUrl(url, url2) {
55
56
  const plusRequestService = await this.getPlusRequestService();
56
- const res = await plusRequestService.bindUrl(url);
57
+ const res = await plusRequestService.bindUrl(url, url2);
57
58
  this.plusRequestService = null;
58
59
  return res;
59
60
  }
@@ -141,6 +142,11 @@ let PlusService = class PlusService {
141
142
  throw new Error('您已经领取过VIP试用了');
142
143
  }
143
144
  }
145
+ async getTodayOrderCount() {
146
+ await this.register();
147
+ const plusRequestService = await this.getPlusRequestService();
148
+ return await plusRequestService.getOrderCount();
149
+ }
144
150
  async requestWithToken(config) {
145
151
  const plusRequestService = await this.getPlusRequestService();
146
152
  const token = await this.getAccessToken();
@@ -65,6 +65,7 @@ export declare class SysInstallInfo extends BaseSettings {
65
65
  siteId?: string;
66
66
  bindUserId?: number;
67
67
  bindUrl?: string;
68
+ bindUrl2?: string;
68
69
  accountServerBaseUrl?: string;
69
70
  appKey?: string;
70
71
  }
@@ -77,6 +77,7 @@ export class SysInstallInfo extends BaseSettings {
77
77
  siteId;
78
78
  bindUserId;
79
79
  bindUrl;
80
+ bindUrl2;
80
81
  accountServerBaseUrl;
81
82
  appKey;
82
83
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@certd/lib-server",
3
- "version": "1.38.4",
3
+ "version": "1.38.5",
4
4
  "description": "midway with flyway, sql upgrade way ",
5
5
  "private": false,
6
6
  "type": "module",
@@ -28,11 +28,11 @@
28
28
  ],
29
29
  "license": "AGPL",
30
30
  "dependencies": {
31
- "@certd/acme-client": "^1.38.4",
32
- "@certd/basic": "^1.38.4",
33
- "@certd/pipeline": "^1.38.4",
34
- "@certd/plugin-lib": "^1.38.4",
35
- "@certd/plus-core": "^1.38.4",
31
+ "@certd/acme-client": "^1.38.5",
32
+ "@certd/basic": "^1.38.5",
33
+ "@certd/pipeline": "^1.38.5",
34
+ "@certd/plugin-lib": "^1.38.5",
35
+ "@certd/plus-core": "^1.38.5",
36
36
  "@midwayjs/cache": "3.14.0",
37
37
  "@midwayjs/core": "3.20.11",
38
38
  "@midwayjs/i18n": "3.20.13",
@@ -64,5 +64,5 @@
64
64
  "typeorm": "^0.3.11",
65
65
  "typescript": "^5.4.2"
66
66
  },
67
- "gitHead": "84291482732687cc8162c6505666ba2b29b02918"
67
+ "gitHead": "eeb1f27fa47ddc616451f3e5a8fb8d1de345d252"
68
68
  }