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: {