// api接口统一管理
import { get, post } from './http.js'


/**
 * 发送短信
 */
export const sendSMS = param => post('/api/v1/sms/send',param)
/**
 * 单页信息
 */
export const singleWeb = param => post('/api/v1/html/info_text',param)


/**
 * 授权登录
 */
export const login = param => post('/login',param)
/**
 * 抖音授权登录
 */
export const register = param => post('/register',param)
/**
 * 授权手机号
 */
export const getPhone = param => post('/api/v1/setting/set_phone',param)



/**
 * 行业分类列表
 */
export const industryCategoryList = param => get('/api/industry-classifications',param)
/**
 * 事件列表
 */
export const eventList = param => get('/api/events',param)
/**
 * 时间筛选项
 */
export const eventFilterList = param => get('/api/events/filters',param)
/**
 * 事件详情
 */
export const eventDetails = id => get('/event/'+id,)
/**
 * 事件添加关注
 */
export const followeEvent = id => get('/event/'+id)
/**
 * 评论事件
 */
export const commentEvent = (id,param) => post('/post/create/'+id,param)
/**
 * 点赞事件评论
 */
export const likeEventComment = id => post('/post/like/'+id)
/**
 * 评论评论
 */
export const commentComment = id => post('/post/comment/'+id)
/**
 * 事件评论列表
 */
export const eventCommentList = id => post('/post/comments/'+id)

/**
 * 确认服务订单
 */
export const confirmServiceOrder = param => post('/api/v1/service/order/check_order',param)
/**
 * 添加服务购物车
 */
export const addToShoppingCart = param => post('/api/v1/service/add_cart',param)
/**
 * 服务购物车列表
 */
export const shoppingCartList = param => post('/api/v1/service/cart_list',param)
/**
 * 服务购物车设置优惠券
 */
export const shoppingCartCoupon = param => post('/api/v1/service/set_coupon',param)
/**
 * 修改服务购物车数量
 */
export const updateShoppingCartNum = param => post('/api/v1/service/cart_edit',param)
/**
 * 服务下单
 */
export const createServiceOrder = param => post('/api/v1/service/order/appointment',param)


/**
 * 获取某一天的事件列表
 */
export const calendarEventList = param => get('/api/calendar-events',param)
/**
 * 投资时间详情
 */
export const investEventDetails = (id,param) => get('/event/'+id,param)
/**
 * 获取当前月的每一天的时间数量
 */
export const calendarEventCount = param => get('/api/calendar-event-counts',param)
/**
 * 商品列表
 */
export const goodsList = param => post('/api/v1/goods/index',param)
/**
 * 商品来源
 */
export const goodsSourceList = param => post('/api/v1/goods/goods_source',param)
/**
 * 商品详情
 */
export const goodsDetails = param => post('/api/v1/goods/detail',param)
/**
 * 商品规格价格信息
 */
export const goodsSpecPriceInfo = param => post('/api/v1/goods/specifications',param)
/**
 * 商品立即购买
 */
export const goodsPurchase = param => post('/api/v1/goods/order/place_orders',param)
/**
 * 商品订单支付
 */
export const goodsOrderPay = param => post('/api/v1/goods/order/pay_goods_order',param)
/**
 * 商品订单列表
 */
export const goodsOrderList = param => post('/api/v1/goods/order/order_list',param)
/**
 * 商品订单详情
 */
export const goodsOrderDetails = param => post('/api/v1/goods/order/order_detail',param)
/**
 * 确认收货
 */
export const goodsConfirmReceipt = param => post('/api/v1/goods/order/take_order',param)

/**
 * 修改密码
 */
export const updatePassword = param => post('/applet/usercent/savecode',param)
/**
 * 我的收藏
 */
export const myCollect = param => post('/applet/usercent/getSc',param)
/**
 * 我的地址
 */
export const myAddress = param => post('/api/v1/address/index',param)
/**
 * 新增地址
 */
export const addAddress = param => post('/api/v1/address/create',param)
/**
 * 修改地址
 */
export const updateAddress = param => post('/api/v1/address/update',param)
/**
 * 删除地址
 */
export const deleteAddress = param => post('/api/v1/address/delete',param)
/**
 * 地址详情
 */
export const addressDetails = param => post('/api/v1/address/view',param)
/**
 * 我的默认地址
 */
export const myDefaultAddress = param => post('/api/v1/address/my_default',param)
/**
 * 用户信息
 */
export const userInfo = param => post('/api/v1/my/info',param)
/**
 * 编辑用户信息
 */
export const updateUserInfo = param => post('/api/v1/setting/edit_info',param)
/**
 * 投诉建议类型
 */
export const complaintType = param => post('/api/v1/my/feedback_type',param)
/**
 * 投诉建议
 */
export const complaintSuggest = param => post('/api/v1/my/send_feedback',param)
/**
 * 兑换储值卡
 */
export const exchangeCard = param => post('/api/v1/my/exchange_card',param)
/**
 * 领取优惠券
 */
export const couponList = param => post('/api/v1/coupon/index',param)
/**
 * 领取优惠券
 */
export const getCoupon = param => post('/api/v1/coupon/receive',param)
/**
 * 我的优惠券
 */
export const myCoupon = param => post('/api/v1/coupon/my_coupon',param)
/**
 * 申请认证
 */
export const applyAuthentication = param => post('/api/v1/my/apply_certification',param)
/**
 * 充值金额
 */
export const  rechargeAmount = param => post('/api/v1/recharge/index',param)
/**
 * 创建充值订单
 */
export const  createRechargeOrder = param => post('/api/v1/recharge/create_order',param)
/**
 * 余额明细
 */
export const  balanceRecord = param => post('/api/v1/my/money_detail',param)

/**
 * 取消服务订单
 */
export const  cancelServiceOrder = param => post('/api/v1/service/order/cancel',param)
/**
 * 服务订单支付
 */
export const  serviceOrderPay = param => post('/api/v1/service/order/pay_service_order',param)
/**
 * 服务订单列表
 */
export const  serviceOrderList = param => post('/api/v1/service/order/olst',param)
/**
 * 服务订单详情
 */
export const  serviceOrderDetails = param => post('/api/v1/service/order/odetail',param)
/**
 * 服务订单评价
 */
export const  serviceOrderEvaluate = param => post('/api/v1/service/order/send_evaluate',param)
/**
 * 服务订单申请退款
 */
export const  serviceOrderRefund = param => post('/api/v1/service/order/apply_refund',param)
/**
 * 可退款服务订单列表
 */
export const  canRefundServiceOrderList = param => post('/api/v1/service/order/order_sn_lst',param)

/**
 * 修改投资偏好
 */
export const  updateInvestmentPreferences = param => post('/settings/investment_preferences',param)
/**
 * 佣金记录
 */
export const  commissionRecord = param => post('/api/v1/distribution/commission_log',param)
/**
 * 提现
 */
export const withdraw = param => post('/api/v1/distribution/apply_withdrawal',param)
/**
 * 提现记录
 */
export const withdrawRecord = param => post('/api/v1/distribution/apply_log',param)
/**
 * 地址配置
 */
export const addressConfig = param => post('/api/v1/address/basic_param',param)
/**
 * 申请成为分销商
 */
export const applyDistributor = param => post('/api/v2/distribution/apply',param)
/**
 * 提现方式
 */
export const withdrawWay = param => post('/api/v1/distribution/withdrawal_way',param)
/**
 * 团队订单
 */
export const teamOrderList = param => post('/api/v1/distribution/team_order',param)
/**
 * 分销商排行
 */
export const distributorRankList = param => post('/api/v1/distribution/ranking',param)
/**
 * 分销码和背景
 */
export const shareCode = param => post('/api/v1/my/my_qr_code',param)
/**
 * 手续费比例
 */
export const feeRatio = param => post('/api/v1/ajax/web_config',param)
/**
 * 绑定上级
 */
export const bindSuperiors = param => post('/api/v1/my/bind_top',param)