Commit 5730b1e7 by zhangzhen

细节优化

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