| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- 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} data {lastVoucherId,voucherType}
- * @returns Promise
- */
- getMyVouchers(data) {
- return get(prefix + "user-vouchers", data)
- },
- /**
- * 分页查询优惠券贩卖列表
- * @param {Object} data {lastVoucherId,voucherType}
- * @returns Promise
- */
- getDealVouchers(data) {
- return get(prefix + "voucher-center", data)
- },
- /**
- * 获取优惠券类型选项
- * @returns Promise
- */
- getVoucherTypeOptions() {
- return get(prefix + "voucher-type-select")
- },
- /**
- * 获取充电桩可用的优惠券
- * @param {Object} data {chargeBoxId,connectorId,voucherType}
- * @returns Promise
- */
- getSelectionVoucher(data) {
- return get(prefix + "charge-can-use-vouchers", data)
- }
- }
|