Browse Source

价格精确计算

master
Enzo 5 years ago
parent
commit
900e88d81d
  1. 10
      pages/goodsDetail/index.vue

10
pages/goodsDetail/index.vue

@ -530,10 +530,11 @@
let total_date = differrentList.slice(this.live_index, this.leave_index); let total_date = differrentList.slice(this.live_index, this.leave_index);
this.hotel_specid = []; this.hotel_specid = [];
total_date.reduce((list, item) => { total_date.reduce((list, item) => {
this.total_hotel_price += parseInt(item.price);
this.total_hotel_orginalprice += parseInt(item.original_price);
this.total_hotel_price += parseFloat(item.price);
this.total_hotel_orginalprice += parseFloat(item.original_price);
this.hotel_specid.push(item.id); this.hotel_specid.push(item.id);
console.log(this.hotel_specid);
console.log('当前价格',this.total_hotel_price);
console.log('当前11',item.price);
}, []); }, []);
}, },
change(e) { change(e) {
@ -713,9 +714,10 @@
let departure_time = this.go_date; let departure_time = this.go_date;
let spec_id = this.choose_date_specid; let spec_id = this.choose_date_specid;
let type_text = this.goods_detail.spec[this.type_index].name; let type_text = this.goods_detail.spec[this.type_index].name;
let form_type = encodeURIComponent(JSON.stringify(this.goods_detail.product.diy_form));
this.$url('/pages/order/confirm_order?goods_id=' + goods_id + '&spec_id=' + spec_id + this.$url('/pages/order/confirm_order?goods_id=' + goods_id + '&spec_id=' + spec_id +
'&goods_type=' + godds_type + '&departure_time=' + departure_time + '&goods_type=' + godds_type + '&departure_time=' + departure_time +
'&goods_typetext=' + type_text);
'&goods_typetext=' + type_text+'&form_type='+form_type);
} }
}, },
// //

Loading…
Cancel
Save