import { requestApi } from '../util/network' // 获取用户订单列表 export const addInstantMessage = (data) => requestApi( '/member_instant_message/add', 'POST', data, 'member' ) // 加入聊天 export const joinChat = (client_id) => requestApi( '/member_instant_message/join', 'POST', { client_id: client_id }, 'member' ) // 已读消息 export const setMessage = (data) => requestApi( '/member_instant_message/set_message', 'POST', data, 'member' ) // 聊天历史 export const getChatHistory = (params, t_id) => requestApi( '/member_instant_message/get_chat_log', 'POST', { page: params.page, per_page: params.per_page, t_id: t_id }, 'member' ) // 最近消息 export const getChatList = () => requestApi( '/member_instant_message/get_user_list', 'POST', { recent: 1 }, 'member' ) // 新消息数 export const getChatCount = () => requestApi( '/member_instant_message/get_msg_count', 'POST', { }, 'member' )