Sfoglia il codice sorgente

feat: 更新组态前端,优化组态的配置文件

yanglzh 11 mesi fa
parent
commit
02ec48c18b

+ 2 - 0
.env.nginx

@@ -0,0 +1,2 @@
+VITE_NGINX_PROXY = '/base-api'
+VITE_SERVER_ORIGIN = 'https://zhgy.sagoo.cn'

File diff suppressed because it is too large
+ 0 - 0
public/plugin/topo/assets/index.0a852937.css


File diff suppressed because it is too large
+ 0 - 0
public/plugin/topo/assets/index.3a824688.css


File diff suppressed because it is too large
+ 0 - 0
public/plugin/topo/assets/index.9b7b9412.js


File diff suppressed because it is too large
+ 0 - 0
public/plugin/topo/assets/index.c787b0a9.js


+ 1 - 1
public/plugin/topo/assets/index.a95ab06b.js → public/plugin/topo/assets/index.c8ee7d5c.js

@@ -1 +1 @@
-import{c as e,o as t}from"./index.81745197.js";const o={class:"page-wrapper full text-center text-8xl mt-10 font-bold"},s={__name:"index",setup(c){return(r,a)=>(t(),e("div",o,"404 "))}};export{s as default};
+import{c as e,o as t}from"./index.c787b0a9.js";const o={class:"page-wrapper full text-center text-8xl mt-10 font-bold"},s={__name:"index",setup(c){return(r,a)=>(t(),e("div",o,"404 "))}};export{s as default};

+ 1 - 1
public/plugin/topo/assets/index.091290b7.js → public/plugin/topo/assets/index.d3084c14.js

@@ -1 +1 @@
-import{_ as o}from"./plugin-vue_export-helper.f63bf49c.js";import{c as t,a as s,b as _,r as c,o as n}from"./index.81745197.js";const a={},r={class:"layout"},d={class:"main-content"};function i(l,p){const e=c("router-view");return n(),t("div",r,[s("div",d,[_(e)])])}const v=o(a,[["render",i],["__scopeId","data-v-4ae819da"]]);export{v as default};
+import{_ as o}from"./plugin-vue_export-helper.f63bf49c.js";import{c as t,a as s,b as _,r as c,o as n}from"./index.c787b0a9.js";const a={},r={class:"layout"},d={class:"main-content"};function i(l,p){const e=c("router-view");return n(),t("div",r,[s("div",d,[_(e)])])}const v=o(a,[["render",i],["__scopeId","data-v-4ae819da"]]);export{v as default};

File diff suppressed because it is too large
+ 1 - 1
public/plugin/topo/assets/index.d87ff29c.js


File diff suppressed because it is too large
+ 0 - 0
public/plugin/topo/assets/index.f9e233d4.js


File diff suppressed because it is too large
+ 0 - 0
public/plugin/topo/assets/lodash.018395ea.js


+ 6 - 0
public/plugin/topo/config.json

@@ -0,0 +1,6 @@
+{
+  "topo": {
+    "server": "/api/v1",
+    "imgServer": ""
+  }
+}

+ 7 - 1
public/plugin/topo/index.html

@@ -11,7 +11,13 @@
   <!-- <link rel="stylesheet" href="/static/font/sgcc.css"> -->
   <link rel="stylesheet" href="/plugin/topo/static/sg-ele/index.css">
   <link rel="stylesheet" href="//at.alicdn.com/t/font_3218912_366sz3716ll.css">
-  <script type="module" crossorigin src="/plugin/topo/assets/index.81745197.js"></script>
+  <script>
+    // 获取配置文件中的 服务地址,定义为全局变量
+    fetch('/config.json').then(function (res) { return res.json() }).then(function (config) {
+      window.env = config.topo
+    })
+  </script>
+  <script type="module" crossorigin src="/plugin/topo/assets/index.c787b0a9.js"></script>
   <link rel="stylesheet" href="/plugin/topo/assets/index.b637ed34.css">
 </head>
 <body>

+ 4 - 0
writeEnv.mjs

@@ -12,6 +12,10 @@ const baseUrl = VITE_SERVER_ORIGIN + VITE_NGINX_PROXY + VITE_API_SUFFIX_URL
 const configFile = './public/config.json'
 const configJson = {
 	topo: baseUrl,
+	topo: {
+		server: baseUrl,
+		imgServer: VITE_SERVER_ORIGIN + VITE_NGINX_PROXY,
+	},
 	screen: baseUrl,
 	rule: {
 		server: VITE_RULE_SERVER_URL,

Some files were not shown because too many files changed in this diff