恢复视频的发布
This commit is contained in:
@@ -31,7 +31,7 @@ const actions = {
|
||||
},
|
||||
async getFriendCircleInfo({ commit, state}) {
|
||||
uni.$u.http.get('/friendcircle/info').then(data=>{
|
||||
console.log("获取朋友圈信息",data);
|
||||
//console.log("获取朋友圈信息",data);
|
||||
commit("SET_UNREAD_COUNT", data.unread_count);
|
||||
commit("SET_TOP_UNREAD_ITEMS", data.top_unread_items);
|
||||
commit("SET_SETTINGS", data.settings);
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
import {
|
||||
v4 as uuidv4
|
||||
} from "uuid";
|
||||
import {v4 as uuidv4} from "uuid";
|
||||
import IMSDK from "openim-uniapp-polyfill";
|
||||
|
||||
import conversation from "./conversation";
|
||||
const state = {
|
||||
friendList: [],
|
||||
blackList: [],
|
||||
@@ -160,7 +158,7 @@ const actions = {
|
||||
commit("SET_FRIEND_LIST", [...tmpList, friendInfo]);
|
||||
}
|
||||
},
|
||||
updateFriendInfo({commit,state}, { friendInfo,isRemove = false}) {
|
||||
updateFriendInfo({commit,state,dispatch }, { friendInfo,isRemove = false}) {
|
||||
const tmpList = [...state.friendList];
|
||||
const idx = tmpList.findIndex((item) => item.userID === friendInfo.userID);
|
||||
|
||||
@@ -174,6 +172,11 @@ const actions = {
|
||||
}
|
||||
commit("SET_FRIEND_LIST", tmpList);
|
||||
}
|
||||
if (isRemove) {
|
||||
const conversationID = friendInfo.userID ? `si_${friendInfo.ownerUserID}_${friendInfo.userID}` : `si_${friendInfo.groupID}`;
|
||||
dispatch('conversation/deleteConversation',conversationID, { root: true });
|
||||
}
|
||||
|
||||
},
|
||||
pushNewBlack({ commit, state}, blackInfo) {
|
||||
const tmpList = [...state.blackList];
|
||||
|
||||
@@ -103,13 +103,25 @@ const actions = {
|
||||
commit("SET_CURRENT_MEMBER_IN_GROUP", memberInfo);
|
||||
}
|
||||
},
|
||||
resetConversationState({
|
||||
commit
|
||||
}) {
|
||||
resetConversationState({commit}) {
|
||||
commit("SET_CURRENT_MEMBER_IN_GROUP", {});
|
||||
commit("SET_CURRENT_GROUP", {});
|
||||
commit("SET_CURRENT_CONVERSATION", {});
|
||||
},
|
||||
deleteConversation({state,commit},conversationID) {
|
||||
return new Promise((reject,resolve)=>{
|
||||
IMSDK.asyncApi('deleteConversationAndDeleteAllMsg',uuidv4(), conversationID).then(res=>{
|
||||
const list = state.conversationList.filter((item)=>{
|
||||
return item.conversationID != conversationID;
|
||||
});
|
||||
commit("SET_CONVERSATION_LIST", [...list]);
|
||||
resolve();
|
||||
}).catch((e)=>{
|
||||
console.error(e);
|
||||
reject(e);
|
||||
})
|
||||
})
|
||||
},
|
||||
};
|
||||
|
||||
export default {
|
||||
|
||||
@@ -81,7 +81,7 @@ const actions = {
|
||||
resetMessageState({commit}) {
|
||||
commit("SET_HISTORY_MESSAGE_LIST", []);
|
||||
commit("SET_HAS_MORE_MESSAGE", true);
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
export default {
|
||||
|
||||
@@ -38,7 +38,7 @@ const mutations = {
|
||||
};
|
||||
|
||||
const actions = {
|
||||
async getSelfInfo({ commit }) {
|
||||
async getSelfInfo({commit}) {
|
||||
//#ifndef APP
|
||||
return [];
|
||||
//#endif
|
||||
@@ -57,7 +57,7 @@ const actions = {
|
||||
uni.$u.toast("获取个人信息失败");
|
||||
}
|
||||
},
|
||||
async updateBusinessInfo({ commit, state }) {
|
||||
async updateBusinessInfo({commit,state}) {
|
||||
try {
|
||||
const res = await businessGetUserInfo(state.selfInfo.userID);
|
||||
const businessData = res.data[0] ?? {};
|
||||
|
||||
Reference in New Issue
Block a user