flat: 修改登录
This commit is contained in:
@@ -56,21 +56,21 @@ import topLang from "@/page/index/top/top-lang";
|
||||
// import { info } from "@/api/system/tenant";
|
||||
import {getCaptcha} from "@/api/user";
|
||||
|
||||
console.log('是否跳转', /(^http)(s?):\/\/([a-z0-9].+)\/manage(\/)?$/i.test(location.href), location.href)
|
||||
if (/(^http)(s?):\/\/([a-z0-9].+)\/manage(\/)?$/i.test(location.href)) {
|
||||
window.location.href = process.env.VUE_APP_LOGIN_NEXT
|
||||
}
|
||||
if (/(\/login\?)(.*)/ig.test(location.href)) {
|
||||
const obj = {}
|
||||
const query = location.href.split('?')[1].replace(/\?/, '').split('&')
|
||||
query.forEach((item) => {
|
||||
const a = item.split('=');
|
||||
obj[a[0]] = a[1]
|
||||
})
|
||||
window.sessionStorage.setItem('query_session', JSON.stringify(obj))
|
||||
} else {
|
||||
window.sessionStorage.removeItem('query_session')
|
||||
}
|
||||
// console.log('是否跳转', /(^http)(s?):\/\/([a-z0-9].+)\/manage(\/)?$/i.test(location.href), location.href)
|
||||
// if (/(^http)(s?):\/\/([a-z0-9].+)\/manage(\/)?$/i.test(location.href)) {
|
||||
// window.location.href = process.env.VUE_APP_LOGIN_NEXT
|
||||
// }
|
||||
// if (/(\/login\?)(.*)/ig.test(location.href)) {
|
||||
// const obj = {}
|
||||
// const query = location.href.split('?')[1].replace(/\?/, '').split('&')
|
||||
// query.forEach((item) => {
|
||||
// const a = item.split('=');
|
||||
// obj[a[0]] = a[1]
|
||||
// })
|
||||
// window.sessionStorage.setItem('query_session', JSON.stringify(obj))
|
||||
// } else {
|
||||
// window.sessionStorage.removeItem('query_session')
|
||||
// }
|
||||
|
||||
export default {
|
||||
name: "login",
|
||||
@@ -115,17 +115,17 @@ export default {
|
||||
watch: {},
|
||||
created() {
|
||||
// this.getTenant();
|
||||
const {ticket} = JSON.parse(window.sessionStorage.getItem('query_session') || "{}")
|
||||
window.sessionStorage.removeItem('query_session')
|
||||
console.log(ticket)
|
||||
if (ticket) {
|
||||
this.proLoading = true
|
||||
this.ticket = ticket
|
||||
this.handleLogin()
|
||||
} else {
|
||||
console.log('刷新1')
|
||||
// const {ticket} = JSON.parse(window.sessionStorage.getItem('query_session') || "{}")
|
||||
// window.sessionStorage.removeItem('query_session')
|
||||
// if (ticket) {
|
||||
// this.proLoading = true
|
||||
// this.ticket = ticket
|
||||
// this.handleLogin()
|
||||
// } else {
|
||||
// console.log('刷新1')
|
||||
// this.refreshCode();
|
||||
// }
|
||||
this.refreshCode();
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
|
||||
@@ -24,7 +24,7 @@ module.exports = {
|
||||
port: 1888,
|
||||
proxy: {
|
||||
"/api": {
|
||||
target: 'http://10.165.0.173:8000',
|
||||
target: 'http://39.98.184.58:8000',
|
||||
ws: true,
|
||||
changeOrigin: true,
|
||||
pathRewrite: {
|
||||
|
||||
Reference in New Issue
Block a user