|
...
|
...
|
@@ -287,22 +287,22 @@ Page({ |
|
|
|
if(coupon && util.getType(coupon)=='object'){
|
|
|
|
coupon.stringifyUse=JSON.stringify(coupon.use)
|
|
|
|
if(marketing.is_coupon=='1' && coupon && (!coupon.use.is_cash || coupon.use.is_cash=='1')){
|
|
|
|
let cash=coupon.use.cash;
|
|
|
|
let cash=coupon.use.cash*1;
|
|
|
|
let price=coupon.price*1;
|
|
|
|
console.log('cash',cash+'---'+'price',price+'---'+'discount',((price/cash)*10).toFixed(2));
|
|
|
|
coupon.discount=((price/cash)*10).toFixed(2);
|
|
|
|
coupon.discount=cash!=0?((price/cash)*10).toFixed(2):'';
|
|
|
|
}
|
|
|
|
coupon_dataList.push(coupon);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if(coupon && util.getType(coupon)=='array'){
|
|
|
|
if(coupon.length>0){
|
|
|
|
coupon.forEach(item=>{
|
|
|
|
item.stringifyUse=JSON.stringify(item.use)
|
|
|
|
if((!item.use.is_cash || item.use.is_cash=='1')){
|
|
|
|
let cash=item.use.cash;
|
|
|
|
let cash=item.use.cash*1;
|
|
|
|
let price=item.price*1;
|
|
|
|
console.log('cash',cash+'---'+'price',price+'---'+'discount',((price/cash)*10).toFixed(2));
|
|
|
|
item.discount=((price/cash)*10).toFixed(2);
|
|
|
|
item.discount=cash!=0?((price/cash)*10).toFixed(2):'';
|
|
|
|
}
|
|
|
|
})
|
|
|
|
}
|
...
|
...
|
|