Files

36 lines
1.1 KiB
JavaScript
Raw Permalink Normal View History

/**
* Mini program API wrapper for this module.
* Call guide: require this module in a page, then invoke the matching method from page event handlers or lifecycle hooks.
*/
2026-04-01 15:18:35 +08:00
const request = require('../utils/request')
module.exports = {
2026-05-23 18:45:41 +08:00
/**
* Purpose: listUserCoupons supports coupon.js by holding or executing the list user coupons page or API role.
* Usage: import, call, read, or update this method from the owning page/module while preserving the surrounding loading and permission flow.
*/
2026-04-01 15:18:35 +08:00
listUserCoupons(status) {
return request({
url: '/coupon/user/list',
params: {
status
}
})
},
2026-05-23 18:45:41 +08:00
/**
* Purpose: getAvailableCoupons supports coupon.js by holding or executing the get available coupons page or API role.
* Usage: import, call, read, or update this method from the owning page/module while preserving the surrounding loading and permission flow.
*/
2026-04-01 15:18:35 +08:00
getAvailableCoupons(productTags, productPrice, shopId) {
return request({
url: '/coupon/available',
params: {
productTags,
productPrice,
shopId
}
})
}
}