|
|
|
@ -24,6 +24,7 @@ |
|
|
|
|
|
|
|
<script> |
|
|
|
import { getUUID } from '@/utils' |
|
|
|
import {getConfigParams} from '@/api/sysConfig.js' |
|
|
|
export default { |
|
|
|
data () { |
|
|
|
return { |
|
|
|
@ -45,6 +46,24 @@ |
|
|
|
captchaPath: '' |
|
|
|
} |
|
|
|
}, |
|
|
|
computed: { |
|
|
|
multiLanguage: { |
|
|
|
get() { |
|
|
|
return this.$store.state.user.multiLanguage |
|
|
|
}, |
|
|
|
set(val) { |
|
|
|
this.$store.commit('user/updateMultiLanguage', val) |
|
|
|
} |
|
|
|
}, |
|
|
|
authControl: { |
|
|
|
get() { |
|
|
|
return this.$store.state.user.authControl |
|
|
|
}, |
|
|
|
set(val) { |
|
|
|
this.$store.commit('user/updateAuthControl', val) |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
created () { |
|
|
|
this.userName(); |
|
|
|
}, |
|
|
|
@ -73,6 +92,7 @@ |
|
|
|
localStorage.setItem('locale', data.language) |
|
|
|
localStorage.setItem('refresh', "0") |
|
|
|
localStorage.setItem('userName', this.dataForm.userName) |
|
|
|
this.getConfigParams() |
|
|
|
} else { |
|
|
|
this.$message.error(data.msg) |
|
|
|
} |
|
|
|
@ -80,6 +100,16 @@ |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 获取全局参数变量 |
|
|
|
getConfigParams() { |
|
|
|
getConfigParams().then(({data}) => { |
|
|
|
if (data && data.code == 0) { |
|
|
|
localStorage.setItem('configParams', JSON.stringify(data.data)) |
|
|
|
this.multiLanguage = JSON.parse(localStorage.getItem('configParams')).multiLanguage |
|
|
|
this.authControl = JSON.parse(localStorage.getItem('configParams')).authControl |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
</script> |
|
|
|
|