|
@@ -1,4 +1,12 @@
|
|
<script setup>
|
|
<script setup>
|
|
|
|
+import {useUserInfo} from '@/hooks/useUserInfo'
|
|
|
|
+import { useRouter } from 'vue-router';
|
|
|
|
+
|
|
|
|
+const {getUserInfo,userInfo}=useUserInfo()
|
|
|
|
+const router=useRouter()
|
|
|
|
+
|
|
|
|
+getUserInfo()
|
|
|
|
+
|
|
|
|
|
|
async function handleLoginOut(){
|
|
async function handleLoginOut(){
|
|
await $confirmDialog({
|
|
await $confirmDialog({
|
|
@@ -6,6 +14,8 @@ async function handleLoginOut(){
|
|
body: '是否确认退出当前账号',
|
|
body: '是否确认退出当前账号',
|
|
confirmBtn:'确认退出'
|
|
confirmBtn:'确认退出'
|
|
});
|
|
});
|
|
|
|
+ localStorage.removeItem('token')
|
|
|
|
+ router.replace('/login')
|
|
}
|
|
}
|
|
|
|
|
|
</script>
|
|
</script>
|
|
@@ -20,14 +30,14 @@ async function handleLoginOut(){
|
|
<div class="top-box">
|
|
<div class="top-box">
|
|
<div class="label-text">账号信息</div>
|
|
<div class="label-text">账号信息</div>
|
|
<div class="flex">
|
|
<div class="flex">
|
|
- <span>用户名</span>
|
|
|
|
|
|
+ <span>{{userInfo?.RealName}}</span>
|
|
<span>|</span>
|
|
<span>|</span>
|
|
- <span>手机号</span>
|
|
|
|
|
|
+ <span>{{userInfo?.Mobile}}</span>
|
|
</div>
|
|
</div>
|
|
<div class="flex">
|
|
<div class="flex">
|
|
- <span>所属机构</span>
|
|
|
|
|
|
+ <span>{{userInfo?.BusinessName}}</span>
|
|
<span>|</span>
|
|
<span>|</span>
|
|
- <span>岗位</span>
|
|
|
|
|
|
+ <span>{{userInfo?.Position}}</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="flex my-fav-box" @click="$router.push('/etaChart/favorite')">
|
|
<div class="flex my-fav-box" @click="$router.push('/etaChart/favorite')">
|
|
@@ -43,7 +53,7 @@ async function handleLoginOut(){
|
|
</template>
|
|
</template>
|
|
<div class="userInfo-box">
|
|
<div class="userInfo-box">
|
|
<svg-icon name="user_avatar" style="font-size:20px;margin-right:3px"></svg-icon>
|
|
<svg-icon name="user_avatar" style="font-size:20px;margin-right:3px"></svg-icon>
|
|
- <span>账号吗</span>
|
|
|
|
|
|
+ <span>{{userInfo?.RealName}}</span>
|
|
<t-icon name="chevron-down" style="font-size:28px;margin-left:11px"></t-icon>
|
|
<t-icon name="chevron-down" style="font-size:28px;margin-left:11px"></t-icon>
|
|
</div>
|
|
</div>
|
|
</t-popup>
|
|
</t-popup>
|