index.js 867 Bytes
import api from '../../../common/api';

export default {
  experienceCount(params = {}) {
    return api.get({
      url: '/coupon/getAllCouponForExperienceCount.do',
      api: 'store',
      data: params
    });
  },
  discountCount(params = {}) {
    return api.get({
      url: '/coupon/getAllCouponForDiscountCount.do',
      api: 'store',
      data: params
    });
  },
    indexData(params = {}) {
        return api.get({
            url: '/coupon/category',
            api: 'store',
            data: params
        }).then((result) => {

            if (result && result.code === 200) {
                result.data.forEach((val) => {
                    if (typeof(val.point) !== 'undefined') {
                        val.point = String(val.point);
                    }
                });
            }

            return result;
        });
    }
};