|
@@ -67,7 +67,7 @@
|
|
|
import { encryption } from '@/util'
|
|
|
import comDialog from "@/components/dialog";
|
|
|
import axios from 'axios';
|
|
|
-import { updatePsw, userLogout } from '@/request/config'
|
|
|
+import { updatePsw, userLogout,getUserInfo } from '@/request/config'
|
|
|
import { sendUserMsg } from '@/request/config'
|
|
|
import { setToken, setPermission, setInfo, setRoleKey } from '@/state/user'
|
|
|
import { computed, ref, reactive, watch } from 'vue'
|
|
@@ -90,6 +90,11 @@ export default {
|
|
|
return { data, info, defAvatar, msgStatus }
|
|
|
},
|
|
|
methods: {
|
|
|
+ async getInfo(){
|
|
|
+ let res = await axios.get(getUserInfo)
|
|
|
+ setInfo(res.data.user)
|
|
|
+ console.log('res',res)
|
|
|
+ },
|
|
|
async updatePsw() {
|
|
|
if (this.data.password !== this.data.confimPsw) {
|
|
|
return this.$message.error('两次密码不一致!', '提示')
|
|
@@ -156,6 +161,9 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
+ created(){
|
|
|
+ this.getInfo()
|
|
|
+ },
|
|
|
components: {
|
|
|
"com-dialog": comDialog,
|
|
|
},
|