Commit 29b1374e by zhangzhen

细节优化

parent dc1de781
......@@ -224,7 +224,7 @@
<view class="radio-group-box" :class="showMorePayWay? 'radio-group-box-height':''">
<radio-group class="radio-group">
<label v-if="Number(computePriceInfo.availableBalance)" class="flex-between" @tap="onRadioChange('availableBalance')">
<!-- <label v-if="Number(computePriceInfo.availableBalance)" class="flex-between" @tap="onRadioChange('availableBalance')">
<view class="flex-1 flex-between">
<view class="flex-row-center">
<text>余额: <text class="text-pink text-bold">{{computePriceInfo.availableBalance}}</text> 可用</text>
......@@ -234,10 +234,9 @@
</view>
</view>
<view class="flex-row-center" >
<!-- <text>请选择</text> -->
<radio class='pink radio' :class="radioChecked=='availableBalance'?'checked':''" value="availableBalance" :checked="radioChecked == 'availableBalance'?true:false" style="transform:scale(0.7)" />
</view>
</label >
</label > -->
<label v-if="monthlyCardList.length" class="flex-between" @tap="onRadioChange('monthlyCard')">
<view class="flex-row-center">
......@@ -261,17 +260,16 @@
</label >
<label v-if="computePriceInfo && computePriceInfo.availableDuration" class="flex-between" @tap="onRadioChange('availableDuration')">
<!-- <label v-if="computePriceInfo && computePriceInfo.availableDuration" class="flex-between" @tap="onRadioChange('availableDuration')">
<view class="flex-1 flex-between">
<view class="flex-row-center">
<text>时长: <text class="text-pink text-bold">{{Number(computePriceInfo.availableDuration).toFixed(1)}}</text>小时可用</text>
</view>
</view>
<view class="flex-row-center" >
<!-- <text>请选择</text> -->
<radio class='pink radio' :class="radioChecked=='availableDuration'?'checked':''" value="availableDuration" :checked="radioChecked == 'availableDuration'?true:false" style="transform:scale(0.7)" />
</view>
</label >
</label > -->
</radio-group>
</view>
......@@ -286,14 +284,14 @@
<text class="cuIcon-right " :class="useCouponList.length?'text-pink':'text-gray'"></text>
</view>
</view>
<!-- <view v-if="userInfo && !radioChecked" class="flex-between price">
<view v-if="userInfo && computePriceInfo.availableDuration" 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>
<text class="text-pink">小时</text>
</view>
</view> -->
<view v-if="computePriceInfo.duration" class="flex-between price">
</view>
<view v-if="userInfo && computePriceInfo.duration" class="flex-between price">
<text class="text-black text-left">时长抵扣</text>
<view class="flex-row">
<text class="text-pink text-lg text-bold">{{ Number(computePriceInfo.duration).toFixed(1)}}</text>
......@@ -651,7 +649,7 @@
warnTip:'',
activityDate:{},
storeCleanDuration: getSysConfigValue('StoreCleanDuration')? Number(getSysConfigValue('StoreCleanDuration')):30,
radioChecked:'availableBalanceAndavailableDuration',
radioChecked:'',
monthlyCardList:[],
secondaryCardList:[],
secondaryCard:{
......@@ -720,10 +718,13 @@
onRadioChange(e){
if(this.radioChecked === e){
this.radioChecked = ''
if(this.useCouponList && this.useCouponList.length){
this.selectCouponIndex = 0;
}
}else{
this.radioChecked = e
this.selectCouponIndex = -1;
}
this.selectCouponIndex = -1;
this.onComputePrice();
},
// 日期切换
......@@ -1338,11 +1339,6 @@
}else{
this.selectCouponIndex = -1;
}
// if(this.allDayUseStatus){
// this.computePriceInfo =''
// }else{
// }
this.onQueryCardUse();
} else if (res.data.code == 401) {
this.$refs.loginPop.open();
......@@ -1395,8 +1391,6 @@
roomLabelId : this.modeIndex >= 0 ? this.roomLabelList[this.modeIndex].id : '',
}
queryCardUse(params).then(res => {
console.log(res,"12321321")
if(res.data.code == 200){
if(res.data.data && res.data.data.consumerMonthlyCard && res.data.data.consumerMonthlyCard.length){
......@@ -1452,23 +1446,7 @@
preEndDate: this.formatAllData.endDateTime,
orderMode: this.modeIndex2 >= 0 || (this.modeIndex>=0 && this.roomLabelList.length && this.roomLabelList[this.modeIndex].openPack==1)? 1 : 0,
packId: this.modeIndex2 >= 0 ? this.packageMode[this.modeIndex2].id : this.modeIndex>=0 && this.roomLabelList.length && this.roomLabelList[this.modeIndex].openPack==1? this.roomLabelList[this.modeIndex].packId : '',
roomLabelId :this.modeIndex >= 0 ? this.roomLabelList[this.modeIndex].id : '',
isBalance: 0,
isDuration:0
}
if( this.radioChecked === 'availableBalanceAndavailableDuration'){
params.isBalance = 1
params.isDuration = 1
}else if(this.radioChecked && ['availableBalance','availableDuration'].includes(this.radioChecked)){
if(this.radioChecked == "availableBalance"){
params.isBalance = 1
}else if(this.radioChecked == "availableDuration" && this.monthlyCardList.length){
params.isDuration = 1
}
}else {
params.isBalance = 0
params.isDuration = 0
roomLabelId :this.modeIndex >= 0 ? this.roomLabelList[this.modeIndex].id : ''
}
if(this.radioChecked == "secondaryCard" && this.secondaryCardList.length){
......
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