diff --git a/bundle_b/pages/local_order_search/index.vue b/bundle_b/pages/local_order_search/index.vue index e299d93..4c1e3b7 100644 --- a/bundle_b/pages/local_order_search/index.vue +++ b/bundle_b/pages/local_order_search/index.vue @@ -1,58 +1,64 @@ @@ -83,47 +89,47 @@ }; }, onLoad(options) { - const {lstore_id} = this.$Route.query + const { + lstore_id + } = this.$Route.query if (lstore_id) { this.lstore_id = lstore_id - this.$nextTick(() => { - this.onRefresh() - }) } }, methods: { search(e) { this.keyword = e - this.orderType = '' - this.mescroll.resetUpScroll() - }, - - onRefresh() { this.mescroll.resetUpScroll() }, upCallback(page) { - let pageNum = page.num; // 页码, 默认从1开始 - let pageSize = page.size; // 页长, 默认每页10条 let { keyword, lstore_id - } = this; - localOrderList({ - page_size: pageSize, - page_no: pageNum, - keyword, - lstore_id, - }).then(({ - data - }) => { - let curPageData = data.list; - let curPageLen = curPageData.length; - let hasNext = !!data.more; - if (page.num == 1) this.orderList = []; - this.orderList = this.orderList.concat(curPageData); - this.mescroll.endSuccess(curPageLen, hasNext); - }) + } = this + + if (keyword) { + let pageNum = page.num; // 页码, 默认从1开始 + let pageSize = page.size; // 页长, 默认每页10条 + + localOrderList({ + page_size: pageSize, + page_no: pageNum, + keyword, + lstore_id, + }).then(({ + data + }) => { + let curPageData = data.list; + let curPageLen = curPageData.length; + let hasNext = !!data.more; + if (page.num == 1) this.orderList = []; + this.orderList = this.orderList.concat(curPageData); + this.mescroll.endSuccess(curPageLen, hasNext); + }) + } else { + this.mescroll.endSuccess(0, false); + } } }, computed: {