Ver Fonte

优化1

tianhui há 3 anos atrás
pai
commit
c364e05623
3 ficheiros alterados com 29 adições e 8 exclusões
  1. 9 8
      pages/getin/getin.vue
  2. 19 0
      pages/parking/parking.scss
  3. 1 0
      pages/parking/parking.vue

+ 9 - 8
pages/getin/getin.vue

@@ -81,9 +81,10 @@
 						<view class="popup-intime">
 						<view class="popup-intime-top" > {{item.name}}</view>
 						<!-- <view class="popup-intime-bottom" v-if="item.time !=0">{{item.time}}</view> -->
-						<picker class="openTime" mode="time"  :value="time" start="09:01" end="21:01" @change="bindTimeChange">
-							<view class="popup-intime-bottom" v-if="index==1">{{item.time}}</view>
+						<picker v-if="index === 1" class="openTime" mode="time"  :value="time" start="09:01" end="21:01" @change="bindTimeChange">
+							<view class="popup-intime-bottom" >{{item.time}}</view>
 						</picker>
+						<view v-else class="popup-intime-bottom" >{{item.time}}</view>
 						</view>
 						<!-- <view class="pop-right"><u-button class="upset" size="mini" @click="upset()" v-if="index==0">修正</u-button></view> -->
 						</u-radio>
@@ -177,15 +178,14 @@
 		onShow() {
 			this.timeList[1].time = this.getTimer();
 			// this.timeList[1].time=this.currentTime.getFullYear()+ '-' +(this.currentTime.getMonth()+1)+ '-' +this.currentTime.getDate()+ ' ' +this.finialtime+ ':'+"00";
-			setInterval( () => {
+			setTimeout( () => {
 				this.timeList[0].time = this.inTime;
-				
 			}, 1000);
 		},
 		methods:{
-			upset(){
-				this.visible=true;
-			},
+			// upset(){
+			// 	this.visible=true;
+			// },
 			bindTimeChange(e) {
 				this.finialtime = e.target.value;
 				console.log(this.finialtime)
@@ -198,8 +198,9 @@
 			},
 			submit(){
 				this.time = this.confirmTime;
-				console.log(this.time)
+				console.log(this.timeList[1].time)
 				this.timeshow=true;
+				// this.timeList[0].time = this.inTime;
 			},
 			radioGroupChange(){
 				

+ 19 - 0
pages/parking/parking.scss

@@ -13,6 +13,25 @@
 			height: 129rpx;
 			background: #61B4FF;
 			border-radius: 11rpx;
+			.block-top{
+						height: 75rpx;
+						background-color: #3397FA;
+						display: flex;
+						align-items: flex-start;
+						padding-left: 40rpx;
+						color: #fff;
+						}
+			.block-bottom{
+				height:calc( 100% - 76rpx );
+				background-color: #fff;
+				display: flex;
+				align-items: flex-end;
+				padding-left: 40rpx;
+				color: #BEBEBE;
+				.time{
+					text-align: center;
+				}
+			}
 		}
 		.flashing{
 				overflow: hidden;

+ 1 - 0
pages/parking/parking.vue

@@ -12,6 +12,7 @@
 		<view class="roadspace-list wrap">
 			<view class="roadspace-list-item" @click="roadspaceClick(item)" v-for="(item,index) in roadspaceList" :key="index + item.id">
 				<view class="block" :class="{flashing: (item.deviceStatus ==1||item.deviceStatus ==5)||(item.placeStatus==1&&(item.vehicleNo==''))}">
+					<view class="block-top" v-if="item.placeStatus==1&&(item.vehicleNo=='')"></view>
 					<view class="block-bottom" v-if="item.placeStatus==1&&(item.vehicleNo=='')">
 						<u-icon name="clock-fill" size="40" color="#3397FA"></u-icon>
 						<view class="time">{{ item.inTime | timeago(currentTime)}}</view>