增加新增好友的未读提醒
This commit is contained in:
@@ -13,6 +13,25 @@
|
|||||||
{{ item.title }}
|
{{ item.title }}
|
||||||
</text>
|
</text>
|
||||||
<view class="icon">
|
<view class="icon">
|
||||||
|
<!-- 新增好友数量提醒 -->
|
||||||
|
<u-badge
|
||||||
|
v-if="item.type === ContactMenuTypes.NewFriend && unreadNewFriendCount > 0"
|
||||||
|
:value="unreadNewFriendCount"
|
||||||
|
type="error"
|
||||||
|
class="u-badge"
|
||||||
|
:customStyle="{
|
||||||
|
fontWeight: 'bold',
|
||||||
|
fontSize: '14px',
|
||||||
|
padding: '2px 8px',
|
||||||
|
minWidth: '22px',
|
||||||
|
height: '22px',
|
||||||
|
lineHeight: '18px',
|
||||||
|
borderRadius: '12px',
|
||||||
|
marginRight: '8px',
|
||||||
|
boxSizing: 'border-box',
|
||||||
|
boxShadow: '0 2px 8px rgba(255,0,0,0.08)'
|
||||||
|
}"
|
||||||
|
/>
|
||||||
<u-icon name="arrow-right" color="#999" size="18" />
|
<u-icon name="arrow-right" color="#999" size="18" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -50,6 +69,12 @@ export default {
|
|||||||
return {};
|
return {};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
...mapGetters([
|
||||||
|
"storeRecvFriendApplications"
|
||||||
|
]),
|
||||||
|
ContactMenuTypes() {
|
||||||
|
return ContactMenuTypes;
|
||||||
|
},
|
||||||
getMenus() {
|
getMenus() {
|
||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
@@ -84,6 +109,11 @@ export default {
|
|||||||
},
|
},
|
||||||
];
|
];
|
||||||
},
|
},
|
||||||
|
// 新增未处理好友申请数量
|
||||||
|
unreadNewFriendCount() {
|
||||||
|
if (!this.storeRecvFriendApplications) return 0;
|
||||||
|
return this.storeRecvFriendApplications.filter(item => item.handleResult === 0).length;
|
||||||
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
menuClick({ type }) {
|
menuClick({ type }) {
|
||||||
|
|||||||
Reference in New Issue
Block a user