| 123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- import { get, post } from "./http";
- const prefix = 'devicesApi/dawn/api/v1/';
- export default apiVoucher = {
- /**
- * 使用兑换码兑换优惠券
- * @param {redemptionCode} data
- * @returns Promise
- */
- redeemVoucher(data) {
- return post(prefix + "redeem-voucher-by-redemption-code", data)
- },
- /**
- * 领券中心兑换优惠券
- * @param {voucherId} data
- * @returns Promise
- */
- purchaseVoucher(data) {
- return post(prefix + "redeem-voucher-by-voucher-id", data)
- },
- /**
- * 分页查询我的优惠券列表
- * @param {Object*} {lastVoucherId,voucherType} data
- * @returns Promise
- */
- getMyVouchers(data) {
- return get(prefix + "user-vouchers", data)
- },
- /**
- * 分页查询优惠券贩卖列表
- * @param {Object*} {lastVoucherId,voucherType} data
- * @returns Promise
- */
- getDealVouchers(data) {
- return get(prefix + "voucher-center", data)
- },
- /**
- * 获取优惠券类型选项
- * @returns Promise
- */
- getVoucherTypeOptions() {
- return get(prefix + "voucher-type-select")
- }
- }
|