Browse Source

补充.md

cxmo 1 year ago
parent
commit
e0fcad2e32
3 changed files with 9 additions and 1 deletions
  1. 1 1
      .gitignore
  2. 7 0
      README.md
  3. 1 0
      static/base_config.js

+ 1 - 1
.gitignore

@@ -17,4 +17,4 @@
 
 /static/dll.vendor.js
 /.idea
-/static/base_config.js
+#/static/base_config.js

+ 7 - 0
README.md

@@ -8,6 +8,13 @@
 ### branch
 - master  debug  sandbox
 
+### pack
+- 在static/下新建base_config.js
+- base_config.js用于导出正式环境加密用的key,`window.key='对应环境的密钥'`
+- 在index.html中引入
+- 在src/api/crypto.js中,将key替换成window.key
+- 打包完成后,发布不同环境,只需要更改base_config.js中的密钥
+
 ### link
 - http://8.136.199.33:7778 弘则测试
 - https://eta.hzinsights.com 弘则正式

+ 1 - 0
static/base_config.js

@@ -0,0 +1 @@
+window.key = '6WpHp4vSvLVQK8SLioNZ7WMq'