mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-uniapp.git
synced 2026-08-06 02:47:25 +08:00
feat: 增加礼品卡选择功能及相关逻辑
- 在 api/trade.js 中新增 selectGiftCard 函数以支持礼品卡选择 - 更新多个组件以集成礼品卡功能,包括购物车和订单页面 - 优化商品页面和订单详情展示,支持礼品卡抵扣信息 - 调整相关逻辑以确保礼品卡与其他促销活动的兼容性
This commit is contained in:
14
api/trade.js
14
api/trade.js
@@ -169,6 +169,20 @@ export function setAddressId(addressId,way) {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 选择礼品卡
|
||||
* @param way 购物车购买:CART/立即购买:BUY_NOW/拼团:PINTUAN / 积分:POINTS / 砍价:KANJIA
|
||||
* @param credentialId 礼品卡凭证 id;used=false 且不传则清空全部
|
||||
*/
|
||||
export function selectGiftCard(params) {
|
||||
return http.request({
|
||||
url: `/trade/carts/select/giftCard`,
|
||||
method: Method.GET,
|
||||
needToken: true,
|
||||
params,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建交易
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user