Browse Source

优化推荐显示

master
Enzo 4 years ago
parent
commit
871472478a
  1. 16
      pages/goodsDetail/index.vue
  2. 2
      pages/recommList/index.vue

16
pages/goodsDetail/index.vue

@ -81,7 +81,7 @@
<view class="pop-price lf-m-l-20 lf-font-24">¥{{ choose_date_orangilprice || goods_detail.spec[type_index].original_price }}</view>
</view>
<view class="lf-font-24 lf-m-t-20 lf-color-555">
使用时间{{ choose_date }}
使用时间{{ go_date }}
</view>
<view style="margin-top: 60rpx;">
<text class="lf-font-32 lf-font-bold" style="color: #131315;">套餐类型</text>
@ -96,9 +96,9 @@
<text class="lf-font-28 lf-color-gray">使用时间</text>
</view>
<view class="lf-flex">
<picker mode="date" :end="goods_detail.spec[type_index].date_end" :start="goods_detail.spec[type_index].date_start" :value="choose_date" @change="pickerChange" start="2021-09-26" end="2021-09-30">
<picker mode="date" :end="goods_detail.spec[type_index].date_end" :start="goods_detail.spec[type_index].date_start" :value="go_date" @change="goChange">
<!-- <view class="lf-color-555 lf-text-right" style="width: 400rpx;">{{ '请选择收货时间...' }}</view> -->
<view class="lf-color-333 lf-text-right lf-font-28" style="width: 400rpx;">{{ choose_date }}</view>
<view class="lf-color-333 lf-text-right lf-font-28" style="width: 400rpx;">{{ go_date }}</view>
</picker>
<text class="lf-iconfont lf-icon-xiangyou lf-text-vertical lf-m-l-10"></text>
</view>
@ -629,9 +629,11 @@
},
chooseType(index) {
this.type_index = index;
this.choose_date_price = 0;
this.choose_date_orangilprice = 0;
let differrentList = this.goods_detail.spec[this.type_index].list;
differrentList.forEach((item,index) => {
if(item.date == this.choose_date) {
if(item.date == this.go_date) {
this.choose_date_price = this.goods_detail.spec[this.type_index].list[index].price;
this.choose_date_orangilprice = this.goods_detail.spec[this.type_index].list[index].original_price;
this.choose_date_specid = this.goods_detail.spec[this.type_index].list[index].id;
@ -737,13 +739,13 @@
//0线123
if(this.goods_detail.product.type == 2) {
//
if(this.choose_date != '请选择使用时间') {
let date_compare = this.compareDate(this.choose_date);
if(this.go_date != '请选择使用时间') {
let date_compare = this.compareDate(this.go_date);
console.log(date_compare)
if(date_compare){
let goods_id = this.goods_detail.id;
let godds_type = this.goods_detail.product.type;
let enter_time = this.choose_date;
let enter_time = this.go_date;
let spec_id = this.choose_date_specid;
let type_text = this.goods_detail.spec[this.type_index].name;
this.$url('/pages/order/confirm_order?goods_id='+ goods_id+ '&spec_id='+ spec_id +'&goods_type='+godds_type+'&departure_time='+enter_time+'&goods_typetext='+type_text);

2
pages/recommList/index.vue

@ -4,7 +4,7 @@
<u-tabs :list="tab_list" :is-scroll="true" :current="current" @change="tabChange"></u-tabs>
</view>
<lf-nocontent v-else></lf-nocontent>
<swiper :style="{height: 'calc('+ windowHeight +'px - 160rpx)', width: '750rpx'}" :current="current" @change="swiperChange">
<swiper :style="{height: 'calc('+ windowHeight +'px - 260rpx)', width: '750rpx'}" :current="current" @change="swiperChange">
<swiper-item v-for="(tabItem, tabIndex) in tab_list" :key="tabIndex">
<scroll-view class="com" :scroll-y="true" :refresher-enabled="true" :refresher-triggered="tabItem.isRefresher" @scrolltolower="onScrolltolower" @refresherrefresh="onRefresherrefresh">
<view class="lf-m-t-20"></view>

Loading…
Cancel
Save