shopmall.js 3.66 KB
import api from '../request/http'

module.exports = {
  /** 分页查询商城专区的商品信息 */
  getGoodsList(data) {
    return api.post({
      method: `scrm.api.shopmall.zoneInfo.weapp.goodsPage.HMD`,
      pageNum: 1,
      pageSize: 999,
      ...data
    })
  },
  /** 添加购物车 */
  addShoppingcart(data) {
    return api.post({
      method: `scrm.api.shopmall.weapp.shoppingcart.add`,
      ...data
    })
  },
  /** 购物车删除商品 */
  delShoppingcart(data) {
    return api.post({
      method: `scrm.api.shopmall.weapp.shoppingcart.delete`,
      ...data
    })
  },
  /** 分页获取购物车 */
  getShoppingcartList(data) {
    return api.post({
      method: `scrm.api.shopmall.weapp.shoppingcart.list`,
      ...data
    })
  },
  /** 购物车商品变更(比如修改数量) */
  updateShoppingcart(data) {
    return api.post({
      method: `scrm.api.shopmall.weapp.shoppingcart.update`,
      ...data
    })
  },
  /** 领取确认订单最大优惠券 */
  getMaxCoupon(orderGoods) {
    return api.fetch('scrm.api.shopmall.weapp.order.coupons.get.HMD', {
      orderGoods
    })
  },

  /**购物车结算 */
  settlementShoppingcart(data) {
    return api.post({
      method: `scrm.api.shopmall.weapp.shoppingcart.settlement`,
      ...data
    })
  },

  /** 创建订单(立即购买) */
  createOrder(data) {
    return api.post({
      method: `scrm.api.shopmall.weapp.order.create`,
      ...data
    })
  },
  /**创建支付订单(去付款) */
  payOrder(data) {
    return api.post({
      method: `scrm.api.shopmall.weapp.order.createPay`,
      ...data
    })
  },
  /**订单详情  */
  getOrderDetail(data) {
    return api.post({
      method: `scrm.api.shopmall.platform.order.detail`,
      ...data
    })
  },
  /**获取订单的售后详情 */
  getOrderRefundDetail(orderCode) {
    return api.post({
      method: `scrm.api.shopmall.weapp.orderRefund.detail`,
      orderCode
    })
  },

  //取消付款
  cancelPay(orderCode) {
    return api.fetch('scrm.api.shopmall.weapp.order.cancelPay', {
      orderCode
    })
  },
  /** 申请售后-自营商品 */
  afterSale(data) {
    return api.fetch('scrm.api.shopmall.points.afterSales.add', data)
  },
  /** 申请售后-云中鹤申请售后 */
  afterSalesPlatform(data) {
    return api.fetch('scrm.api.shopmall.platform.afterSales.add', data)
  },
  //申请售后待审核的订单取消售后
  cancelOrder(orderCode) {
    return api.fetch('scrm.api.shopmall.weapp.orderRefund.cancel', {
      orderCode
    })
  },
  /** 售后寄回商品填写快递信息  */
  addDelivery(data) {
    return api.post({
      method: `scrm.api.shopmall.platform.sendBack.goods`,
      ...data
    })
  },
/**云中鹤查看物流列表(售后寄回)*/
queryExpressList(data={}){
  return api.post({
    method: 'scrm.api.shopmall.platform.query.expressList',
    ...data
  })
},
  /** 云中鹤-售后订单详情*/
  platformSaleDetail(data) {
    return api.post({
      method: 'scrm.api.shopmall.platform.afterSales.detail',
      ...data
    })
  },
  /**自营-售后订单详情 */
  afterSaleDetail(data) {
    return api.post({
      method: 'scrm.api.shopmall.points.afterSales.detail',
      ...data
    })
  },

  /** 确认收货 */
  confirmReceipt(orderCode) {
    return api.post({
      method: `scrm.api.shopmall.weapp.order.confirmReceipt`,
      orderCode
    })
  },



 /**平台商城接口---取消售后 */
 platformEditSale(data) {
  return api.post({
    method: 'scrm.api.shopmall.platform.afterSales.cancel',
    ...data
  })
},

  /** 查看物流轨迹 */
  queryLogistics(data) {
    return api.post({
      method: `scrm.api.shopmall.platform.order.queryLogistics`,
      ...data
    })
  },
}