From 024f8ef66b4c96ed261cbd9629da332dd086b14f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=89=E8=99=B9=E7=9D=BF?= <297504645@qq.com> Date: Thu, 25 Apr 2024 16:31:54 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E6=B4=BE=E6=A0=BC1.5=E3=80=91ip?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6=E6=8F=90=E5=87=BA=E5=A4=96?= =?UTF-8?q?=E9=83=A8=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vue/public/config.js | 11 +++++++++++ vue/public/index.html | 5 +++++ vue/src/App.vue | 6 +++++- vue/static/config.js | 26 ++++++++++++++++++-------- 4 files changed, 39 insertions(+), 9 deletions(-) create mode 100644 vue/public/config.js diff --git a/vue/public/config.js b/vue/public/config.js new file mode 100644 index 0000000..998f67f --- /dev/null +++ b/vue/public/config.js @@ -0,0 +1,11 @@ +// 开发 +window.SITE_CONFIG['config_ip'] = 'http://192.168.0.228' +window.SITE_CONFIG['config_auth_port'] = '7696' +window.SITE_CONFIG['config_public_port'] = '7692' +window.SITE_CONFIG['config_backend_port'] = '7692' + +// 发布 +// window.SITE_CONFIG['config_ip'] = 'http://192.168.0.68' +// window.SITE_CONFIG['config_auth_port'] = '8066' +// window.SITE_CONFIG['config_public_port'] = '8092' +// window.SITE_CONFIG['config_backend_port'] = '8092' \ No newline at end of file diff --git a/vue/public/index.html b/vue/public/index.html index 5917c13..d15f620 100644 --- a/vue/public/index.html +++ b/vue/public/index.html @@ -6,7 +6,12 @@ + <%= webpackConfig.name %> + diff --git a/vue/src/App.vue b/vue/src/App.vue index 82756b1..7daf08c 100644 --- a/vue/src/App.vue +++ b/vue/src/App.vue @@ -6,7 +6,6 @@ diff --git a/vue/static/config.js b/vue/static/config.js index 965689e..d1ddb92 100644 --- a/vue/static/config.js +++ b/vue/static/config.js @@ -11,10 +11,15 @@ if (process.env.NODE_ENV === "development") { // public_port: "7692", // backend_port: "7692", - ip: "http://192.168.0.228", - auth_port: "7696", - public_port: "7692", - backend_port: "7692", + // ip: "http://192.168.0.228", + // auth_port: "7696", + // public_port: "7692", + // backend_port: "7692", + + ip: localStorage.getItem('config_ip'), + auth_port: localStorage.getItem('config_auth_port'), + public_port: localStorage.getItem('config_public_port'), + backend_port: localStorage.getItem('config_backend_port'), }, basic: {}, upload: { @@ -57,10 +62,15 @@ if (process.env.NODE_ENV === "development") { // public_port: "7692", // backend_port: "7692", - ip: "http://192.168.0.68", - auth_port: "8066", - public_port: "8092", - backend_port: "8092", + // ip: "http://192.168.0.68", + // auth_port: "8066", + // public_port: "8092", + // backend_port: "8092", + + ip: localStorage.getItem('config_ip'), + auth_port: localStorage.getItem('config_auth_port'), + public_port: localStorage.getItem('config_public_port'), + backend_port: localStorage.getItem('config_backend_port'), }, basic: {}, upload: {