/*
 * @Author: liumu
 * @Date: 2025-07-28 17:05:37
 * @LastEditTime: 2025-07-29 17:55:33
 * @LastEditors: liumu
 * @Description: 描述
 */
import { fetchSso, fetchSso1 } from '@/core/request';

// const basurl = '/htgl/api/yhzxApi';
const basurl = '/yhzxApi';
// 获取模板列表
export const getMbList = (params) => {
  return fetchSso({
    url: `${basurl}/xz/getMbList`,
    data: JSON.stringify(params),
    method: 'post',
    loading: true,
  });
};

// 查询模板明细
export const getMbmx = (params) => {
  return fetchSso({
    url: `${basurl}/xz/getMbmx?mbuuid=${params.mbuuid}`,
    method: 'post',
    loading: true,
  });
};

// 修改模板状态
export const updateMbZt = (params) => {
  return fetchSso({
    url: `${basurl}/xz/updateMbZt`,
    data: JSON.stringify(params),
    method: 'post',
    loading: true,
  });
};

// 保存模板
export const saveMb = (params) => {
  return fetchSso({
    url: `${basurl}/xz/saveMbxx`,
    data: JSON.stringify(params),
    method: 'post',
    loading: true,
  });
};

// 编辑模板
export const editMb = (params) => {
  return fetchSso({
    url: `${basurl}/xz/updMbxx`,
    data: JSON.stringify(params),
    method: 'post',
    loading: true,
  });
};

// 删除模板
export const delMb = (params) => {
  return fetchSso({
    url: `${basurl}/xz/delMbxx?mbuuid=${params.mbuuid}`,
    method: 'delete',
    loading: true,
  });
};

// 获取勋章配置列表
export const getPzList = (params) => {
  return fetchSso({
    url: `${basurl}/xz/getXzpzList`,
    data: JSON.stringify(params),
    method: 'post',
    loading: true,
  });
};

// 获取模板下拉列表
export const getMbLb = () => {
  return fetchSso({
    url: `${basurl}/xz/getMbLb`,
    method: 'get',
    loading: true,
  });
};

// 获取明星下拉列表
export const getMxLb = () => {
  return fetchSso({
    url: `${basurl}/user/getMxLb`,
    method: 'get',
    loading: true,
  });
};

// 修改配置状态
export const updateXzZt = (params) => {
  return fetchSso({
    url: `${basurl}/xz/updateXzZt`,
    data: JSON.stringify(params),
    method: 'post',
    loading: true,
  });
};

// 查询配置明细
export const getPzmx = (params) => {
  return fetchSso({
    url: `${basurl}/xz/getPzmx?xzuuid=${params.xzuuid}`,
    method: 'post',
    loading: true,
  });
};

// 保存配置
export const savePz = (params) => {
  return fetchSso({
    url: `${basurl}/xz/savePzxx`,
    data: JSON.stringify(params),
    method: 'post',
    loading: true,
  });
};

// 编辑配置
export const editPz = (params) => {
  return fetchSso({
    url: `${basurl}/xz/updPzxx`,
    data: JSON.stringify(params),
    method: 'post',
    loading: true,
  });
};

// 删除配置
export const delPz = (params) => {
  return fetchSso({
    url: `${basurl}/xz/delPzxx?xzuuid=${params.xzuuid}`,
    method: 'delete',
    loading: true,
  });
};

// 获取勋章审核列表
export const getShList = (params) => {
  return fetchSso({
    url: `${basurl}/xz/getXzsqList`,
    data: JSON.stringify(params),
    method: 'post',
    loading: true,
  });
};

// 修改审批状态
export const updSpzt = (params) => {
  return fetchSso({
    url: `${basurl}/xz/updSpzt`,
    data: JSON.stringify(params),
    method: 'post',
    loading: true,
  });
};
// 修改审批状态
export const ckfpxq = (params) => {
  return fetchSso({
    url: `/ggzcApi/gg/fp/getFpxx?wjuuid=${params.wjuuid}`,
    method: 'get',
    loading: true,
  });
};

// 查询明星基本信息
export const getMxjbxx = () => {
  return fetchSso1({
    url: `${basurl}/user/getStarmx`,
    method: 'get',
    loading: true,
  });
};

// 编辑明星基本信息
export const editMxjbxx = (params) => {
  return fetchSso1({
    url: `${basurl}/user/updStarMx`,
    data: JSON.stringify(params),
    method: 'post',
    loading: true,
  });
};

// 获取明星认证列表
export const getStarList = (params) => {
  return fetchSso({
    url: `${basurl}/user/getStarList`,
    data: JSON.stringify(params),
    method: 'post',
    loading: true,
  });
};

// 查询明星认证信息
export const getStarxx = (params) => {
  return fetchSso({
    url: `${basurl}/user/getStarxx?yhuuid=${params.yhUuid}`,
    method: 'get',
    loading: true,
  });
};

// 创建明星
export const saveStar = (params) => {
  return fetchSso({
    url: `${basurl}/user/createStar`,
    data: JSON.stringify(params),
    method: 'post',
    loading: true,
  });
};

// 编辑明星
export const editStar = (params) => {
  return fetchSso({
    url: `${basurl}/user/updStar`,
    data: JSON.stringify(params),
    method: 'post',
    loading: true,
  });
};

// 编辑明星
export const delStar = (params) => {
  return fetchSso({
    url: `${basurl}/user/delStar?yhuuid=${params.yhUuid}`,
    method: 'delete',
    loading: true,
  });
};

export const getResources = (data) => {
  return fetchSso({
    url: `/htgl/api/cpzxApi/cpxx/getResources?url=${data}&cpuuid=123`,
    method: 'Get',
    loading: true,
  });
};

// 用户信息手机页面========================================
// 获取明星列表
export const getMxList = (params) => {
  return fetchSso({
    url: `${basurl}/xz/getMxList`,
    data: JSON.stringify(params),
    method: 'post',
    loading: true,
  });
};

// 期待明星页面=========================================

export const getQwmxxxList = (params) => {
  return fetchSso({
    url: `${basurl}/user/getQwmxxxList`,
    data: JSON.stringify(params),
    method: 'post',
    loading: true,
  });
};
//=====================================================

// 运营位
// 4.查询运维位列表
export const getGgxxList = (params) => {
  return fetchSso({
    url: `${basurl}/yw/getGgxxList`,
    data: JSON.stringify(params),
    method: 'post',
    loading: true,
  });
};

// 保存运维位广告信息
export const saveGgxx = (params) => {
  return fetchSso({
    url: `${basurl}/yw/saveGgxx`,
    data: JSON.stringify(params),
    method: 'post',
    loading: true,
  });
};

// 根据gguuid修改运维位广告信息
export const updGgxx = (params) => {
  return fetchSso({
    url: `${basurl}/yw/updGgxx`,
    data: JSON.stringify(params),
    method: 'post',
    loading: true,
  });
};

// 根据gguuid删除运维广告信息
export const delGgxx = (params) => {
  return fetchSso({
    url: `${basurl}/yw/delGgxx?gguuid=${params}`,
    // data: JSON.stringify(params),
    method: 'delete',
    loading: true,
  });
};
//=====================================================

// 查询期望明星统计
export const getQwmxxxTj = (params) => {
  return fetchSso({
    url: `${basurl}/user/getQwmxxxTj`,
    data: JSON.stringify(params),
    method: 'post',
    loading: true,
  });
};
// 刷新明星
export const udpQwmxxx = () => {
  return fetchSso({
    url: `${basurl}/user/udpQwmxxx`,
    // data: JSON.stringify(params),
    method: 'get',
    loading: true,
  });
};
// 查询抽奖记录列表（分页）
export const getCjjlPage = (params) => {
  return fetchSso({
    // url: `http://172.18.0.12:9010/yhzxApi/shdz/getCjjlPage`,
    url: `${basurl}/shdz/getCjjlPage`,
    data: JSON.stringify(params),
    method: 'post',
    loading: true,
  });
};

// 获取填写的收货地址信息
export const getJpshxx = (gluuid) => {
  return fetchSso({
    // url: `http://172.18.0.12:9010/yhzxApi/shdz/getJpshxx?gluuid=008e0723e71348619de7e802c5fdaaba`,
    url: `${basurl}/shdz/getJpshxx?gluuid=${gluuid}`,
    method: 'get',
    loading: true,
  });
};

// 修改发货状态
export const udpFhzt = (params) => {
  return fetchSso({
    // url: `http://172.18.0.12:9010/yhzxApi/shdz/udpFhzt`,
    url: `${basurl}/shdz/udpFhzt`,
    data: JSON.stringify(params),
    method: 'post',
    loading: true,
  });
};


//-------
// 查询评论
export const queryJbList = (params) => {
  return fetchSso({
    url: `${basurl}/jb/queryJbList`,
    data: JSON.stringify(params),
    method: 'post',
    loading: true,
  });
};

//查询详情
export const getJbjl = (params) => {
  return fetchSso({
    url: `${basurl}/jb/getJbjl`,
    data: JSON.stringify(params),
    method: 'post',
    loading: true,
  });
};

//查询动态的所有举报记录
export const queryJbjlList = (params) => {
  return fetchSso({
    url: `${basurl}/jb/queryJbjlList`,
    data: JSON.stringify(params),
    method: 'post',
    loading: true,
  });
};


//处理举报信息
export const sljb = (params) => {
  return fetchSso({
    url: `${basurl}/jb/sljb`,
    data: JSON.stringify(params),
    method: 'post',
    loading: true,
  });
};


