zhengkaixin 3 years ago
parent
commit
6d47a77d03

+ 1 - 1
pages/index/index.vue

@@ -166,7 +166,7 @@
 					<span v-else >前方等待{{item.waitNum-1}}位</span>
 				</view>
 				<view class="text-3 oldTextjp2" oldstyle="font-size: 16px;">
-					{{item.deviceName}}/<br />{{item.deviceNo}}
+					{{item.deviceName}}<!-- /<br />{{item.deviceNo}} -->
 				</view>
 			</view>
 			<view class="img-box">

+ 3 - 1
pages/record/details.vue

@@ -19,7 +19,9 @@
 <!-- 				<view class="details-row" v-if="chargeDetail.discountAmount" ><p>服务费</p><span>{{chargeDetail.totalServiceMoney != null ? (chargeDetail.totalServiceMoney*100-chargeDetail.discountAmount*100)/100 : '0.00'}}元({{chargeDetail.totalServiceMoney}}-{{chargeDetail.discountAmount}})</span></view>
  -->				
 				<view class="details-row"><p>优惠券抵扣</p><span style="color:red">{{userCouponObj? userCouponObj.useText : '未使用'}}</span></view>
-				<view class="details-row" v-if="userCouponObj&&chargeDetail.discountAmount" ><p>实际减免</p><span >{{chargeDetail.discountAmount}}元</span></view>
+				<view class="details-row" v-if="chargeDetail.discountAmount" ><p>实际减免</p><span >{{chargeDetail.discountAmount}}元</span></view>
+			
+			<view class="details-row" v-if="chargeDetail.userCardId"><p>会员活动</p><span >充电服务费包月卡</span></view>
 			
 			</view>
 		</view>

+ 8 - 6
pages/searchPile/chargeProcess/charge.vue

@@ -349,13 +349,15 @@
 				})
 			},
 			useCoupon(){
+				 var obj={
+					 	status:0,
+					 	stationId:this.stationId
+					 }
+				if(this.userCardBool) {
+					obj.userCardId=this.userCard.id
+				}
 				 
-				 
-				 
-				userApi.couponList({
-					status:0,
-					stationId:this.stationId
-				}).then((res) => {
+				userApi.couponList(obj).then((res) => {
 					
 					this.listlength= res.data.recordsTotal;
 					 

+ 24 - 2
pages/user/coupon/chooseCoupons.vue

@@ -95,6 +95,7 @@
 				pageIndex: 1,
 				recordsTotal: 0,
 				stationId:"",
+				userCard:null,
 			}
 		},
 		onReachBottom() {
@@ -103,6 +104,10 @@
 			}
 		},
 		onLoad(op) {
+			var plus=this.carhelp.getPersonInfoPlus()
+			if(plus){
+				this.userCard=plus.userCard;
+			}
 			if(op.uuid){
 				this.amount=op.amount
 				this.uuid=op.uuid
@@ -113,6 +118,18 @@
 		onShow() {
 				this.getCouponList();
 		},
+		computed:{
+			userCardBool(){
+				if(this.userCard){
+					var date=new Date().getTime()
+					var date2=new Date(this.userCard.endTime).getTime();
+					if(date<date2){
+						return true;
+					}
+				}
+				return false
+			}
+		},
 		methods:{
 			submitBtn(){
 				if(this.selectObj.id){
@@ -149,10 +166,15 @@
 					this.myCouponList = [];
 					this.pageIndex = 1;
 				}
-				userApi.useCoupon({
+				var obj={
 					amount:this.amount,
 					stationId:this.stationId
-				}).then((res) => {
+				}
+				if(this.userCardBool){
+					obj.userCardId=this.userCard.id
+				}
+	
+				userApi.useCoupon(obj).then((res) => {
 					uni.hideLoading();
 					
 					this.myCouponList =res.data.userCouponList

+ 1 - 1
pages/user/finance/rechargeRes.vue

@@ -1,6 +1,6 @@
 <template>
 	<view>
-		<ujp-navbar :title="title"></ujp-navbar>
+		<ujp-navbar :title="title" :is-back="false" ></ujp-navbar>
 		<view class="paySuccess">
 			<u-icon :name="detail.payStatus==20?'chenggong':'close-circle-fill'" custom-prefix="custom-icon" size="180" :color="detail.payStatus==20?'#00B962':'#ff9800'"></u-icon>
 			<view class="title oldTextjp" oldstyle="font-size: 20px;" v-if="detail.type=='1'">{{detail.payStatusStr}}</view>

+ 8 - 0
pages/user/index.vue

@@ -413,6 +413,14 @@
 					var phone1 = phone.slice(0,3);
 					var phone2 = phone.slice(-4);
 					this.userPhone = phone1 + '****' + phone2;
+					
+					if (res.code == 200&&res.result) {
+						var token = res ? res.data.token : '';					
+						this.carhelp.setPersonInfo(res.data.regUser );
+						this.carhelp.setToken(token);
+						this.carhelp.setPersonInfoPlus(res.data);
+						console.log("setPersonInfoPlus")
+					}
 				}).catch(error => {
 					uni.showToast({
 						title: error,