zhengkaixin 3 éve
szülő
commit
c9674f2ab2
2 módosított fájl, 25 hozzáadás és 20 törlés
  1. 15 10
      pages/parking/outPayment.vue
  2. 10 10
      pages/parking/registration.vue

+ 15 - 10
pages/parking/outPayment.vue

@@ -2,12 +2,12 @@
 	<view>
 		<u-navbar title="无车辆扫码停车" :is-back="false"></u-navbar>
 		<view class="main">
-			<view class="park-name">
+			<view class="park-name" v-if="detail.parkName">
 				<img src="../../static/img/if-location-pin@2x.png" alt="">
 				<text>{{detail.parkName}}</text>
 			</view>
 			<view class="infos"  v-if="!detail.id">
-				已抬杆,欢迎下次光临
+				{{message}}
 			</view>	
 			<view class="infos" v-if="detail.id">
 				<view class="item">
@@ -89,10 +89,10 @@
 		<view class="box">
 			
 		</view>
-		<!-- // @confirm="confirm" -->
+		<!-- //  -->
 		<u-modal v-model="showModel"
 				:show-cancel-button="false"
-				
+				@confirm="confirm"
 				confirm-text="确定"
 				title="扫码支付" >
 					<view    style="
@@ -155,7 +155,8 @@
 				],
 				value:0,
 				channelId:'',
-				detail:{}
+				detail:{},
+				message:"已抬杆,欢迎下次光临"
 			}
 		},onLoad(op) {
 			 this.getPhone()
@@ -170,6 +171,9 @@
 			
 			
 		},	methods: {
+			confirm(){
+				this.getInfo();
+			},
 			getPhone(){
 				newsApi.findConfigureByKey({
 					key:'consumerPhone'
@@ -283,11 +287,12 @@
 					// 	title: error,
 					// 	icon: "none"
 					// })
-					uni.showModal({
-						title:"提示",
-						content:error,
-						showCancel:false,
-					})
+					this.message=error
+					// uni.showModal({
+					// 	title:"提示",
+					// 	content:error,
+					// 	showCancel:false,
+					// })
 				})
 			}
 		}

+ 10 - 10
pages/parking/registration.vue

@@ -2,18 +2,21 @@
 	<view >
 		<u-navbar title="无牌车辆扫码停车" :is-back="false" ></u-navbar>
 		<view class="main">
-			<view class="park-name">
+			<view class="park-name" v-if="detail.parkName">
 				<img src="../../static/img/if-location-pin@2x.png" alt="">
 				<text>{{detail.parkName}}</text>
 			</view>
-			<view class="unlabeled">
+			<view class="unlabeled"  >
 				无牌车
 			</view>
-			<view class="bus-number">
+			<view class="bus-number" v-if="detail.id">
 				{{detail.carNum}}
 			</view>
-			
+			<view class="bus-number"  v-if="!detail.id">
+				{{message}}
+			</view>	
 		</view>
+		
 		<view v-if="detail.inParkingStatus==1" style="
 				text-align: center;
 				font-size: 30px;
@@ -22,7 +25,7 @@
 			车辆已进场
 		</view>
 		<u-button v-if="detail.inParkingStatus==0" @click="submit" >请求进场</u-button>
-		<view class="notice">
+		<view class="notice" v-if="txt">
 			<view class="title">
 				停车场须知
 			</view>
@@ -42,7 +45,7 @@
 			return {
 				channelId:'',
 				detail:{},
-			 
+			 message:"",
 				txt:''
 			}
 		},onLoad(op) {
@@ -120,10 +123,7 @@
 					}
 				}).catch(error => {
 						uni.hideLoading()
-					uni.showToast({
-						title: error,
-						icon: "none"
-					})
+						this.message=error
 				})
 			}
 		}