Showing
1 changed file
with
10 additions
and
9 deletions
| @@ -63,6 +63,7 @@ Page({ | @@ -63,6 +63,7 @@ Page({ | ||
| 63 | GetCheckout(){ | 63 | GetCheckout(){ |
| 64 | App.Customer.GetOrderInfo({rid:this.options.rid}).then(res=>{ | 64 | App.Customer.GetOrderInfo({rid:this.options.rid}).then(res=>{ |
| 65 | let checkout=res.data | 65 | let checkout=res.data |
| 66 | + | ||
| 66 | if(checkout){ | 67 | if(checkout){ |
| 67 | let remark=[] | 68 | let remark=[] |
| 68 | if(res.data.is_wine>0){ | 69 | if(res.data.is_wine>0){ |
| @@ -77,15 +78,15 @@ Page({ | @@ -77,15 +78,15 @@ Page({ | ||
| 77 | }else{ | 78 | }else{ |
| 78 | this.GetOrderInfoRun() | 79 | this.GetOrderInfoRun() |
| 79 | } | 80 | } |
| 80 | - } | ||
| 81 | - if(checkout.discount.length>0){ | ||
| 82 | - let subsidy_price=0 | ||
| 83 | - checkout.discount.forEach(q=>{ | ||
| 84 | - if(q.checked){ | ||
| 85 | - subsidy_price+=q.price/1 | ||
| 86 | - } | ||
| 87 | - }) | ||
| 88 | - checkout.subsidy_price=subsidy_price.toFixed(2) | 81 | + if(checkout.discount && checkout.discount.length>0){ |
| 82 | + let subsidy_price=0 | ||
| 83 | + checkout.discount.forEach(q=>{ | ||
| 84 | + if(q.checked){ | ||
| 85 | + subsidy_price+=q.price/1 | ||
| 86 | + } | ||
| 87 | + }) | ||
| 88 | + checkout.subsidy_price=subsidy_price.toFixed(2) | ||
| 89 | + } | ||
| 89 | } | 90 | } |
| 90 | this.setData({ | 91 | this.setData({ |
| 91 | checkout:checkout, | 92 | checkout:checkout, |
-
Please register or login to post a comment