/*
 * @Date: 2022-09-15 16:40:39
 * @LastEditors: JinxChen
 * @LastEditTime: 2022-09-19 16:50:23
 * @FilePath: \TelpoUserManageAdmin\src\api\wechat-fans.js
 * @description:
 */
import requestWxFans from '@/utils/request-wx-fans';
export const APIWechatFans = {
  SelfGroups, //获取自定义分组
  getGroupSender, //获取群发列表
  addGroupSender, //添加模板消息群发
  getArticlesGroup, //获取文章列表
  getGroupSenderDetails, //获取单个群发记录
  deleteGroupSender, //删除单个群发记录
};
export default APIWechatFans;


function SelfGroups(data) {
  return requestWxFans({
      url: '/SelfGroups',
      method: 'get',
      params: data,
  });
}

function getGroupSender(data) {
  return requestWxFans({
      url: '/GroupSender',
      method: 'get',
      params: data,
  });
}

function getArticlesGroup(data) {
  return requestWxFans({
      url: '/Articles',
      method: 'get',
      params: data,
  });
}

function addGroupSender(params) {
  return requestWxFans({
      url: '/GroupSender',
      method: 'post',
      data: params,
  });
}


function getGroupSenderDetails(subject_id, data) {
  return requestWxFans({
      url: `/GroupSender/${subject_id}/details`,
      method: 'get',
      params: data,
  });
}

function deleteGroupSender(id) {
  return requestWxFans({
      url: `/GroupSender/${id}`,
      method: 'delete',
  });
}
