فهرست منبع

去除分页组件

tianhui 3 سال پیش
والد
کامیت
1abe43d2f9
3فایلهای تغییر یافته به همراه30 افزوده شده و 9 حذف شده
  1. 0 1
      pages/getin/getin.vue
  2. 11 0
      pages/parking/parking.scss
  3. 19 8
      pages/parking/parking.vue

+ 0 - 1
pages/getin/getin.vue

@@ -39,7 +39,6 @@
 		
 		<view class="other-info">
 			<view class="other-info-item u-flex">
-				{{vehicleNo}}
 				<u-input v-model="vehicleNo" height="80" type="text" @focus="messageInputClick" placeholder="输入车牌号" />
 				<u-button type="primary" @click="handleParkInInfo">确认</u-button>
 			</view>

+ 11 - 0
pages/parking/parking.scss

@@ -87,4 +87,15 @@
 	font-weight: 500;
 	color: #FFF;
 	letter-spacing: 1px
+}
+.bt1{
+	float: left;
+	width: 80rpx;
+	margin-top: 40rpx;
+	margin-left: 20rpx;
+}
+.bt2{
+	float: right;
+	width: 80rpx;
+	margin-top: 40rpx;
 }

+ 19 - 8
pages/parking/parking.vue

@@ -16,8 +16,10 @@
 				<view class="text">{{item.spaceName}}</view>
 			</view>			
 			<view class="bottom-btn-wrap">
+				<u-button class="bt1" @click="last(list.pageNum)"><</u-button>
+				<u-button class="bt2" @click="next(list.pageNum)">></u-button>
 				<!-- <view class="bottom-btn" @click="openPage('pages/index/index')">返回主页</view> -->
-				<uni-pagination class="page" v-if="roadspaceList" title="标题文字" :total='total'  @change='uni_pagination_change'></uni-pagination>
+				<!-- <uni-pagination class="page" v-if="roadspaceList" title="标题文字" :total='total'  @change='uni_pagination_change'></uni-pagination> -->
 			</view>
 		</view>
 		<!-- <u-action-sheet :list="actionList" @click="actionClick" v-model="actionShow"></u-action-sheet> -->
@@ -44,9 +46,11 @@
 				spaceId:null,
 				spaceName:'',
 				total:'',
-				list:[],
+				list:{
+					pageNum:''
+				},
 				vehicleNo:'',
-				carImg:''
+				carImg:'',
 			}
 		},
 		onLoad() {
@@ -55,12 +59,18 @@
 			
 		},
 		methods:{
-			uni_pagination_change(e){
+			// uni_pagination_change(e){
 			
-				//this.getList(e.current)
-				this.handleGetRoadspace(this.roadNo, e.current)
-				console.log(e)
-				// {type: "next", current: 2}
+			// 	//this.getList(e.current)
+			// 	this.handleGetRoadspace(this.roadNo, e.current)
+			// 	console.log(e)
+			// 	// {type: "next", current: 2}
+			// },
+			last(i){
+				this.handleGetRoadspace(this.roadNo,i-1)
+			},
+			next(n){
+				this.handleGetRoadspace(this.roadNo,n+1)
 			},
 			customBack(){
 				this.$u.route({
@@ -81,6 +91,7 @@
 					// 	title: res.msg,
 					// 	type: 'success',
 					// });
+					this.list.pageNum=res.data.page;
 					this.total=res.data.total;
 					this.roadspaceList = res.data.rows;
 					console.log('handleGetRoadspace',res)