feat(wechat): 添加朋友圈功能支持
- 在微信状态管理中新增朋友圈相关状态和方法 - 实现朋友圈数据获取、展示和交互功能 - 添加朋友圈API接口和WebSocket消息处理 - 优化朋友圈UI展示和样式
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
import { ChatRecord, ContractData, weChatGroup } from "@/pages/pc/ckbox/data";
|
||||
import { FriendsCircleItem } from "@/pages/pc/ckbox/weChat/components/SidebarMenu/FriendsCicle/index.data";
|
||||
|
||||
// 微信聊天相关的类型定义
|
||||
export interface WeChatState {
|
||||
// 当前选中的联系人/群组
|
||||
@@ -13,6 +15,11 @@ export interface WeChatState {
|
||||
isLoadingData: boolean;
|
||||
currentGroupMembers: any[];
|
||||
|
||||
// 朋友圈数据
|
||||
MomentOfKf: FriendsCircleItem[]; // 客服自己的朋友圈
|
||||
MomentOfSquare: FriendsCircleItem[]; // 朋友圈广场
|
||||
MomentOfFriend: FriendsCircleItem[]; // 好友的朋友圈
|
||||
|
||||
// Actions
|
||||
setCurrentContact: (
|
||||
contract: ContractData | weChatGroup,
|
||||
@@ -30,4 +37,13 @@ export interface WeChatState {
|
||||
setVideoUrl: (messageId: number, videoUrl: string) => void;
|
||||
addMessage: (message: ChatRecord) => void;
|
||||
receivedMsg: (message: ChatRecord) => void;
|
||||
|
||||
// 朋友圈相关方法
|
||||
setMomentOfKf: (moments: FriendsCircleItem[]) => void;
|
||||
setMomentOfSquare: (moments: FriendsCircleItem[]) => void;
|
||||
setMomentOfFriend: (moments: FriendsCircleItem[]) => void;
|
||||
addMomentOfKf: (moments: FriendsCircleItem[]) => void;
|
||||
addMomentOfSquare: (moments: FriendsCircleItem[]) => void;
|
||||
addMomentOfFriend: (moments: FriendsCircleItem[]) => void;
|
||||
clearAllMoments: () => void;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user