Commit 5730b1e7 by zhangzhen

细节优化

parent 76d48e20
...@@ -220,7 +220,7 @@ ...@@ -220,7 +220,7 @@
<radio-group class="radio-group"> <radio-group class="radio-group">
<label v-if="secondaryCardList.length" class="flex-between" @tap="onRadioChange('secondaryCard')"> <label v-if="secondaryCardList.length" class="flex-between" @tap="onRadioChange('secondaryCard')">
<view class="flex-row-center"> <view class="flex-row-center">
<text>次卡(剩余{{secondaryCard.number}}次)</text> <text>{{secondaryCard.name}}(剩余{{secondaryCard.number}}次)</text>
</view> </view>
<view class="flex-row-center" > <view class="flex-row-center" >
<text>请选择</text> <text>请选择</text>
...@@ -228,7 +228,9 @@ ...@@ -228,7 +228,9 @@
</view> </view>
</label > </label >
<label v-if="monthlyCardList.length" class="flex-between" @tap="onRadioChange('monthlyCard')"> <label v-if="monthlyCardList.length" class="flex-between" @tap="onRadioChange('monthlyCard')">
<view>月卡</view> <view class="flex-row-center">
<text>{{monthlyCardList[0].confName}}</text>
</view>
<view class="flex-row-center" > <view class="flex-row-center" >
<text>请选择</text> <text>请选择</text>
<radio class='pink radio' :class="radioChecked=='monthlyCard'?'checked':''" value="monthlyCard" :checked="radioChecked == 'monthlyCard'?true:false" style="transform:scale(0.7)" /> <radio class='pink radio' :class="radioChecked=='monthlyCard'?'checked':''" value="monthlyCard" :checked="radioChecked == 'monthlyCard'?true:false" style="transform:scale(0.7)" />
...@@ -239,7 +241,7 @@ ...@@ -239,7 +241,7 @@
</view> </view>
</view> </view>
<view class="flex-between price use-coupon-box"> <view v-if="userInfo && !secondaryCardList.length && !monthlyCardList.length" class="flex-between price use-coupon-box">
<text <text
class="text-black text-left">{{useCouponList[selectCouponIndex].couponType==2? '团购券':'优惠券'}}</text> class="text-black text-left">{{useCouponList[selectCouponIndex].couponType==2? '团购券':'优惠券'}}</text>
<view class="flex-1 flex-row" @tap="onNavToSelectCoupon"> <view class="flex-1 flex-row" @tap="onNavToSelectCoupon">
...@@ -248,7 +250,7 @@ ...@@ -248,7 +250,7 @@
<text class="cuIcon-right " :class="useCouponList.length?'text-pink':'text-gray'"></text> <text class="cuIcon-right " :class="useCouponList.length?'text-pink':'text-gray'"></text>
</view> </view>
</view> </view>
<view class="flex-between price"> <view v-if="userInfo && !secondaryCardList.length && !monthlyCardList.length" class="flex-between price">
<text class="text-black text-left">可用时长</text> <text class="text-black text-left">可用时长</text>
<view class="flex-row"> <view class="flex-row">
<text class="text-pink text-lg text-bold">{{computePriceInfo && computePriceInfo.availableDuration? Number(computePriceInfo.availableDuration).toFixed(1) : 0}}</text> <text class="text-pink text-lg text-bold">{{computePriceInfo && computePriceInfo.availableDuration? Number(computePriceInfo.availableDuration).toFixed(1) : 0}}</text>
...@@ -618,7 +620,8 @@ ...@@ -618,7 +620,8 @@
secondaryCardList:[], secondaryCardList:[],
secondaryCard:{ secondaryCard:{
status: 0, status: 0,
number: 0 number: 0,
name:'次卡'
}, },
submitBtnStatus:false submitBtnStatus:false
}; };
...@@ -1364,9 +1367,6 @@ ...@@ -1364,9 +1367,6 @@
} }
if(res.data.data && res.data.data.consumerMonthlyCard && res.data.data.consumerMonthlyCard.length){ if(res.data.data && res.data.data.consumerMonthlyCard && res.data.data.consumerMonthlyCard.length){
console.log(res.data.data.consumerMonthlyCard,'res.data.data.consumerMonthlyCard')
this.monthlyCardList = res.data.data.consumerMonthlyCard this.monthlyCardList = res.data.data.consumerMonthlyCard
}else{ }else{
this.monthlyCardList = []; this.monthlyCardList = [];
...@@ -1375,16 +1375,15 @@ ...@@ -1375,16 +1375,15 @@
if(this.userInfo.secondaryCardList && res.data.data && res.data.data.consumerSecondaryCard && res.data.data.consumerSecondaryCard.length){ if(this.userInfo.secondaryCardList && res.data.data && res.data.data.consumerSecondaryCard && res.data.data.consumerSecondaryCard.length){
this.secondaryCardList = res.data.data.consumerSecondaryCard this.secondaryCardList = res.data.data.consumerSecondaryCard
let list = this.userInfo.secondaryCardList.filter(item=>{ if(this.secondaryCardList && this.secondaryCardList.length){
return moment().valueOf() < moment(item.expirationDate).valueOf() && item.number>0
})
if(list && list.length){
this.secondaryCard.status = 1; this.secondaryCard.status = 1;
let num = 0; let num = 0;
list.forEach(val => { this.secondaryCardList.forEach(val => {
num+=val.number num+=val.number;
this.secondaryCard.name = val.confName;
}) })
this.secondaryCard.number = num; this.secondaryCard.number = num;
} }
}else{ }else{
...@@ -1515,7 +1514,7 @@ ...@@ -1515,7 +1514,7 @@
list: JSON.parse(JSON.stringify(this.dateIntervalList)), list: JSON.parse(JSON.stringify(this.dateIntervalList)),
startDateTime: `${this.dateList[this.dateIndex].readDate} ${startTime}:00`, startDateTime: `${this.dateList[this.dateIndex].readDate} ${startTime}:00`,
duration: this.roomLabelList[this.modeIndex].labelDuration duration: this.roomLabelList[this.modeIndex].labelDuration
}); },false);
this.$forceUpdate(); this.$forceUpdate();
this.onHideModal(); this.onHideModal();
}, },
...@@ -1773,7 +1772,7 @@ ...@@ -1773,7 +1772,7 @@
startDateTime: startDate, startDateTime: startDate,
duration:this.formatAllData.duration, duration:this.formatAllData.duration,
durationType:2 durationType:2
}); },false);
this.$forceUpdate(); this.$forceUpdate();
}, },
...@@ -1849,7 +1848,7 @@ ...@@ -1849,7 +1848,7 @@
//startTime(HH:mm): 开始时间,显示使用 //startTime(HH:mm): 开始时间,显示使用
//endTime(HH:mm): 结束时间,显示使用 //endTime(HH:mm): 结束时间,显示使用
//duration(Number): 时长,仅分钟 //duration(Number): 时长,仅分钟
onTransiteForDate(params) { onTransiteForDate(params,dayChange = true) {
// 计算出时长,使用分钟计算 // 计算出时长,使用分钟计算
if(!params.duration){ if(!params.duration){
return { return {
...@@ -1910,8 +1909,10 @@ ...@@ -1910,8 +1909,10 @@
useStatus:dateObj.useStatus, useStatus:dateObj.useStatus,
durationType: 2, durationType: 2,
} }
// 获取用户可用优化券 if(dayChange){
this.onGetUseCoupon(paramsData) // 获取用户可用优化券
this.onGetUseCoupon(paramsData)
}
return paramsData return paramsData
}, },
onCancleTip(){ onCancleTip(){
......
...@@ -117,7 +117,7 @@ ...@@ -117,7 +117,7 @@
<u-divider text="邀请记录" line-color="#333333" text-color="#000000"></u-divider> <u-divider text="邀请记录" line-color="#333333" text-color="#000000"></u-divider>
</view> </view>
<view class="list-box"> <view class="list-box">
<scroll-view scroll-y="true" @scrolltolower="onScrolltolower" class="scroll-view"> <scroll-view v-if="loginStatus && list.length" scroll-y="true" @scrolltolower="onScrolltolower" class="scroll-view">
<view class="flex-col list-box"> <view class="flex-col list-box">
<view v-for="(item,i) in list" :key="i" class="flex-between item"> <view v-for="(item,i) in list" :key="i" class="flex-between item">
<view class="flex-col"> <view class="flex-col">
...@@ -137,7 +137,7 @@ ...@@ -137,7 +137,7 @@
</view> </view>
</view> </view>
</scroll-view> </scroll-view>
<view v-if="loginStatus && !list.length" class="empty-box"> <view v-else class="empty-box">
<u-empty text="暂无数据" textColor='#C1C1C1' width="120" :icon="listBlankImage"> <u-empty text="暂无数据" textColor='#C1C1C1' width="120" :icon="listBlankImage">
</u-empty> </u-empty>
</view> </view>
......
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