import request from "@/utils/request";
//获取轮播图
export const getBanners = (data) => request({ url: "index/get_banners", method: "post", data,loading:true });
export const getUserInfo = (data) => request({ url: "user/get_userinfo", method: "post", data,loading:true });

// 领取邀请奖励
export function getShareReward(renshu) {
  const formData = new FormData();
  formData.append('renshu', renshu);
  
  return request({
    url: '/index/get_shareccb',
    method: 'post',
    data: formData,
    loading: true
  })
}
export const getNewsDetail = (data) => request({ url: "index/newss_datail", method: "post", data,loading:true });
export const getNews = (data) => request({ url: "index/get_newss", method: "post", data,loading:true });
// 获取项目
export const getMiner = (data) => request({ url: "index/get_miner", method: "get", data,loading:true });
// 获取支付通道 
export const getTong = (data) => request({ url: "index/gettong", method: "post", data,loading:true });

// 参与项目 
export const getChongInfo = (params) => request({ url: "index/get_chong_info_new", method: "get", params,loading:true });
// 修复分红
export const getChongXiufu = (params) => request({ url: "index/get_chongxiufu", method: "get", params,loading:true });
// 保证金
export const getChongbaozheng = (params) => request({ url: "index/get_chongbaozheng", method: "get", params,loading:true });
// 修复医疗
export const getChongyiliao = (params) => request({ url: "index/get_chongyiliao", method: "get", params,loading:true });
// 激活股权
export const getChongguquan = (params) => request({ url: "index/get_chongguquan", method: "get", params,loading:true });
// 党员申请 
export const applyDangyuan = (data) => request({ url: "user/apply_dangyuan", method: "post", data,loading:true });
// 参与退休计划 
export const joinRetirement = (type) => request({ 
  url: "/user/join_retirement", 
  method: "post", 
  data: new URLSearchParams({ type }),
  headers: { 'Content-Type': 'application/x-www-form-urlencoded' }
});

// 实名认证
export const setReal = (formData) => request({ 
  url: "index/setreal", 
  method: "post", 
  data: formData,
  loading: true 
});

export const getLink = () => request({ url: "index/get_link", method: "get", loading: true });