111
This commit is contained in:
@@ -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)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user