From d84dc9e2ee64eda05ccba5705a59ef0af1e79b55 Mon Sep 17 00:00:00 2001 From: Apcallover <1503963513@qq.com> Date: Mon, 15 Apr 2024 19:43:51 +0800 Subject: [PATCH] =?UTF-8?q?flat:=20=E6=9A=82=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env | 1 - .env.development | 2 ++ .env.production | 2 ++ src/page/login/userlogin.vue | 3 +++ vue.config.js | 2 +- 5 files changed, 8 insertions(+), 2 deletions(-) delete mode 100644 .env create mode 100644 .env.development create mode 100644 .env.production 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: {