diff --git a/pages/index.vue b/pages/index.vue index 05e6780..911ddcf 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -25,6 +25,10 @@ :scroll-y="true" :style="{ maxHeight: `${viewHeigth}px` }" class="view" + :refresher-enabled="true" + @refresherrefresh="refresherrefresh" + :refresher-triggered="refresherTriggered" + @refresherpulling="refresherpulling" > @@ -205,6 +209,7 @@ export default { type: 2 } ], + refresherTriggered: false, list: [], color: ['#1B84FF', '#7239EA', '#F6B100', '#F8285A', '#17C653'] } @@ -222,6 +227,9 @@ export default { this.getPageHeight() }) }, + onShow() { + this.init() + }, methods: { getPageHeight() { const query = uni.createSelectorQuery().in(this) @@ -362,6 +370,18 @@ export default { changeTab(type) { this.queryParams.type = type this.getList() + }, + refresherpulling() { + const that = this + if (!this.refresherTriggered) { + this.refresherTriggered = true + setTimeout(() => { + that.refresherTriggered = false + }, 1000) + } + }, + refresherrefresh() { + this.init() } } } diff --git a/sub/enterprise/edit.vue b/sub/enterprise/edit.vue index fec2917..43e6b3a 100644 --- a/sub/enterprise/edit.vue +++ b/sub/enterprise/edit.vue @@ -1,5 +1,5 @@