重定位修改
This commit is contained in:
@@ -68,7 +68,7 @@ export default {
|
||||
tab: 0,
|
||||
username: null,
|
||||
password: null,
|
||||
baseUrl: this.$store.getters.baseUrl,
|
||||
baseUrl: null,
|
||||
setTime: 1000,
|
||||
disabled: false
|
||||
}
|
||||
@@ -76,6 +76,13 @@ export default {
|
||||
computed: {
|
||||
...mapGetters(['serverUrl'])
|
||||
},
|
||||
watch: {
|
||||
serverUrl (newVal) {
|
||||
if (newVal) {
|
||||
this.baseUrl = newVal
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
this.baseUrl = this.serverUrl
|
||||
},
|
||||
@@ -103,10 +110,10 @@ export default {
|
||||
try {
|
||||
let res = await authlogin(this.username, this.encryptData(this.password))
|
||||
if (res.code === '1') {
|
||||
let obj = {}
|
||||
obj = Object.assign({}, res.result)
|
||||
this.$store.dispatch('userInfo', JSON.stringify(obj))
|
||||
this.$store.dispatch('setLoginInfo', {username: this.username, password: this.password})
|
||||
// let obj = {}
|
||||
// obj = Object.assign({}, res.result)
|
||||
// this.$store.dispatch('userInfo', JSON.stringify(obj))
|
||||
// this.$store.dispatch('setLoginInfo', {username: this.username, password: this.password})
|
||||
this.$router.push('/hub')
|
||||
} else {
|
||||
this.Dialog(res.desc)
|
||||
|
||||
Reference in New Issue
Block a user