|
@@ -1,71 +1,20 @@
|
|
|
let httpApi = "";
|
|
|
let doorplateImgUrl='';
|
|
|
|
|
|
-function setFetchUrlByEnv(env) {
|
|
|
-
|
|
|
- httpApi = "https://fhszmp.fh.gov.cn:9080";
|
|
|
-
|
|
|
- doorplateImgUrl='https://fhszmp.fh.gov.cn:8090/digital-doorplateAddrUrl'
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+function setFetchUrlByEnv() {
|
|
|
+
|
|
|
+ const currentUrl = window.location.href;
|
|
|
+ console.log("currentUrl", currentUrl);
|
|
|
+ if (currentUrl.includes('debug=true')) {
|
|
|
+ httpApi = 'https://fhszmp.fh.gov.cn:9080';
|
|
|
+ uni.getEnvVersion = ()=> 'development'
|
|
|
+ } else {
|
|
|
+ httpApi = 'https://fhszmp.fh.gov.cn:8080';
|
|
|
+ uni.getEnvVersion = () => 'production'
|
|
|
+ }
|
|
|
+ doorplateImgUrl='https://zlszmp.fh.gov.cn:8088/digital-doorplateAddrUrl'
|
|
|
}
|
|
|
|
|
|
-uni.getEnvVersion = () => {
|
|
|
- return process.env.NODE_ENV === "production" ? "production" : "development";
|
|
|
-};
|
|
|
-const envVersion = uni.getEnvVersion();
|
|
|
-
|
|
|
-setFetchUrlByEnv(envVersion);
|
|
|
+setFetchUrlByEnv();
|
|
|
|
|
|
export { httpApi, doorplateImgUrl};
|