import request from '@/sheep/request';

const ImMessageApi = {
  // 获得消息列表
  getMemberMessagePage: (params) => {
    return request({
      url: '/im/member-message/page',
      method: 'GET',
      params,
      custom: {
        auth: true,
        showLoading: false,
      },
    });
  },
  // 更新消息已读
  updateReadStatus: (messageId) => {
    return request({
      url: '/im/member-message/update-read-status',
      method: 'POST',
      params: { messageId },
	  custom: {
	    auth: true,
	    showLoading: false,
	  },
    });
  },
  // 发送消息
  sendImMessage: (data) => {
    return request({
      url: '/im/member-message/send',
      method: 'POST',
      data,
      custom: {
		auth: true,
		showLoading: false,
		showSuccess: false,
		successMsg: '保存成功'
      },
    });
  },
};

export default ImMessageApi;
