diff --git a/pages.json b/pages.json index f1d8f18..004f860 100644 --- a/pages.json +++ b/pages.json @@ -34,16 +34,13 @@ "navigationBarTitleText": "管理家庭成员", "enablePullDownRefresh": false } - } ,{ - "path" : "coupon/coupon", - "style" : - { - "navigationBarTitleText": "优惠券", - "enablePullDownRefresh": false - } - - } - ] + }, { + "path": "coupon/coupon", + "style": { + "navigationBarTitleText": "优惠券", + "enablePullDownRefresh": false + } + }] }], "globalStyle": { "navigationBarTextStyle": "white", diff --git a/pages/myinformation/myinformation.vue b/pages/myinformation/myinformation.vue index c0c3fca..1e38b1c 100644 --- a/pages/myinformation/myinformation.vue +++ b/pages/myinformation/myinformation.vue @@ -40,7 +40,7 @@ 健康豆 - + 0 @@ -158,7 +158,12 @@ uni.navigateTo({ url: '/pagesB/managefamily/managefamily' }) - } + }, + gocoupon() { + uni.navigateTo({ + url: '/pagesB/coupon/coupon' + }) + }, } } diff --git a/pagesB/coupon/coupon.vue b/pagesB/coupon/coupon.vue index 8c3b35f..d3020c0 100644 --- a/pagesB/coupon/coupon.vue +++ b/pagesB/coupon/coupon.vue @@ -1,19 +1,105 @@ - + @import './coupon.scss' + \ No newline at end of file diff --git a/pagesB/managefamily/managefamily.vue b/pagesB/managefamily/managefamily.vue index e653aec..1e2f632 100644 --- a/pagesB/managefamily/managefamily.vue +++ b/pagesB/managefamily/managefamily.vue @@ -36,7 +36,24 @@ return { }; - } + }, + onReachBottom() { //下滑加载 + if (this.couponlist.length >= this.total) {} else { + this.pageNum++; + selectCoupon(this.pageNum, this.pageSize, this.patientId, this.couponstatus).then(res => { + res.rows.forEach(e => { + this.couponlist.push(e) + }) + }) + } + }, + onPullDownRefresh() { //下拉刷新 + this.pageNum = 1; + this.getlist(); + setTimeout(function() { + uni.stopPullDownRefresh(); + }, 1000); + }, }