|
@@ -15,12 +15,13 @@
|
|
|
</view>
|
|
|
<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> -->
|
|
|
- </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> -->
|
|
|
</view>
|
|
|
<!-- <u-action-sheet :list="actionList" @click="actionClick" v-model="actionShow"></u-action-sheet> -->
|
|
|
<u-toast ref="uToast" />
|
|
@@ -51,6 +52,7 @@
|
|
|
},
|
|
|
vehicleNo:'',
|
|
|
carImg:'',
|
|
|
+ pages:''
|
|
|
}
|
|
|
},
|
|
|
onLoad() {
|
|
@@ -67,10 +69,23 @@
|
|
|
// // {type: "next", current: 2}
|
|
|
// },
|
|
|
last(i){
|
|
|
- this.handleGetRoadspace(this.roadNo,i-1)
|
|
|
+ if(i>1){
|
|
|
+ setTimeout( this.handleGetRoadspace(this.roadNo,i-1),500)
|
|
|
+ // this.handleGetRoadspace(this.roadNo,i-1)
|
|
|
+ }else{
|
|
|
+ return
|
|
|
+ }
|
|
|
},
|
|
|
next(n){
|
|
|
- this.handleGetRoadspace(this.roadNo,n+1)
|
|
|
+ if(n < this.pages){
|
|
|
+ setTimeout(this.handleGetRoadspace(this.roadNo,n+1),500)
|
|
|
+ // this.handleGetRoadspace(this.roadNo,n+1)
|
|
|
+ }else{
|
|
|
+ this.$refs.uToast.show({
|
|
|
+ title: '已经是最后一页',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ }
|
|
|
},
|
|
|
customBack(){
|
|
|
this.$u.route({
|
|
@@ -91,6 +106,7 @@
|
|
|
// title: res.msg,
|
|
|
// type: 'success',
|
|
|
// });
|
|
|
+ this.pages=res.data.pages;
|
|
|
this.list.pageNum=res.data.page;
|
|
|
this.total=res.data.total;
|
|
|
this.roadspaceList = res.data.rows;
|