商品兑换券更新

This commit is contained in:
GaoHao
2024-11-19 16:58:37 +08:00
parent d2dbfd5163
commit 8c5e03d6c4
10 changed files with 141 additions and 69 deletions

View File

@@ -95,14 +95,17 @@
status: 1,
type: "",
payAmount: 0,
shopId: null,
shoppingCart: [],
productList: [],
};
},
onLoad(options) {
console.log(options)
if (options.type) { this.type = options.type }
if (options.payAmount) { this.payAmount = options.payAmount }
if (options.shopId) { this.shopId = options.shopId }
if (options.shoppingCart) { this.shoppingCart = JSON.parse(decodeURIComponent(options.shoppingCart)) }
if (options.productList) { this.productList = JSON.parse(decodeURIComponent(options.productList)) }
},
@@ -128,12 +131,14 @@
try {
let params = {
userId: uni.cache.get('userInfo').id,
shopId: uni.cache.get('shopId'),
status: this.status
}
if ( this.type == 'confirm_order_coupon' || this.type == 'confirm_order_product' ) {
params.orderId = -1;
}
if ( this.shopId ) {
params.shopId = this.shopId;
}
console.log("params",params)
let res = await this.api.conponList(params)
if (res.code == 0) {