22
This commit is contained in:
+11
-10
@@ -11,16 +11,6 @@ const mutations = {
|
||||
},
|
||||
SET_UNREAD_COUNT(state, count) {
|
||||
state.unread_count = count;
|
||||
if(count<1){
|
||||
uni.removeTabBarBadge({
|
||||
index:2
|
||||
})
|
||||
}else{
|
||||
uni.setTabBarBadge({
|
||||
index:2,
|
||||
text:count
|
||||
})
|
||||
}
|
||||
},
|
||||
SET_TOP_UNREAD_ITEMS(state, data) {
|
||||
state.top_unread_items = [...data];
|
||||
@@ -102,6 +92,17 @@ const actions = {
|
||||
async updateUnreadCount({commit,state},v) {
|
||||
commit("SET_UNREAD_COUNT", state.unread_count+v);
|
||||
},
|
||||
async deleteFriendCircleList({commit,state},params){
|
||||
uni.$u.http.post('/friendcircle/delete',params).then(res=>{
|
||||
var list = state.list.filter(item=>{
|
||||
return item.id!=params.id;
|
||||
})
|
||||
commit("SET_LIST", list);
|
||||
}).catch(e=>{
|
||||
console.log(e);
|
||||
uni.$u.toast(typeof e == Object ? e?.msg : e);
|
||||
})
|
||||
}
|
||||
};
|
||||
|
||||
export default {
|
||||
|
||||
Reference in New Issue
Block a user