import req from "@/service/http";

// 产品列表
export const list = param => {
  return req.get("product/list", param);
};

// 产品详情
export const detail = param => {
  return req.get("product/detail", param);
};

// 产品算价
export const trail = param => {
  return req.post("product/price/trail", param);
};

// 下单流程
export const placeOrder = {
  // 创建保单订单
  create: params => {
    return req.post("policy_order", params);
  },
  // 获取订单支付信息
  pay: params => {
    return req.post("pay/go", params);
  },
  // 轮询支付结果
  polling: params => {
    return req.get("pay/result", {
      params
    });
  }
};
