a1300399510@qq.com 提交于 2023/04/03 -12:40:02

This commit is contained in:
2023-04-03 12:40:11 +08:00
parent 7908c0f5fc
commit 895d5546f7
2 changed files with 10 additions and 16 deletions

View File

@@ -29,9 +29,9 @@
</div>
<div class="head-more-right">
<!-- 消息 -->
<div class="information-box" v-if="false">
<div class="information-box" v-if="userInfo.messagenum">
<img class="information-icon" src="@/assets/img/headerNav/information.png" />
<div class="red-dot flexcenter">2</div>
<div class="red-dot flexcenter">{{ userInfo.messagenum }}</div>
</div>
<!-- 登录按钮 -->
<div v-if="!islogin" class="loginBtn flexcenter" @click="handleRegister">
@@ -78,6 +78,7 @@ export default {
islogin: false,
userInfo: {},
menu: [],
hotSearchkeywords: [], // 热门搜索
};
},
props: ["issearch", "needgetuser", "userinfo"],
@@ -118,12 +119,15 @@ export default {
this.$http.post("/api/index",).then((res) => {
if (res.code != 200) return;
// this.prototype.userInfo = res.data.user
this.userInfo = res.data.user;
// this.userInfo = res.data.user;
this.islogin = res.data.user.uid > 0 ? true : false;
console.log(this.userInfo, "userInfo");
this.hotSearchkeywords = res.data.hotSearchkeywords
this.prototype.userInfo = res.data.user
console.log(this.prototype.userInfo, "userInfo");
}).catch(err => {
this.$message.error(err.message)
});
this.$message.error(err.message)
});
},
getMenu() {