iv-npm 1.4.38 → 1.4.40

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.4.38",
3
+ "version": "1.4.40",
4
4
  "description": "公共通用包",
5
5
  "author": "Mr.Cong",
6
6
  "license": "ISC",
@@ -48,7 +48,7 @@ declare function buildURL(url: string, params: any): string;
48
48
 
49
49
  declare function apiConfiger(config: any): any;
50
50
 
51
- declare type HostKey = "BASE_URL" | "MRP_URL" | "MRP2_URL" | "ASSET_URL";
51
+ declare type HostKey = "BASE_URL" | "MRP_URL" | "MRP2_URL" | "ASSET_URL" | "GATEWAY_URL";
52
52
  declare function hostConfiger(key: HostKey): string;
53
53
 
54
54
  declare type formatType = {
@@ -131,6 +131,9 @@ function apiConfiger(config) {
131
131
  if (config.requestBase == "ROOT_BASE_URL") {
132
132
  config.baseURL = process.env.NODE_ENV == "development" ? "/root" : `${protocol}//basis.${hostname[1]}.${hostname[2]}`;
133
133
  }
134
+ if (config.requestBase == "GATEWAY_URL") {
135
+ config.baseURL = process.env.NODE_ENV == "development" ? "/gateway" : `${protocol}//gateway.${hostname[1]}.${hostname[2]}`;
136
+ }
134
137
  return config;
135
138
  }
136
139
 
@@ -143,7 +146,8 @@ function hostConfiger(key) {
143
146
  BASE_URL: "https://basis.nacho.cn",
144
147
  MRP_URL: "https://mrp.nacho.cn",
145
148
  MRP2_URL: "https://mrp2.nacho.cn",
146
- ASSET_URL: "https://gateway.nacho.cn"
149
+ ASSET_URL: "https://gateway.nacho.cn",
150
+ GATEWAY_URL: "https://gateway.nacho.cn"
147
151
  };
148
152
  try {
149
153
  if (process.env.VITE_APP_BASE_URL)
@@ -209,6 +213,9 @@ function hostConfiger(key) {
209
213
  case "ASSET_URL":
210
214
  preString = "gateway";
211
215
  break;
216
+ case "GATEWAY_URL":
217
+ preString = "gateway";
218
+ break;
212
219
  default:
213
220
  throw new Error("no matching arguments\uFF01");
214
221
  }