Commit 7b62ed026dba055c4734770669b6c1f66702843a

Authored by vking
1 parent ebd3a6e7

商家红包活动

@@ -210,7 +210,20 @@ Page({ @@ -210,7 +210,20 @@ Page({
210 } 210 }
211 */ 211 */
212 this.detailData.rdateStr = util.unixtoTime(this.detailData.ddate, tpl) 212 this.detailData.rdateStr = util.unixtoTime(this.detailData.ddate, tpl)
213 - 213 + if(this.detailData.order_info && this.detailData.order_info.status==3){ //已支付
  214 + let ores = await App.Customer.GetOrderInfo({rid: id});
  215 + let discount={pt:0,se:0}
  216 + ores.data.discount.forEach(q=>{
  217 + if(q.checked){
  218 + if(q.owner==1){//平台
  219 + discount.pt+=parseFloat(q.price)
  220 + }else{
  221 + discount.se+=parseFloat(q.price)
  222 + }
  223 + }
  224 + })
  225 + this.detailData.order_info.price=(this.detailData.order_info.price-discount.se).toFixed(2)
  226 + }
214 this.setData({ 227 this.setData({
215 tables: res.data.tables, 228 tables: res.data.tables,
216 bookInfo: this.detailData, 229 bookInfo: this.detailData,
@@ -504,7 +504,7 @@ @@ -504,7 +504,7 @@
504 "id": 60, 504 "id": 60,
505 "name": "pack-book/pages/book/b_detail", 505 "name": "pack-book/pages/book/b_detail",
506 "pathName": "pack-book/pages/book/b_detail", 506 "pathName": "pack-book/pages/book/b_detail",
507 - "query": "id=62202", 507 + "query": "id=66538",
508 "scene": null 508 "scene": null
509 }, 509 },
510 { 510 {