This commit is contained in:
wangjiahai
2023-11-24 16:23:44 +08:00
parent 548dae5869
commit 621e71541a

View File

@@ -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)
}) })