1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- import * as API from '@/apis/my.js'
- export default {
- data() {
- return {
- isLoading:false,
- clientHeight: 0,
- list: [
- 1, 2, 3, 4, 6, 7
- ],
- recordList: [],
- listForm: {
- totalPage: 1,
- pageIndex: 1,
- pageSize: 5
- }
- }
- },
- methods: {
- gotoUrl(id){
- uni.navigateTo({
- url:"/pages/my/user/bybusDetails?id="+id
- })
- },
- lower() {
- console.log("--------")
- if (this.listForm.pageIndex <= this.listForm.totalPage ) {
- this.passengerRecordList();
- } else {
- return;
- }
- },
- passengerRecordList() {
- this.$refs.common.showLoading();
- this.listForm.openId=this.carhelp.getOpenId()
- API.passengerRecordList(this.listForm).then((res) => {
- this.isLoading=true;
- var response=res.data;
- if (response) {
- if (this.listForm.pageIndex == 1) {
- this.recordList = response.data;
- this.listForm.pageIndex = response.pageNumber;
- this.listForm.totalPage = response.totalPage;
- } else {
- this.recordList = [
- ...this.recordList,
- ...response.data
- ];
- }
- }
- this.listForm.pageIndex++;
- this.$refs.common.showLoading(false);
- }).catch(error => {
- this.$refs.common.showLoading(false,error);
-
- })
- }
- },
- onLoad() {
- this.clientHeight = document.body.clientHeight;
- },
- onReady() {
- this.passengerRecordList();
- },
-
-
- }
|