|
@@ -18,7 +18,7 @@
|
|
|
</template>
|
|
|
</a-avatar>
|
|
|
<span>
|
|
|
- {{ userStore.current.phone }}
|
|
|
+ {{ userStore.current.nickname }}
|
|
|
<DownOutlined />
|
|
|
</span>
|
|
|
</div>
|
|
@@ -30,7 +30,8 @@
|
|
|
<script lang="ts" setup>
|
|
|
import { MenuProps } from 'ant-design-vue'
|
|
|
import { useUserStore } from '@/store'
|
|
|
-import { gotoLogin, postLogout } from '@/api'
|
|
|
+import { postLogout } from '@/api'
|
|
|
+import { mainURL } from '@/env'
|
|
|
import logoPng from '@/assets/images/logo.png'
|
|
|
|
|
|
defineOptions({ name: 'LayoutHeader' })
|
|
@@ -38,12 +39,16 @@ defineOptions({ name: 'LayoutHeader' })
|
|
|
const userStore = useUserStore()
|
|
|
userStore.fetch()
|
|
|
|
|
|
-const menus = [{ label: '退出', key: 'logout' }]
|
|
|
+const menus = [
|
|
|
+ { label: '个人中心', key: 'user' },
|
|
|
+ { label: '退出', key: 'logout' }
|
|
|
+]
|
|
|
const handlerMenuClick: MenuProps['onClick'] = async e => {
|
|
|
await postLogout()
|
|
|
if (e.key === 'logout') {
|
|
|
- location.replace('https://test.4dkankan.com/')
|
|
|
- // gotoLogin()
|
|
|
+ location.replace(mainURL)
|
|
|
+ } else {
|
|
|
+ location.href = `${mainURL}/#/information`
|
|
|
}
|
|
|
}
|
|
|
</script>
|