zhengkaixin 9 months ago
parent
commit
a10ab54b0a
4 changed files with 46 additions and 10 deletions
  1. 1 1
      config/.env.dev.ud.js
  2. 1 1
      main.js
  3. 6 1
      pages/record/details.vue
  4. 38 7
      pages/searchPile/chargeProcess/dcCharging.vue

+ 1 - 1
config/.env.dev.ud.js

@@ -22,7 +22,7 @@ const UNI_APP = {
 
 	openId:"oSruR6YkhP7QDroLnZGxWis43Kn0",//zkx
 	//openId:"oSruR6dsG6wrbiQCwyftfgnp5690",//sz
-	openId:"oSruR6dZcmSM4ATuweZ5fjHGQsiA",//ys
+	//openId:"oSruR6dZcmSM4ATuweZ5fjHGQsiA",//ys
 	//openId:"123",
 	//小鹏管家appid
 	//VUE_APP_WXAPPID:"wx7e70eb62a8459869",

+ 1 - 1
main.js

@@ -203,7 +203,7 @@ Vue.mixin({
 	methods: {
 		quickChargeReduceMethod(station){
 			
-			if(station.quickChargeReduceResult){
+			if(station.quickChargeReduceResult&& !station.quickChargeJoinActivity){
 				
 				return true 
 			}

+ 6 - 1
pages/record/details.vue

@@ -121,7 +121,12 @@
 					
 				</view>
 				<p style="color: rgba(119, 119, 119, 1);font-size: 24rpx;    text-align: end;"
-				 v-if="chargeDetail.quickChargeReduce">快充订单满{{chargeDetail.quickChargeDegree}}度服务费{{discountRatio10(chargeDetail.serviceDiscountRatio)}}折</p>
+				 v-if="chargeDetail.quickChargeReduce">快充订单满{{chargeDetail.quickChargeDegree}}度服务费
+				 <span v-if="chargeDetail.serviceDiscountRatio==0">免单</span>
+				  <span v-else >{{discountRatio10(chargeDetail.serviceDiscountRatio)}}折</span>
+				 
+				 
+				 </p>
 				
 				<view class="details-row">
 					<p>实付款</p>

+ 38 - 7
pages/searchPile/chargeProcess/dcCharging.vue

@@ -133,7 +133,18 @@
 			
 			
 			<p style="color: rgba(119, 119, 119, 1);font-size: 24rpx;    text-align: end;    margin: 0 80rpx;"
-			 v-if="chargingRecord.quickChargeReduce">快充订单满{{chargingRecord.quickChargeDegree}}度服务费{{discountRatio10(chargingRecord.serviceDiscountRatio)}}折</p>
+			 v-if="chargingRecord.quickChargeReduce">快充订单满{{chargingRecord.quickChargeDegree}}度服务费
+			 
+			
+			 
+			 <span v-if="chargingRecord.serviceDiscountRatio==0" >免单</span>
+			  <span v-else >{{discountRatio10(chargingRecord.serviceDiscountRatio)}}折</span>
+			 
+			 </p>
+			 
+			 <p style="color: rgba(119, 119, 119, 1);font-size: 24rpx;    text-align: end;    margin: 0 80rpx;"
+			  v-if="chargingRecord.quickChargeContentId">已选择最低折扣</p>
+			  
 			<view class="info">
 				<view class="info-name">
 					充电金额
@@ -809,7 +820,7 @@
 				lwidth: 600,
 				lheight: 600,
 				
-				lotteryIndex:0,
+				lotteryIndex:-1,
 				dataLottery: [
 					{
 						id: 2,
@@ -1001,9 +1012,10 @@
 			},
 			getPie() {
 				
-
+				
 			},
-			getPie2() {
+			getPie2() {
+				
 				console.log("getPie")
 				if (!this.myChart) {
 					this.myChart = echarts.init(document.getElementById('pieEcharts'), null, {
@@ -1210,7 +1222,11 @@
 					this.userCard = res.data.regUserCard;
 					
 					this.forPrice()
-
+					
+					if (this.chargingRecord.status == 2) {
+						//this.getPie()
+						this.lotteryApi(true)
+					}
 
 
 				}).catch(error => {
@@ -1423,7 +1439,7 @@
 
 						}
 						if (this.chargingRecord.status == 2) {
-							this.getPie()
+							//this.getPie()
 						}
 					} else if (this.chargingGun.gunType == 2) {
 						//交流
@@ -1431,6 +1447,10 @@
 							//this.percent=100;
 						}
 
+					}
+					if (this.chargingRecord.status == 2) {
+						//this.getPie()
+						this.lotteryApi(true)
 					}
 					//zkx
 					//this.percent=42;
@@ -1490,7 +1510,15 @@
 				})
 			},
 			
-			lotteryApi(){
+			lotteryApi(bl){
+				
+				if(this.chargingStation.quickChargeJoinActivity
+				&&this.chargingStation.quickChargeReduceResult){
+					//this.lotteryApi()
+				}else{
+					return
+				}
+				
 				API.getRateByRecordId({
 					recordId: this.chargingRecord.id
 				}).then((res) => {
@@ -1512,7 +1540,10 @@
 					}else{
 					
 					}
+					if(!bl){
 						this.confirm()
+					}
+						
 					
 				}).catch(error => {