1111
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
|
|
||||||
|
<!-- 有列表的时候用 :auto='false' 需要你在onload等调用reload方法 -->
|
||||||
<z-paging ref="paging" v-model="data" @query="queryList" :auto='true'>
|
<z-paging ref="paging" v-model="data" @query="queryList" :auto='true'>
|
||||||
|
|
||||||
<view @click="bind"
|
<view @click="bind"
|
||||||
@@ -60,6 +61,7 @@
|
|||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
uni.$on("order", (e) => {
|
uni.$on("order", (e) => {
|
||||||
|
// 相当与下拉刷新
|
||||||
this.$refs.paging.reload(true);
|
this.$refs.paging.reload(true);
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -67,6 +69,7 @@
|
|||||||
uni.$off('order');
|
uni.$off('order');
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// 分页的请求
|
||||||
queryList(pageNo, pageSize) {
|
queryList(pageNo, pageSize) {
|
||||||
let _this = this
|
let _this = this
|
||||||
_this.$api.cardList({
|
_this.$api.cardList({
|
||||||
@@ -76,8 +79,10 @@
|
|||||||
"customerSid": getApp().globalData.sid
|
"customerSid": getApp().globalData.sid
|
||||||
}
|
}
|
||||||
}).then((resp) => {
|
}).then((resp) => {
|
||||||
|
// 添加数据源
|
||||||
this.$refs.paging.complete(resp.records)
|
this.$refs.paging.complete(resp.records)
|
||||||
}).catch(e => {
|
}).catch(e => {
|
||||||
|
// 出错了,点击重试
|
||||||
_this.$refs.paging.complete(false);
|
_this.$refs.paging.complete(false);
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user