zhengkaixin 1 год назад
Родитель
Сommit
6dd822b820

+ 7 - 1
apis/index.js

@@ -218,4 +218,10 @@ export function passengerMessageNoReadNum(data) {
 	
 	
 	
-	
+export function changeQuickCharging(data) {
+	return request({
+		method: 'post',
+		data: data,
+		url: '/mobile/regUser/changeQuickCharging'
+	})
+}

+ 2 - 1
pages/searchPile/chargeProcess/charge.vue

@@ -345,7 +345,8 @@
 							</span>
 						</view>
 						<p style="color: red;    font-size: 28rpx;" v-show="selectItem.amountRemark">
-							{{selectItem.amountRemark}}代金券,退余额时将扣除已使用的优惠券金额</p>
+							{{selectItem.amountRemark}}代金券,退余额时将扣除已使用的优惠券金额
+						</p>
 
 						<view class="rechargeMain">
 							<view class="recharge-item"

+ 46 - 18
pages/searchPile/stationAndPile/chargingPileDetails.vue

@@ -647,7 +647,8 @@
 				carTempBl: false,
 				maxlength: 8,
 				chatShowId: "",
-				chatShow: false,
+				chatShow: false,
+				startCarChargingBl:false,
 			}
 		},
 
@@ -1002,7 +1003,7 @@
 					stationId: this.detail.stationId
 				}).then((res2) => {
 					uni.hideLoading()
-
+						
 					this.userCard = res2.data.regUserCard
 					//this.canUse=res2.data.canUse
 					//this.user = res.data
@@ -1018,6 +1019,14 @@
 							
 						}
 
+					}
+					//快捷充电
+					if (this.personInfo && this.personInfo.memberLevel == "3"&&!this.isback&&this.personInfo.quickCharging ) {
+						if(this.startCarChargingBl==false){
+							this.startCarChargingBl=true;
+							this.startCarCharging()
+						}
+							
 					}
 
 				}).catch(error2 => {
@@ -1399,7 +1408,37 @@
 				if (personInfo && personInfo.userType == "1") {
 					this.showVin = true
 				}
-			},
+			},
+			startCarCharging(){
+						
+						var submitForm={
+							deviceNo:this.detail.deviceNo,
+							gun:this.gun.channelNo,
+							carNumber:this.car ? this.car.carNum : '',
+							chargeStrategy:0,
+							amount:0,
+							payType:0,
+						}
+						if(this.userCardBool){
+							submitForm.userCardId=this.userCard.id
+						}
+						API.startCarCharging(submitForm).then((res) => {
+							
+							this.gotoUrl("pages/searchPile/chargeProcess/dcCharging?id=" + res.data.recordId);
+							
+						}).catch(error => {
+							uni.hideLoading()
+							if (error == '用户账户余额不足!') {
+						
+							} else {
+								
+							}
+							uni.showToast({
+								title: error
+							})
+						
+						})
+			}
 		},
 
 		onReady() {
@@ -1414,7 +1453,9 @@
 			// img="https://yktwechat.xiaoxinda.com/config/xxd2021.jpg"		
 			if (carDetText) {
 				this.carDetText = carDetText
-			}
+			}
+			
+			
 		},
 		onLoad(op) {
 			if (op.isback) {
@@ -1437,20 +1478,7 @@
 				} else {
 					//this.getBannerInfoTop("home-top");	
 				}
-				//this.getBannerInfoTop("home-top");
-				// var obj=this.carhelp.get("newyear_activity2023")
-				// if(obj==null||obj==""||(obj&&obj.status==0)){
-
-
-				// 	//this.showNtStep=2
-				// }else{
-				// 	this.getBannerInfoTop("home-top");
-				// }
-
-				//this.getBannerInfo("charge-start")
-
-
-				//this.carhelp.setGunId(op.id)
+				
 				this.getPile()
 
 			} else {

+ 5 - 1
pages/searchPile/stationAndPile/stationDetails.vue

@@ -1033,7 +1033,11 @@
 				this.flag = !this.flag
 			},
 			enableAppointmentBl(item) {
-				return !item.enableAppointment || !(item.reserveWeekSettingList && item.reserveWeekSettingList.length);
+				if(this.personInfo.memberLevel!=3){
+					return  true
+				}
+				
+				return  (!item.enableAppointment || !(item.reserveWeekSettingList && item.reserveWeekSettingList.length));
 			},
 			confirmPhoneBl() {
 				this.openModalBl = false;

+ 35 - 3
pages/user/setting.vue

@@ -13,6 +13,19 @@
 						<u-switch v-model="checked" active-color="#00E266" @change="checkedChange"></u-switch>
 					</view>
 				</view>
+			</view>
+			<view class="userCell-item" v-if="personInfo.memberLevel==3">
+				<view class="userCell-title">
+					<p class="oldTextjp" oldstyle="font-size: 18px;">快捷充电</p>
+				</view>
+				<view class="userCell-content " >
+					<view class="value">
+						<view class="text oldTextjp2" oldstyle="font-size: 16px;">
+							扫码即充 充满自停
+						</view>
+						<u-switch v-model="checked2" active-color="#00E266" @change="checkedChange2"></u-switch>
+					</view>
+				</view>
 			</view>
 			<view class="userCell-item" @click="gotoUrl('pages/user/logout')">
 				<view class="userCell-title">
@@ -48,7 +61,8 @@
 				content: '是否退出当前账号?',
 				userId: '',
 				userPhone: '',
-				checked:false,
+				checked:false,
+				checked2:false,
 				valueStyle: {
 					color:'#ff3300',
 				},
@@ -61,7 +75,8 @@
 					fontWeight: 'bold',
 					fontSize: '18px',
 				},
-				fontMode: '',
+				fontMode: '',
+				personInfo:{}
 			}
 		},
 		onReady() {
@@ -69,9 +84,26 @@
 				this.checked = true;
 			} else {
 				this.checked = false;
+			}
+			this.personInfo = this.carhelp.getPersonInfo()
+			if(this.personInfo.quickCharging){
+				this.checked2 = true;
 			}
 		},
-		methods: {
+		methods: {
+			checkedChange2() {
+			
+				
+				
+				API.changeQuickCharging({qucikStatus: this.checked2?1:0}).then((res) => {
+					
+				}).catch(error => {
+					uni.showToast({
+						title: error,
+						icon: "none"
+					})
+				})
+			},
 			checkedChange() {
 				if(this.checked) {
 					this.carhelp.set("getElderModeClass", "长辈模式");