소스 검색

更新 rule 前端代码

yanglzh 11 달 전
부모
커밋
18306c6805
5개의 변경된 파일6개의 추가작업 그리고 10개의 파일을 삭제
  1. 0 0
      public/plugin/rule/assets/index.2621bbc7.css
  2. 0 0
      public/plugin/rule/assets/index.ba4cf900.js
  3. 1 1
      public/plugin/rule/config.js
  4. 4 7
      public/plugin/rule/index.html
  5. 1 2
      writeEnv.mjs

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
public/plugin/rule/assets/index.2621bbc7.css


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
public/plugin/rule/assets/index.ba4cf900.js


+ 1 - 1
public/plugin/rule/config.json → public/plugin/rule/config.js

@@ -1,4 +1,4 @@
-{
+window.allEnv = {
   "rule": {
     "server": "http://127.0.0.1:9090",
     "iotServer": "/api/v1"

+ 4 - 7
public/plugin/rule/index.html

@@ -7,17 +7,14 @@
   <title>Sagoo Rule Editor</title>
   <script src="/config.js"></script>
   <script>
+    // 获取配置文件中的 服务地址,定义为全局变量
     window.env = window.allEnv.rule
-    // // 获取配置文件中的 服务地址,定义为全局变量
-    // fetch('/config.json').then(function (res) { return res.json() }).then(function (config) {
-    //   window.env = config.rule
-    // })
   </script>
-  <script type="module" crossorigin src="/plugin/rule/assets/index.64d25905.js"></script>
-  <link rel="stylesheet" href="/plugin/rule/assets/index.fcb91b3d.css">
+  <script type="module" crossorigin src="/plugin/rule/assets/index.ba4cf900.js"></script>
+  <link rel="stylesheet" href="/plugin/rule/assets/index.2621bbc7.css">
 </head>
 <body>
   <div id="app"></div>
-
+  
 </body>
 </html>

+ 1 - 2
writeEnv.mjs

@@ -29,8 +29,7 @@ const configJson = {
 }
 
 // 大屏项目会存在配置找不到的情况,增加同步请求的 js 配置文件,避免异步请求延迟导致的异常
-const configJs = `window.allEnv = ${JSON.stringify(configJson, null, 2)}
-`
+const configJs = `window.allEnv = ${JSON.stringify(configJson, null, 2)}`
 
 // 文件写入
 try {

이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.