diff --git a/.env.development b/.env.development index fa857bf28..bae43a57e 100644 --- a/.env.development +++ b/.env.development @@ -9,4 +9,7 @@ VUE_APP_API_SERVER = http://192.168.1.140/api # VUE_APP_API_SERVER = https://epmet-dev.elinkservice.cn/api VUE_APP_NODE_ENV=dev #项目根路径 -VUE_APP_PUBLIC_PATH=epmet-oper \ No newline at end of file +VUE_APP_PUBLIC_PATH=epmet-oper + +#是否使用另外一种登录方式 +VUE_APP_SSO_LOGIN=off \ No newline at end of file diff --git a/.env.production b/.env.production index 5b72f6d9d..f7b9892ef 100644 --- a/.env.production +++ b/.env.production @@ -2,3 +2,4 @@ NODE_ENV=production VUE_APP_API_SERVER = https://epmet-cloud.elinkservice.cn/api VUE_APP_NODE_ENV=prod VUE_APP_PUBLIC_PATH=epmet-oper +VUE_APP_SSO_LOGIN=off diff --git a/.env.production.sit b/.env.production.sit index b0c600ea6..786741226 100644 --- a/.env.production.sit +++ b/.env.production.sit @@ -2,4 +2,5 @@ NODE_ENV=production # VUE_APP_API_SERVER = https://epmet-test.elinkservice.cn/api VUE_APP_API_SERVER = http://192.168.1.140/api VUE_APP_NODE_ENV=prod:sit -VUE_APP_PUBLIC_PATH=epmet-oper \ No newline at end of file +VUE_APP_PUBLIC_PATH=epmet-oper +VUE_APP_SSO_LOGIN=off \ No newline at end of file diff --git a/.env.production.uat b/.env.production.uat index 83e93d4d1..5dbdd152d 100644 --- a/.env.production.uat +++ b/.env.production.uat @@ -2,4 +2,5 @@ NODE_ENV=production # VUE_APP_API_SERVER = http://120.27.18.76/api VUE_APP_API_SERVER = https://epmet-test.elinkservice.cn/api VUE_APP_NODE_ENV=prod:uat -VUE_APP_PUBLIC_PATH=epmet-oper \ No newline at end of file +VUE_APP_PUBLIC_PATH=epmet-oper +VUE_APP_SSO_LOGIN=off \ No newline at end of file diff --git a/.env.shibei_production b/.env.shibei_production index b227d2fa1..36e0547b1 100644 --- a/.env.shibei_production +++ b/.env.shibei_production @@ -1,4 +1,5 @@ NODE_ENV=production VUE_APP_API_SERVER = https://epdc-shibei.elinkservice.cn/api VUE_APP_NODE_ENV=shibei_prod -VUE_APP_PUBLIC_PATH=epmet-oper \ No newline at end of file +VUE_APP_PUBLIC_PATH=epmet-oper +VUE_APP_SSO_LOGIN=off \ No newline at end of file diff --git a/src/router/index.js b/src/router/index.js index ad6160919..1aafbd543 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -32,6 +32,14 @@ export const pageRoutes = [ title: "登录", }, }, + { + path: "/login-sso", + component: () => import("@/views/pages/login-sso"), + name: "login-sso", + meta: { + title: "登录", + }, + }, { path: "/", name: "index", diff --git a/src/views/pages/login-sso.vue b/src/views/pages/login-sso.vue new file mode 100644 index 000000000..50ca7e6c9 --- /dev/null +++ b/src/views/pages/login-sso.vue @@ -0,0 +1,73 @@ + + + + + diff --git a/src/views/pages/login.vue b/src/views/pages/login.vue index 6db09b136..80f8b987a 100644 --- a/src/views/pages/login.vue +++ b/src/views/pages/login.vue @@ -140,6 +140,10 @@ export default { }, }, created() { + if (process.env.VUE_APP_SSO_LOGIN == "on") { + this.$router.replace({ name: "login-sso" }); + } + //平阴联动平台 登陆 if (this.$route.query.platformToken) { this.isShowLogin = false;