fix: 🐛 修改PC首页跳转bug

master
Yer 2023-07-28 17:11:19 +08:00
parent c86cecf4f0
commit d02d0adb39
1 changed files with 12 additions and 7 deletions

View File

@ -19,13 +19,15 @@
</Carousel> </Carousel>
</div> </div>
<div class="nav-right"> <div class="nav-right">
<div class="person-msg" @click="entryControl({ path: 'home' })"> <div class="person-msg">
<div class="user-box" @click="entryControl({ path: 'home' })">
<img class="user-face" :src="userInfo.face || defaultAvatar" alt /> <img class="user-face" :src="userInfo.face || defaultAvatar" alt />
<div class="welcome"> <div class="welcome">
Hi, {{ Hi, {{
userInfo.nickName || `欢迎来到${config.title}` | secrecyMobile userInfo.nickName || `欢迎来到${config.title}` | secrecyMobile
}} }}
</div> </div>
</div>
<div v-if="userInfo.id"> <div v-if="userInfo.id">
<div class="icon-list"></div> <div class="icon-list"></div>
<!-- #TODO 后续增加 --> <!-- #TODO 后续增加 -->
@ -154,6 +156,7 @@ export default {
methods: { methods: {
// //
entryControl(val) { entryControl(val) {
console.log("val",val)
let url = this.$router.resolve(val.path); let url = this.$router.resolve(val.path);
window.open(url.href, '_blank'); window.open(url.href, '_blank');
}, },
@ -382,7 +385,9 @@ export default {
padding-top: 28px; padding-top: 28px;
padding-bottom: 25px; padding-bottom: 25px;
>.user-box{
text-align: center;
}
} }
.shop-msg { .shop-msg {