giftApi.js 1.52 KB

const url = '/rop-scrm-coupon/router'
const pageSize = 10
export default {
  /**根据条件获取定向礼包列表(企微) */
  getGiftList (data) {
    data.method = 'scrm.api.coupon.weChat.directional.gift.list'
    data.pageSize = pageSize
    return window.$HTTP({
      url,
      data
    })
  },

  getInApproveGiftList (data) {
    data.method = 'scrm.api.coupon.weChat.directional.gift.approve.in.list'
    data.pageSize = pageSize
    return window.$HTTP({
      url,
      data
    })
  },
  /** 根据id删除定向礼包 */
  deleteGift (data) {
    data.method = 'scrm.api.coupon.directional.gift.delete'
    return window.$HTTP({
      url,
      data
    })
  },
  /**根据id获取定向礼包详情(企微) */
  getGiftDetail (id) {
    let data = {
      method: 'scrm.api.coupon.weChat.directional.gift.detail',
      id
    }
    return window.$HTTP({
      url,
      data
    })
  },
  /**定向礼包专用优惠券列表(嘀加后台和企微) */
  getCouponList (data) {
    data.method = 'scrm.api.coupon.directional.gift.coupon.list'
    data.pageSize = 9999
    return window.$HTTP({
      url,
      data
    })
  },
  /**创建或修改礼包,修改时礼包id必传 */
  createOrupdataGift (data) {
    data.method = 'scrm.api.coupon.directional.gift.create'
    return window.$HTTP({
      url,
      data
    })
  },
  /**根据定向礼包id获取二维码路径 */
  createQr (data) {
    data.method = 'scrm.api.coupon.directional.gift.qr.code'
    return window.$HTTP({
      url,
      data
    })
  }
}