@aliyun-obv/api 4.7.3 → 4.7.4
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/api.es.js +10 -0
- package/package.json +1 -1
package/dist/api.es.js
CHANGED
|
@@ -96,6 +96,16 @@ class BaseFetch {
|
|
|
96
96
|
params.region = re[1];
|
|
97
97
|
}
|
|
98
98
|
}
|
|
99
|
+
if (params.region == null) {
|
|
100
|
+
try {
|
|
101
|
+
const url2 = new URL(window.location.href);
|
|
102
|
+
const defaultRegion = url2.searchParams.get("__default_region__");
|
|
103
|
+
if (defaultRegion) {
|
|
104
|
+
params.region = defaultRegion;
|
|
105
|
+
}
|
|
106
|
+
} catch (_e) {
|
|
107
|
+
}
|
|
108
|
+
}
|
|
99
109
|
let url = api;
|
|
100
110
|
let newInit = init;
|
|
101
111
|
if (hasBaseURL && !(url.startsWith("http:") || url.startsWith("https:"))) {
|
package/package.json
CHANGED