首页 tab 的 消息数量

This commit is contained in:
A1300399510
2023-07-26 18:26:51 +08:00
parent 9303c12ab5
commit 0f3c5fd311
2 changed files with 10 additions and 3 deletions

View File

@@ -39,15 +39,18 @@
</el-carousel>
</div>
</div>
<div class="btm-seach-btn-box dis-f al-item jus-x" v-if="routePath !== '/seachPage'&&routePath !== '/detail'&&routePath !== '/apartmentDetail'&&routePath !== '/edit'">
<div class="btm-seach-btn-box dis-f al-item jus-x"
v-if="routePath !== '/seachPage' && routePath !== '/detail' && routePath !== '/apartmentDetail' && routePath !== '/edit'">
<div class="body-maxWidth dis-f" style="height:48px;">
<div class="tab-btn dis-f al-item jus-x" :class="{ 'tab-btn-click': item.path === tabBtnType }"
v-for="(item, i) in seachTab.data" :key="i" @click="changeTabBtnType(item)">
<el-badge :value="12">
<el-badge v-if="item['path'] == '/user' && user.data['messagenum'] != 0" :value="user.data['messagenum']">
<div style="padding:0 10px;">
{{ item.name }}
</div>
</el-badge>
<div v-else>{{ item.name }}</div>
</div>
</div>
</div>
@@ -123,7 +126,7 @@ let changeTabBtnType = (item) => {
})
}
let openInfo=(data)=>{
let openInfo = (data) => {
window.open(data.url)
}

View File

@@ -109,6 +109,10 @@
import emptyDuck from '@/components/public/empty-duck.vue'
import { onMounted, getCurrentInstance, ref, onUnmounted, defineEmits } from 'vue'
import { useRouter } from 'vue-router';
import store from '../../store/index';
if (store.state.user) store.state.user['messagenum'] = 0
const emit = defineEmits(['close'])
const router = useRouter();