19
This commit is contained in:
@@ -27,6 +27,18 @@ const mutations = {
|
||||
},
|
||||
SET_RECV_FRIEND_APPLICATIONS(state, list) {
|
||||
state.recvFriendApplications = [...list];
|
||||
const count = list.filter((item) => item.handleResult === 0);
|
||||
state.unHandleFriendApplicationNum = count.length;
|
||||
if(state.unHandleFriendApplicationNum>0){
|
||||
uni.setTabBarBadge({
|
||||
index:1,
|
||||
text:(state.unHandleFriendApplicationNum<100?state.unHandleFriendApplicationNum:'···')+'',
|
||||
});
|
||||
}else{
|
||||
uni.hideTabBarRedDot({
|
||||
index:1
|
||||
})
|
||||
}
|
||||
},
|
||||
SET_SENT_FRIEND_APPLICATIONS(state, list) {
|
||||
state.sentFriendApplications = [...list];
|
||||
@@ -60,7 +72,7 @@ const actions = {
|
||||
if (data.length < count) break;
|
||||
initialFetch = false;
|
||||
} catch (error) {
|
||||
console.error("getFriendListPage error");
|
||||
console.error("getFriendListPage error",error);
|
||||
}
|
||||
}
|
||||
commit("SET_FRIEND_LIST", friendInfoList);
|
||||
|
||||
Reference in New Issue
Block a user