wangjiahai 2 years ago
parent
commit
621e71541a
  1. 5
      pages/card/card_booking.vue

5
pages/card/card_booking.vue

@ -1,5 +1,7 @@
<template> <template>
<!-- 不分页的时候用没有封装 auto 首次使用需要自己在onload里调用 -->
<!-- 页面的几种状态 0 loading 1 错误 2正常 -->
<loading-state ref="pageView" @request="request"> <loading-state ref="pageView" @request="request">
<view> <view>
@ -104,12 +106,13 @@
request() { request() {
let _this = this let _this = this
_this.$api.cardBooking(this.page.sid).then((resp) => { _this.$api.cardBooking(this.page.sid).then((resp) => {
console.log(resp);
_this.data = resp _this.data = resp
// 2
_this.$nextTick(() => { _this.$nextTick(() => {
_this.$refs.pageView.setLoadState(2) _this.$refs.pageView.setLoadState(2)
}) })
}).catch(e => { }).catch(e => {
// 1
_this.$nextTick(() => { _this.$nextTick(() => {
_this.$refs.pageView.setLoadState(1) _this.$refs.pageView.setLoadState(1)
}) })

Loading…
Cancel
Save