/*
 * @Author: SunTao 328867980@qq.com
 * @Date: 2024-11-20 11:58:33
 * @LastEditors: SunTao 328867980@qq.com
 * @LastEditTime: 2024-11-20 15:49:28
 * @FilePath: \znxjxt-ui\src\api\xj\subscription.js
 * @Description: 订阅中心相关接口
 */

import request from "@/utils/request";

/**
 * @description: 获取订阅列表
 * @return {Promise<any>} 
 */
export const getSubscriptionList = (data) => {
  return request({
    url: "/subscriptions/list",
    method: "get",
    params: data,
  });
};

/**
 * @description: 订阅
 */
export const subscribe = (data) => {
  return request({
    url: "/subscriptions/add",
    method: "post",
    data,
  });
};

/**
 * @description: 取消订阅
 */
export const unsubscribe = (data) => {
  return request({
    url: "/subscriptions/remove",
    method: "post",
    data,
  });
};
