diff --git a/api/MyBenefits/MyBenefits.js b/api/MyBenefits/MyBenefits.js
index 0f93f96..257131f 100644
--- a/api/MyBenefits/MyBenefits.js
+++ b/api/MyBenefits/MyBenefits.js
@@ -1,7 +1,7 @@
import request from "../request.js"
//个人中心 我的收益 金额
-export function personRevenue(nurseStationPersonId, monthTime,monthStartTime, monthEndTime) {
+export function personRevenue(nurseStationPersonId, monthTime, monthStartTime, monthEndTime) {
return request({
url: `/nurseApplet/personCenter/personRevenue?nurseStationPersonId=${nurseStationPersonId}&&monthTime=${monthTime}&&monthStartTime=${monthStartTime}&&monthEndTime=${monthEndTime}`,
method: 'GET'
@@ -9,9 +9,9 @@ export function personRevenue(nurseStationPersonId, monthTime,monthStartTime, mo
}
// 个人中心 我的收益 订单列表分页
-export function personRevenueDetails(nurseStationPersonId, monthTime, monthStartTime, monthEndTime) {
+export function personRevenueDetails(pageNum, pageSize, nurseStationPersonId, monthTime, monthStartTime, monthEndTime) {
return request({
- url: `/nurseApplet/personCenter/personRevenueDetails?nurseStationPersonId=${nurseStationPersonId}&&monthTime=${monthTime}&&monthStartTime=${monthStartTime}&&monthEndTime=${monthEndTime}`,
+ url: `/nurseApplet/personCenter/personRevenueDetails?pageNum=${pageNum}&&pageSize=${pageSize}&&nurseStationPersonId=${nurseStationPersonId}&&monthTime=${monthTime}&&monthStartTime=${monthStartTime}&&monthEndTime=${monthEndTime}`,
method: 'GET',
})
}
diff --git a/pages.json b/pages.json
index bc93cfe..e298cb4 100644
--- a/pages.json
+++ b/pages.json
@@ -13,7 +13,8 @@
"path": "pages/MyBenefits/MyBenefits",
"style": {
"navigationBarTitleText": "我的收益",
- "enablePullDownRefresh": false
+ "onReachBottomDistance": 50, //距离底部多远时触发 单位为px
+ "enablePullDownRefresh": true //设置参数为true
}
}, {
"path": "pages/Modifyinformation/Modifyinformation",
diff --git a/pages/MyBenefits/MyBenefits.vue b/pages/MyBenefits/MyBenefits.vue
index d486247..41d4e04 100644
--- a/pages/MyBenefits/MyBenefits.vue
+++ b/pages/MyBenefits/MyBenefits.vue
@@ -50,9 +50,12 @@
{{item.nurseItemName}}
-
+
+ {{item.revenueAmount}}
+
+ + 0
+
@@ -119,10 +122,14 @@
monthEndTime: '', //结束时间
toppricerlist: {}, //toplist
Detailslist: [], //详细
+ Detailstotal: 0,
+ pageNum: 1,
+ pageSize: 5,
};
},
onShow() {
var that = this
+ this.Detailslist = []
that.nowtime();
const value = uni.getStorageSync('nursePersonId');
if (value) {
@@ -134,9 +141,13 @@
methods: {
//收益详细
personRevenueDetailsinfo() {
- personRevenueDetails(this.nursePersonId, this.monthTime, this.monthStartTime, this.monthEndTime).then(
+ personRevenueDetails(this.pageNum, this.pageSize, this.nursePersonId, this.monthTime, this.monthStartTime,
+ this.monthEndTime).then(
res => {
- this.Detailslist = res.data
+ res.rows.forEach(e => {
+ this.Detailslist.push(e)
+ })
+ this.Detailstotal = res.total
})
},
//我的收益
@@ -202,13 +213,27 @@
url: `/pages/RevenueDetails/RevenueDetails?orderDetailsId=${item.nurserStationPersonRevenueId}`
})
},
- }
+ },
+ onReachBottom() { //下滑加载
+ if (this.Detailslist.length >= this.Detailstotal) {} else {
+ this.pageNum++
+ this.personRevenueDetailsinfo();
+ }
+ },
+ onPullDownRefresh() { //下拉刷新
+ this.pageNum = 1;
+ this.personRevenueDetailsinfo();
+ this.personRevenueinfo();
+ setTimeout(function() {
+ uni.stopPullDownRefresh();
+ }, 1000);
+ },
}