fix
This commit is contained in:
@@ -4,20 +4,20 @@
|
||||
<div class="homeMain_right_content">
|
||||
<div class="homeMain_user">
|
||||
<div class="homeMain_user_icon" @click="openAccount">
|
||||
|
||||
<img :src="userInfo?.avatar" alt="">
|
||||
</div>
|
||||
<div class="homeMain_user_detail">
|
||||
<div v-if="isTest" class="username">{{$t('Header.hello')}}@{{ $t('isTest.userName') }}</div>
|
||||
<div v-else class="username">{{$t('Header.hello')}}@{{ userInfo?.userName }}</div>
|
||||
<div v-else class="username">{{$t('Header.hello')}}@{{ cookieUserInfo?.userName }}</div>
|
||||
<div class="homeMain_user_detail_item homeMain_user_detail_attention">
|
||||
<div class="attention_item">
|
||||
<!-- 点击事件就用下面的div -->
|
||||
<!-- <div class="attention_item attention_item_active"> -->
|
||||
<div>123</div>
|
||||
<div>{{ userInfo?.followeeCount }}</div>
|
||||
<span>关注</span>
|
||||
</div>
|
||||
<div class="attention_item">
|
||||
<div>321</div>
|
||||
<div>{{ userInfo?.followerCount }}</div>
|
||||
<span>粉丝</span>
|
||||
</div>
|
||||
<div class="attention_item">
|
||||
@@ -34,7 +34,7 @@
|
||||
</div>
|
||||
<div class="homeMain_user_content">
|
||||
<div v-if="isTest" class="username"><span>/</span> {{$t('Header.hello')}}@{{ $t('isTest.userName') }}</div>
|
||||
<div v-else class="username"><span>/</span> {{$t('Header.hello')}}@{{ userInfo?.userName }}</div>
|
||||
<div v-else class="username"><span>/</span> {{$t('Header.hello')}}@{{ cookieUserInfo?.userName }}</div>
|
||||
<div
|
||||
v-if="!isMurmur"
|
||||
|
||||
@@ -110,7 +110,7 @@
|
||||
<i class="fi fi-rs-notebook"></i>
|
||||
<span class="select_item_des">{{$t('Header.ViewOrders')}}</span>
|
||||
</div>
|
||||
<router-link class="select_item" v-if="AdministratorUserIdList.indexOf(userInfo?.userId) >= 0" :to="`/administrator`">
|
||||
<router-link class="select_item" v-if="AdministratorUserIdList.indexOf(cookieUserInfo?.userId) >= 0" :to="`/administrator`">
|
||||
<span class="icon iconfont icon-yonghu"></span>
|
||||
<span class="select_item_des">Administrator</span>
|
||||
</router-link>
|
||||
@@ -186,7 +186,9 @@ export default defineComponent({
|
||||
const store = useStore();
|
||||
const {t} = useI18n()
|
||||
const {locale} = useI18n()
|
||||
|
||||
let userInfo= computed(()=>{
|
||||
return store.state.UserHabit.userInfo
|
||||
})
|
||||
let isTest = ref()
|
||||
let isMurmur = ref()
|
||||
let credits = computed(()=>{
|
||||
@@ -245,6 +247,7 @@ export default defineComponent({
|
||||
})
|
||||
return {
|
||||
store,
|
||||
userInfo,
|
||||
t,
|
||||
locale,
|
||||
isTest,
|
||||
@@ -267,7 +270,7 @@ export default defineComponent({
|
||||
emailCode: ["", "", "", "", "", ""], //邮箱验证码
|
||||
time: 60, //60秒倒计时
|
||||
timer: 0,
|
||||
userInfo: {},
|
||||
cookieUserInfo: {},
|
||||
timerOperate: null,
|
||||
numTime: 30,
|
||||
timerSec: null,
|
||||
@@ -303,13 +306,13 @@ export default defineComponent({
|
||||
this.isTest =JSON.parse(isTest)
|
||||
let isMurmur = getCookie('isMurmur')//获取是否是试用用户
|
||||
this.isMurmur =JSON.parse(isMurmur)
|
||||
this.userInfo = JSON.parse(getCookie("userInfo"));
|
||||
if (!this.userInfo) {
|
||||
this.cookieUserInfo = JSON.parse(getCookie("userInfo"));
|
||||
if (!this.cookieUserInfo) {
|
||||
this.$router.replace("/");
|
||||
} else {
|
||||
this.accountIsLogin(this.userInfo);
|
||||
this.accountIsLogin(this.cookieUserInfo);
|
||||
}
|
||||
this.isHaveBindEmail = this.userInfo?.email ? true : false;
|
||||
this.isHaveBindEmail = this.cookieUserInfo?.email ? true : false;
|
||||
if(!this.isMurmur){
|
||||
this.operateClick();
|
||||
document.addEventListener("click", this.operateClick);
|
||||
@@ -447,7 +450,7 @@ export default defineComponent({
|
||||
//登出
|
||||
async logout() {
|
||||
let data = {
|
||||
userId: this.userInfo.userId,
|
||||
userId: this.cookieUserInfo.userId,
|
||||
};
|
||||
let isTest = getCookie('isTest')
|
||||
// console.log(getCookie("token"));
|
||||
@@ -636,6 +639,11 @@ export default defineComponent({
|
||||
background-color: #000;
|
||||
border-radius: 50%;
|
||||
cursor: pointer;
|
||||
img{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: contain;
|
||||
}
|
||||
// transition: all .3s;
|
||||
}
|
||||
.homeMain_user_detail{
|
||||
|
||||
Reference in New Issue
Block a user