hifun-tools 1.4.40 → 1.4.42
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.
- package/dist/init/index.js +10 -3
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
package/dist/init/index.js
CHANGED
|
@@ -128,7 +128,7 @@ class InitCls {
|
|
|
128
128
|
if (lineDictData) {
|
|
129
129
|
try {
|
|
130
130
|
const data = JSON.parse(AesDecrypt(lineDictData));
|
|
131
|
-
const host =
|
|
131
|
+
const host = getHostUrl();
|
|
132
132
|
if (this.getIsApp()) {
|
|
133
133
|
this.tenantDict = {
|
|
134
134
|
browserCheck: [],
|
|
@@ -159,7 +159,7 @@ class InitCls {
|
|
|
159
159
|
try {
|
|
160
160
|
const rawText = await this._fetchLineDict();
|
|
161
161
|
const data = JSON.parse(AesDecrypt(rawText));
|
|
162
|
-
const host =
|
|
162
|
+
const host = getHostUrl();
|
|
163
163
|
this.tenantDictList = [...data];
|
|
164
164
|
if (this.getIsApp()) {
|
|
165
165
|
this.tenantDict = {
|
|
@@ -187,7 +187,7 @@ class InitCls {
|
|
|
187
187
|
}
|
|
188
188
|
/** 匹配默认租户 */
|
|
189
189
|
_matchDefaultTenant() {
|
|
190
|
-
const host =
|
|
190
|
+
const host = getHostUrl();
|
|
191
191
|
if (this.getIsApp()) {
|
|
192
192
|
console.info("🏠 匹配到app传入租户");
|
|
193
193
|
return { tenant: this.appTenant };
|
|
@@ -330,6 +330,10 @@ class InitCls {
|
|
|
330
330
|
async _loadGatewayConfig(retry = false, lineAddressData) {
|
|
331
331
|
if (this.domainBaseUrl && !retry)
|
|
332
332
|
return this.domainBaseUrl;
|
|
333
|
+
if (this.defaultBaseUrl && !retry) {
|
|
334
|
+
this.domainBaseUrl = this.defaultBaseUrl;
|
|
335
|
+
return this.domainBaseUrl;
|
|
336
|
+
}
|
|
333
337
|
const setBaseUrl = async (list) => {
|
|
334
338
|
this.domainBaseUrl = toStandardUrl(await getOptimalDecodedString(list));
|
|
335
339
|
return this.domainBaseUrl;
|
|
@@ -409,4 +413,7 @@ class InitCls {
|
|
|
409
413
|
}
|
|
410
414
|
const HF = new InitCls();
|
|
411
415
|
const t1BackGateWay = ["https://s3.t1game888.com/gateway/lineAddress.txt"];
|
|
416
|
+
function getHostUrl() {
|
|
417
|
+
return getDomain(location.host) ? getDomain(location.host) : location.host;
|
|
418
|
+
}
|
|
412
419
|
export { HF, isDomainMatch, toStandardUrl, AesEncrypt, AesDecrypt, filterSmartLines, matchBrowser, getOptimalDecodedString, };
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "1.4.
|
|
1
|
+
export declare const VERSION = "1.4.41";
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = "1.4.
|
|
1
|
+
export const VERSION = "1.4.41";
|