diff --git a/.env b/.env deleted file mode 100644 index 43cd6a3..0000000 --- a/.env +++ /dev/null @@ -1 +0,0 @@ -VUE_APP_SITE='default' \ No newline at end of file diff --git a/.env.development b/.env.development new file mode 100644 index 0000000..22e832f --- /dev/null +++ b/.env.development @@ -0,0 +1,2 @@ +VUE_APP_SITE='default' +VUE_APP_LOGIN_ERROR = 'http://10.160.7.216:9920/casserver/login' diff --git a/.env.production b/.env.production new file mode 100644 index 0000000..22e832f --- /dev/null +++ b/.env.production @@ -0,0 +1,2 @@ +VUE_APP_SITE='default' +VUE_APP_LOGIN_ERROR = 'http://10.160.7.216:9920/casserver/login' diff --git a/src/page/login/userlogin.vue b/src/page/login/userlogin.vue index 855b87a..3165831 100644 --- a/src/page/login/userlogin.vue +++ b/src/page/login/userlogin.vue @@ -175,6 +175,9 @@ export default { loading.close(); this.proLoading = false }).catch(() => { + if(obj.ticket) { + return window.location.href = process.env.VUE_APP_LOGIN_ERROR + } this.proLoading = false loading.close(); this.refreshCode(); diff --git a/vue.config.js b/vue.config.js index 394142f..daacde0 100644 --- a/vue.config.js +++ b/vue.config.js @@ -23,7 +23,7 @@ module.exports = { port: 1888, proxy: { "/api": { - target: 'http://192.168.3.215:8000', + target: 'http://10.165.0.173:8000', ws: true, changeOrigin: true, pathRewrite: {