|
@@ -16,7 +16,7 @@
|
|
|
<view class="li-title">收费规则</view>
|
|
|
<view class="li-con">
|
|
|
<text space="emsp"> {{chargeRule.rule_txt}}</text>
|
|
|
- <view style="margin-top:15rpx;"><text space="emsp"> {{chargeRule.oth_rule_txt}}</text></view>
|
|
|
+ <!-- <view style="margin-top:15rpx;"><text space="emsp"> {{chargeRule.oth_rule_txt}}</text></view> -->
|
|
|
</view>
|
|
|
|
|
|
<view class="li-title">设备列表</view>
|
|
@@ -131,13 +131,20 @@
|
|
|
this.parkingSite.pic_url="../../static/img/header_bg.png";
|
|
|
}
|
|
|
this.chargeRule=resp.data.chargeRule;
|
|
|
- this.chargeRule['rule_txt']=`燃油车免费时长:${this.chargeRule.free_duration}分钟; 新能源车免费时长:${this.chargeRule.new_energy_free_duration}分钟; 燃油车每小时费用:${this.chargeRule.hour_cost}元; 新能源每小时费用:${this.chargeRule.new_energy_hour_cost}元; 每日封顶费用:${this.chargeRule.day_capping_cost}元`;
|
|
|
let othchargeRule=resp.data.othchargeRule||[];
|
|
|
- let othRuleTxt=[];
|
|
|
+ let othRuleTxt={ryc:[],xny:[]};
|
|
|
othchargeRule.forEach((item) => {
|
|
|
- othRuleTxt.push(`${item.min_section} 到 ${item.max_section}分钟:${item.parking_cost}元;`);
|
|
|
- })
|
|
|
- this.chargeRule['oth_rule_txt']=othRuleTxt.join(' ');
|
|
|
+ if(item.car_type=='1'){ //燃油车
|
|
|
+ othRuleTxt.ryc.push(`${item.min_section}-${item.max_section}分钟:${item.parking_cost}元`);
|
|
|
+ }
|
|
|
+ else if(item.car_type=='2'){ //新能源车
|
|
|
+ othRuleTxt.xny.push(`${item.min_section}-${item.max_section}分钟:${item.parking_cost}元`);
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ this.chargeRule['rule_txt']=`燃油车\n 免费时长:${this.chargeRule.free_duration}分钟,每小时费用:${this.chargeRule.hour_cost}元,${othRuleTxt.ryc.join(',')} \n新能源车\n 免费时长:${this.chargeRule.new_energy_free_duration}分钟,每小时费用:${this.chargeRule.new_energy_hour_cost}元,${othRuleTxt.xny.join(',')} \n每日封顶费用:${this.chargeRule.day_capping_cost}元`;
|
|
|
+
|
|
|
+ //this.chargeRule['oth_rule_txt']=othRuleTxt.join(' ');
|
|
|
this.devs=resp.data.devs;
|
|
|
|
|
|
}).catch(error => {
|