list.js 1.46 KB
import api from '../../../common/api';

export default {
    listData(param) {
        return api.get({
          url: '/coupon/getAllCouponForDiscountList.do',
            data: {
                status: param.status
            },
            api: 'store'
        });
    },
    experienceListData(param) {
      return api.get({
        url: '/coupon/getAllCouponForExperienceList.do',
        data: {
          status: param.status
        },
        api: 'store'
      });
    },
    coinsListData(params) {
      return api.get({
        url: '',
        data: {
          method: 'app.yohocoin.lists',
          ...params
        }
      });
    },
    /**
     * [球鞋机核销体验券]
     * @param  {[type]} param [{
     *     uid:'', id:'体验券ID',coupon_code: '', coupon_id: '', user_id: '',
     *     key: '', imei: '', device_id: '', pulse: ''
     * }]
     * @return {[type]}       [{}]
     */
    useBasketballCoupon(param) {
        return api.get({
            url: '/coupon/useBasketballCoupon',
            data: param,
            api: 'store'
        });
    },

    /**
     * [判断用户是否在要求范围以内]
     * @param  {[type]} param [{
     *     longitude:'经度', latitude:'纬度',checkCoupon: '1:400M,0:80KM'
     * }]
     * @return {[type]}       [{}]
     */
    ifOutOfLimit(param) {
        return api.get({
            url: '/basketballEvent/ifOutOfLimit.do',
            data: param,
            api: 'store'
        });
    }
};