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

Loading…
Cancel
Save