diff --git a/resources/spa/src/components.js b/resources/spa/src/components.js index bfab09e95..b1b6e3935 100644 --- a/resources/spa/src/components.js +++ b/resources/spa/src/components.js @@ -1,6 +1,6 @@ /** common components */ import btnSwitch from './components/common/btnSwitch' /* btnSwitch 按钮 */ -import badge from './components/common/badge' /* Badge 徽标 */ +import Badge from './components/common/Badge' /* Badge 徽标 */ import CommonHeader from './components/common/CommonHeader.vue' /* 通用头部 */ import fullSpin from './components/FullSpin' /* 全屏加载动画 */ import loadMore from './components/loadMore' @@ -18,7 +18,7 @@ import FormItems from '@/components/form/formItem.js' export default [ Avatar, btnSwitch, - badge, + Badge, loadMore, fullSpin, HeadTop, diff --git a/resources/spa/src/components/DiySelect.vue b/resources/spa/src/components/DiySelect.vue index 337a823e3..e3025820e 100644 --- a/resources/spa/src/components/DiySelect.vue +++ b/resources/spa/src/components/DiySelect.vue @@ -16,7 +16,7 @@ @click="setCurVal(option)" > {{ option.label }} diff --git a/resources/spa/src/components/FootGuide.vue b/resources/spa/src/components/FootGuide.vue index f31851292..e1c0f135f 100644 --- a/resources/spa/src/components/FootGuide.vue +++ b/resources/spa/src/components/FootGuide.vue @@ -33,11 +33,11 @@ class="guide-item" @click="to({name: 'MessageHome'})" > - + - + 消息
- + - +
@@ -77,6 +77,7 @@ export default { }, mounted () { this.$el.parentNode.style.paddingBottom = '1rem' + this.fetchUnread() }, methods: { to (path) { @@ -88,6 +89,10 @@ export default { showPostMenu () { this.$bus.$emit('post-menu') }, + fetchUnread () { + if (this.$route.path.match(/^\/message/)) return + this.$store.dispatch('GET_NEW_UNREAD_COUNT') + }, }, } diff --git a/resources/spa/src/components/common/badge.vue b/resources/spa/src/components/common/Badge.vue similarity index 91% rename from resources/spa/src/components/common/badge.vue rename to resources/spa/src/components/common/Badge.vue index b2c0713bf..86d9c111f 100644 --- a/resources/spa/src/components/common/badge.vue +++ b/resources/spa/src/components/common/Badge.vue @@ -7,6 +7,7 @@ + {{ title }} - + {{ tips }} - + diff --git a/resources/spa/src/page/UserFans.vue b/resources/spa/src/page/UserFans.vue index 576da2d30..2ffe88e76 100644 --- a/resources/spa/src/page/UserFans.vue +++ b/resources/spa/src/page/UserFans.vue @@ -1,37 +1,20 @@