iv-npm 1.7.109 → 1.7.111

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iv-npm",
3
- "version": "1.7.109",
3
+ "version": "1.7.111",
4
4
  "description": "公共通用包",
5
5
  "author": "Mr.Cong",
6
6
  "license": "ISC",
@@ -83,7 +83,7 @@ declare function buildURL(url: string, params: any): string;
83
83
 
84
84
  declare function apiConfiger(config: any): any;
85
85
 
86
- declare type HostKey = "BASE_URL" | "MRP_URL" | "MRP2_URL" | "ASSET_URL" | "ASSETS_URL" | "GATEWAY_URL" | "SFM_URL" | "CCFLOW_URL";
86
+ declare type HostKey = "BASE_URL" | "MRP_URL" | "MRP2_URL" | "ASSET_URL" | "ASSETS_URL" | "GATEWAY_URL" | "SFM_URL" | "CCFLOW_URL" | "SHARECOOL_URL";
87
87
  declare function hostConfiger(key: HostKey): string;
88
88
 
89
89
  declare type formatType = {
@@ -169,6 +169,9 @@ function buildURL(url, params) {
169
169
  var hostname = window.location.hostname.split(".");
170
170
  var protocol = window.location.protocol;
171
171
  function apiConfiger(config) {
172
+ if (config.requestBase == "SHARECOOL_URL") {
173
+ config.baseURL = process.env.NODE_ENV == "development" ? "/mrp" : `${protocol}//mrp.${hostname[1]}.${hostname[2]}`;
174
+ }
172
175
  if (config.requestBase == "USER_BASE_URL") {
173
176
  config.baseURL = process.env.NODE_ENV == "development" ? "/user" : `${protocol}//basis.${hostname[1]}.${hostname[2]}`;
174
177
  }
@@ -236,8 +239,14 @@ function hostConfiger(key) {
236
239
  ASSETS_URL: "https://assets.nacho.cn",
237
240
  GATEWAY_URL: "https://gateway.nacho.cn",
238
241
  SFM_URL: "https://sfm.nacho.cn",
239
- CCFLOW_URL: "https://ccflow.nacho.cn/"
242
+ CCFLOW_URL: "https://ccflow.nacho.cn/",
243
+ SHARECOOL_URL: "https://mrp.sharecool.com/"
240
244
  };
245
+ try {
246
+ if (process.env.VITE_APP_SHARECOOL_URL)
247
+ devHost.SHARECOOL_URL = process.env.VITE_APP_SHARECOOL_URL;
248
+ } catch (error) {
249
+ }
241
250
  try {
242
251
  if (process.env.VITE_APP_BASE_URL)
243
252
  devHost.BASE_URL = process.env.VITE_APP_BASE_URL;
@@ -306,6 +315,9 @@ function hostConfiger(key) {
306
315
  case "CCFLOW_URL":
307
316
  preString = "ccflow";
308
317
  break;
318
+ case "SHARECOOL_URL":
319
+ preString = "mrp";
320
+ break;
309
321
  default:
310
322
  throw new Error("no matching arguments\uFF01");
311
323
  }