|
|
@@ -3,13 +3,14 @@
|
|
|
<div class="wrap">
|
|
|
<div class="left-part">
|
|
|
<img v-if="user.isQingQue" class="logo" src="http://gm.nkfzs.com/favicon.ico" alt="游戏中心"/>
|
|
|
- <img v-else class="logo" :src="getAssetsFile('default_logo.png')" alt="游戏中心"/>
|
|
|
+ <img v-else class="logo logo2" :src="getAssetsFile('default_logo.png')" alt="游戏中心"/>
|
|
|
{{ user.projectName }}
|
|
|
</div>
|
|
|
<div class="menu">
|
|
|
<el-menu
|
|
|
:default-active="route.path"
|
|
|
class="el-menu-wrapper"
|
|
|
+ active-text-color="#909399"
|
|
|
:ellipsis="false"
|
|
|
router
|
|
|
mode="horizontal"
|
|
|
@@ -46,7 +47,7 @@
|
|
|
|
|
|
<el-dropdown v-else trigger="click" >
|
|
|
<span class="el-dropdown-link">
|
|
|
- {{user.profile.user_name?user.profile.user_name:user.profile.mobile }}
|
|
|
+ {{user.profile.user_name?user.profile.user_name:(user.profile.mobile?user.profile.mobile:'请设置') }}
|
|
|
<img :src="getAssetsFile('gamer.png')" />
|
|
|
</span>
|
|
|
<template #dropdown>
|
|
|
@@ -54,7 +55,7 @@
|
|
|
<el-dropdown-item class="clearfix" @click="toSetting">
|
|
|
账号设置
|
|
|
</el-dropdown-item>
|
|
|
- <el-dropdown-item class="clearfix" @click="logOut">
|
|
|
+ <el-dropdown-item class="clearfix" @click="logOut('pc')">
|
|
|
退出登录
|
|
|
</el-dropdown-item>
|
|
|
</el-dropdown-menu>
|
|
|
@@ -194,13 +195,15 @@ onMounted(() => {
|
|
|
})
|
|
|
|
|
|
// 退出登录
|
|
|
-const logOut = () => {
|
|
|
+const logOut = (pla:'pc'|'') => {
|
|
|
// console.log(22);
|
|
|
show.value = false
|
|
|
user.menuPath = oriMenu
|
|
|
sessionStorage.removeItem('token')
|
|
|
user.isLogin = false
|
|
|
- router.push({ path: '/login' })
|
|
|
+ if (pla !== 'pc') {
|
|
|
+ router.push({ path: '/login' })
|
|
|
+ }
|
|
|
}
|
|
|
const toSetting = () => {
|
|
|
show.value = false
|
|
|
@@ -378,6 +381,7 @@ const submitForm = async(formEl: FormInstance | undefined) => {
|
|
|
sessionStorage.setItem('account', loginForm.account)
|
|
|
localStorage.setItem('from', '1')
|
|
|
user.isLogin = true
|
|
|
+ loginFormVisible.value = false
|
|
|
await user.getUserProfile()
|
|
|
// 跳转我的游戏页面
|
|
|
setTimeout(() => {
|
|
|
@@ -404,6 +408,7 @@ const submitForm = async(formEl: FormInstance | undefined) => {
|
|
|
sessionStorage.setItem('account', loginForm.account)
|
|
|
localStorage.setItem('from', '2')
|
|
|
user.isLogin = true
|
|
|
+ loginFormVisible.value = false
|
|
|
await user.getUserProfile()
|
|
|
setTimeout(() => {
|
|
|
router.push({ path: '/my_game', query: { account: loginForm.account }})
|
|
|
@@ -441,6 +446,16 @@ const submitForm = async(formEl: FormInstance | undefined) => {
|
|
|
align-items: center;
|
|
|
font-family: 'zihunchaoji';
|
|
|
white-space: nowrap;
|
|
|
+ .logo{
|
|
|
+ width: 1.6rem;
|
|
|
+ height: 1.6rem;
|
|
|
+ display: block;
|
|
|
+ margin-right: 0.25rem;
|
|
|
+ }
|
|
|
+ .logo2{
|
|
|
+ width: 1.25rem;
|
|
|
+ height: 1.25rem;
|
|
|
+ }
|
|
|
}
|
|
|
.menu{
|
|
|
padding: 0 5rem 0 1rem;
|
|
|
@@ -469,6 +484,7 @@ const submitForm = async(formEl: FormInstance | undefined) => {
|
|
|
// border-radius: 50%;
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
+ justify-content: space-around;
|
|
|
>img{
|
|
|
width: 2rem;
|
|
|
height: 2rem;
|