1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- 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'
- )
|