| | |
| | | type: "warning" |
| | | }).then(() => { |
| | | this.$store.dispatch("LogOut").then(() => { |
| | | // this.$router.push({ path: "/login" }); |
| | | window.opener.location.href = 'http://dev.jxpskj.com:8020/ncny/login.html' |
| | | this.$router.push({ path: "/login" }); |
| | | }); |
| | | }); |
| | | }, |
| | |
| | | const params = this.$route.query |
| | | const state = params.state |
| | | const code = params.code |
| | | // window.opener.location.href = `${window.location.origin}/#/login?state=${state}&code=${code}` |
| | | window.opener.location.href = 'http://dev.jxpskj.com:8020/ncny/login.html' |
| | | window.opener.location.href = `${window.location.origin}/#/login?state=${state}&code=${code}` |
| | | } |
| | | } |
| | | </script> |
| | |
| | | created() { |
| | | this.getTenant(); |
| | | this.refreshCode(); |
| | | }, |
| | | mounted() { |
| | | //统一登录有没有登录 |
| | | const token = window.sessionStorage.getItem('token') |
| | | if (token) { |
| | | this.loginInfoByToken(); |
| | | }else{ |
| | | //跳转到本地登录页时跳转到统一登录 |
| | | window.location.replace('http://dev.jxpskj.com:8020/ncny/login.html') |
| | | } |
| | | }, |
| | | mounted() { |
| | | |
| | | }, |
| | | watch: { |
| | | 'loginForm.deptId'() { |
| | | const column = this.findObject(this.userOption.column, "deptId"); |
| | |
| | | if (statusWhiteList.includes(status)) return Promise.reject(res); |
| | | //如果是401则跳转到登录页面 |
| | | if (status === 401) store.dispatch('FedLogOut').then(() => |
| | | // router.push({path: '/login'}) |
| | | window.opener.location.href = 'http://dev.jxpskj.com:8020/ncny/login.html' |
| | | router.push({path: '/login'}) |
| | | ); |
| | | // 如果请求为非200否者默认统一处理 |
| | | if (status !== 200) { |