This commit is contained in:
cansnow
2026-01-15 22:50:35 +08:00
parent dd16348558
commit db99bebcb4
26 changed files with 433 additions and 284 deletions
+11 -10
View File
@@ -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 {