Commit cfe0c41a authored by youjie's avatar youjie

优化代码

parent d1934f32
......@@ -657,78 +657,12 @@ export default {
/*此处应把需要的数据进行保存,如入住离开日期...添加到vuex然后再进行跳转到上一页
*不推荐使用本地缓存,下面是缓存的示例
*/
uni.setStorage({
key: "Time",
data: JSON.stringify(obj),
});
// uni.setStorage({
// key: "Time",
// data: JSON.stringify(obj),
// });
this.$emit("finish", obj);
//价格清单,应该存入vuex获取缓存中
// if (this.priceStauts.length > 0) {
// var price = []
// if (this.end[0] - this.start[0] == 0) {
// for (var i = this.start[1]; i < this.end[1]; i++) {
// var day = this.date[this.start[0]].year + this.type + this.setPull(this.date[this.start[0]]
// .month) + this.type + this.isFestival(
// this.start[0], i)
// price.push({
// day_str: day,
// price: this.priceStauts[this.start[0]][i]
// })
// }
// } else {
// for (var i = this.start[0]; i <= this.end[0]; i++) {
// console.log(i)
// if (i == this.start[0]) {
// for (var j = this.start[1]; j < this.date[i].day.length; j++) {
// var day = this.date[i].year + this.type + this.setPull(this.date[i].month) + this
// .type + this.isFestival(
// i, j)
// price.push({
// day_str: day,
// price: this.priceStauts[i][j]
// })
// }
// } else if (i == this.end[0]) {
// for (var j = 0; j < this.end[1]; j++) {
// var day = this.date[i].year + this.type + this.setPull(this.date[i].month) + this
// .type + this.isFestival(
// i, j)
// price.push({
// day_str: day,
// price: this.priceStauts[i][j]
// })
// }
// } else {
// for (var j = 0; j < this.date[i].day.length; j++) {
// var day = this.date[i].year + this.type + this.setPull(this.date[i].month) + this
// .type + this.isFestival(
// i, j)
// price.push({
// day_str: day,
// price: this.priceStauts[i][j]
// })
// }
// }
// }
// }
// //加入缓存
// uni.setStorage({
// key: 'Price',
// data: JSON.stringify(price)
// })
// }
//跳转到上一页
// uni.navigateBack({
// delta: 1
// })
},
},
};
......
......@@ -162,12 +162,11 @@
商品总价
</view>
<view class="val f14 regular" style="text-align: right;">
<text style="margin-right: 30rpx;">{{searchObj.peoples}}</text>
<text style="margin-right: 30rpx;">{{orderMsg.RoomCount}}间房</text>
<text style="margin-right: 30rpx;">{{ dayObj.day }}</text>
<text class="red">{{RoomInfo.Currency}}
<!--{{getPrice(orderMsg.TotalPrice)*orderMsg.RoomCount}}-->
{{orderMsg.TotalPrice*orderMsg.RoomCount*dayObj.day}}
<text style="margin-right: 5rpx;">{{searchObj.peoples}}</text>
<text style="margin-right: 5rpx;">{{orderMsg.RoomCount}}间房</text>
<text style="margin-right: 5rpx;">{{dayObj.day}}</text>
<text class="red">
{{RoomInfo.Currency}}{{(orderMsg.TotalPrice*orderMsg.RoomCount*dayObj.day).toFixed(2)}}
</text>
</view>
</view>
......
......@@ -659,8 +659,50 @@
</view>
</view>
<view class="empty-block"></view>
<view style="padding: 50rpx 40rpx;background: #fff;">
<view class="big-title">
<text>费用明细</text>
</view>
<view class="jz_form" style="margin: 40rpx 0; padding: 0">
<view class="form-items">
<view class="label"> 商品总价 </view>
<view class="val f14 regular" style="text-align: right">
<text style="margin-right: 30rpx">{{ orderMsg.AdultPeopleNum }}</text>
<text class="red">{{ price }}</text>
</view>
</view>
<view class="form-items" style="border-bottom: none">
<view class="label" style="text-align: left;"> 明细 </view>
</view>
<view class="flex f12 grey" style="margin-bottom: 40rpx" :key="index">
<view style="flex: 1">
<text style="margin-right: 30rpx">人数</text>
</view>
<view style="text-align: right">{{ orderMsg.AdultPeopleNum }}人 × ¥
<!-- #ifdef MP-DI -->
{{ dataList.VisaB2CPrice }}
<!-- #endif -->
<!-- #ifdef MP-AG -->
{{ dataList.VisaPrice }}
<!-- #endif -->
</view>
</view>
</view>
<view class="flex f12 grey" style="margin-bottom: 40rpx" :style="{'color':mainColor+' !important'}" v-if="useCouponIds.length>0">
<view style="flex: 1">
<text style="margin-right: 30rpx">优惠券</text>
</view>
<view style="text-align: right">
{{currentCoupon.discountMoney}}</view>
</view>
<view class="flex f12 grey" style="margin-bottom: 40rpx">
<view style="flex: 1">
<text style="margin-right: 30rpx">小计</text>
</view>
<view style="text-align: right">
¥{{parseFloat((price-currentCoupon.discountMoney)).toFixed(2)}}</view>
</view>
</view>
<view class="empty-block"></view>
</template>
<coupon v-if="couponList.length > 0 && showCoupon" :price="price"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment