import request from "@/utils/request";
import { Account_BaseUrl } from "@/api/config";
const baseURL = Account_BaseUrl + "/admin/shopMsgPush";
const Api = {
  // 订阅二维码
  code(params: any) {
    return request<any>({
      url: `${baseURL}/code`,
      method: "get",
      params: params,
    });
  },
  // 店铺推送状态获取
  shopState(params: any) {
    return request<any>({
      url: `${baseURL}/shopState`,
      method: "get",
      params: params,
    });
  },
  //店铺推送状态修改
  shopStateUpdate(data: any) {
    return request<any>({
      url: `${baseURL}/shopState`,
      method: "put",
      data
    });
  },
  //订阅用户列表
  getUserList(params: any) {
    return request<any>({
      url: `${baseURL}`,
      method: "get",
      params: params,
    });
  },
  //订阅解绑
  shopStateDel(params: any) {
    return request<any>({
      url: `${baseURL}`,
      method: "delete",
      params
    });
  },
  //配置订阅消息类型
  config(data: any) {
    return request<any>({
      url: `${baseURL}/config`,
      method: "post",
      data
    });
  },
};

export default Api;
