Browse Source

'配置文件修改'

蒋珅 1 year ago
parent
commit
bca6104894

BIN
public/favicon.ico


+ 33 - 0
public/static/config/config.js

@@ -0,0 +1,33 @@
+
+const config = {
+    baseURL: 'http://192.168.10.28:6041',
+    socketURL: 'ws://192.168.10.28:6041',
+    redisURL: 'http://192.168.10.9:5087',
+    redisetURL: 'ws://192.168.10.9:5087',
+    taosURL: 'http://192.168.10.9:5085',
+    taosetURL: 'ws://192.168.10.9:5085'
+}
+// const config = {
+//     baseURL: 'http://10.0.118.76:6041',
+//     socketURL: 'ws://10.0.118.76:6041',
+//     redisURL: 'http://10.0.118.76:5087',
+//     redisetURL: 'ws://10.0.118.76:5087',
+//     taosURL: 'http://10.0.118.76:5085',
+//     taosetURL: 'ws://10.0.118.76:5085'
+// }
+
+// const config = {
+//     baseURL: 'http://192.168.10.28:5087',
+//     socketURL: 'ws://192.168.10.28:5087'
+// }
+
+
+// const config = {
+//     baseURL: 'http://192.168.10.28:5085',
+//     socketURL: 'ws://192.168.10.28:5085'
+// }
+
+
+export default config;
+export const baseURL = config.baseURL
+export const socketURL = config.socketURL

+ 38 - 0
public/static/config/modeConfig.js

@@ -0,0 +1,38 @@
+
+// 本地联调开关
+const localTest = false;
+
+// 服务器地址
+let baseURL = "/current/" // 正式环境
+
+// websocket 服务器地址
+let websocketUrl = null;
+
+// 3D 地球瓦片路径
+let tilesUrl = null;
+// 3D 地球最大支持放大到多少级
+const tilesMaxLevel = 18;
+
+// 适配器地址
+// const adapterUrl = "http://10.155.32.4:8011/";
+
+// 切换模块时是否提示当前模块名称(用于对内介绍项目时便捷显示模块名称)
+const showModuleName = 0;
+
+// if (localTest) {
+//     baseURL = "http://192.168.10.8:9002/" // 联机调试 
+// } else {
+//     baseURL = "http://10.155.32.14:9002/" // 正式环境
+    
+// }
+
+websocketUrl = (baseURL.replace(/http:\/\/|https:\/\//g, "")) + "gyee-websocket";
+
+window.__MODE__ = {
+    baseURL,
+    websocketUrl,
+    // adapterUrl,
+    tilesUrl,
+    tilesMaxLevel,
+    showModuleName
+};

+ 1 - 1
src/api/axios.js

@@ -2,7 +2,7 @@
 import axios from 'axios';
 import { ElMessage, ElMessageBox, ElLoading } from 'element-plus';
 import { nextTick } from "vue";
-import {baseURL, socketURL} from './config';
+import {baseURL, socketURL} from '../../public/static/config/config.js';
 import JSONBIG from 'json-bigint';
 // 配置新建一个 axios 实例
 var loading = null;

+ 25 - 25
src/api/config.js

@@ -1,33 +1,33 @@
 
-const config = {
-    baseURL: 'http://192.168.10.28:6041',
-    socketURL: 'ws://192.168.10.28:6041',
-    redisURL: 'http://192.168.10.9:5087',
-    redisetURL: 'ws://192.168.10.9:5087',
-    taosURL: 'http://192.168.10.9:5085',
-    taosetURL: 'ws://192.168.10.9:5085'
-}
 // const config = {
-//     baseURL: 'http://10.0.118.76:6041',
-//     socketURL: 'ws://10.0.118.76:6041',
-//     redisURL: 'http://10.0.118.76:5087',
-//     redisetURL: 'ws://10.0.118.76:5087',
-//     taosURL: 'http://10.0.118.76:5085',
-//     taosetURL: 'ws://10.0.118.76:5085'
+//     baseURL: 'http://192.168.10.28:6041',
+//     socketURL: 'ws://192.168.10.28:6041',
+//     redisURL: 'http://192.168.10.9:5087',
+//     redisetURL: 'ws://192.168.10.9:5087',
+//     taosURL: 'http://192.168.10.9:5085',
+//     taosetURL: 'ws://192.168.10.9:5085'
 // }
+// // const config = {
+// //     baseURL: 'http://10.0.118.76:6041',
+// //     socketURL: 'ws://10.0.118.76:6041',
+// //     redisURL: 'http://10.0.118.76:5087',
+// //     redisetURL: 'ws://10.0.118.76:5087',
+// //     taosURL: 'http://10.0.118.76:5085',
+// //     taosetURL: 'ws://10.0.118.76:5085'
+// // }
 
-// const config = {
-//     baseURL: 'http://192.168.10.28:5087',
-//     socketURL: 'ws://192.168.10.28:5087'
-// }
+// // const config = {
+// //     baseURL: 'http://192.168.10.28:5087',
+// //     socketURL: 'ws://192.168.10.28:5087'
+// // }
 
 
-// const config = {
-//     baseURL: 'http://192.168.10.28:5085',
-//     socketURL: 'ws://192.168.10.28:5085'
-// }
+// // const config = {
+// //     baseURL: 'http://192.168.10.28:5085',
+// //     socketURL: 'ws://192.168.10.28:5085'
+// // }
 
 
-export default config;
-export const baseURL = config.baseURL
-export const socketURL = config.socketURL
+// export default config;
+// export const baseURL = config.baseURL
+// export const socketURL = config.socketURL

+ 1 - 1
src/pages/buildTable/create/index.vue

@@ -15,7 +15,7 @@ import {
 
 import request from "@/api/axios.js";
 import { baseURL, socketURL } from "@/api/axios.js";
-import config from "@api/config.js";
+import config from "../../../../public/static/config/config.js";
 import { exportMethod } from "@/api/utils.js";
 
 /**配置参数 */

+ 1 - 1
src/pages/redis/create/index.vue

@@ -5,7 +5,7 @@ import tableCop from './components/table.vue'
 import { ElMessage } from 'element-plus';
 import { onMounted, ref, onActivated } from 'vue'
 import request from '@/api/axios.js'
-import config from '@api/config.js'
+import config from '../../../../public/static/config/config.js'
 /**配置参数 */
 const treeHeight = ref(window.innerHeight - 260 + 'px') //tree高度
 const excelHeight = ref(window.innerHeight - 260 + 'px') //excel高度