import request from "../utils/request";

/**
 * 会员权限列表页
 *
 * [api](https://console-docs.apipost.cn/preview/888dcf083e39e4e4/ae9a5ffd745e57d1?target_id=f0977f36-30f2-4495-bb03-680ef4a7ca14)
 */
export const getVipList = () => request.get("/weapp/legals/list");

/**
 * 会员权限详情页
 *
 * [api](https://console-docs.apipost.cn/preview/888dcf083e39e4e4/ae9a5ffd745e57d1?target_id=6deab440-b9f9-44ca-b0f9-1e06be8156cb)
 */
export const getVipDetail = (id) => request.get(`/weapp/legals/${id}`);

/**
 * vip卡片背景图片列表
 *
 * [api](https://console-docs.apipost.cn/preview/888dcf083e39e4e4/ae9a5ffd745e57d1?target_id=36501e69-3d2f-4e18-8725-4886aba271b6)
 */
export const getCardStyleList = () => request.get(`/weapp/cardStyle/list`);

/**
 * 设置我的vip卡片背景图片
 *
 * [api](https://console-docs.apipost.cn/preview/888dcf083e39e4e4/ae9a5ffd745e57d1?target_id=6deab440-b9f9-44ca-b0f9-1e06be8156cb)
 */
export const useCardStyle = (data) =>
  request.post(`/weapp/cardStyle/use`, data);
