This commit is contained in:
曹辉 2023-04-12 11:14:16 +08:00
parent f7a022c3e8
commit ea2a35515a
3 changed files with 35 additions and 9 deletions

View File

@ -1,7 +1,7 @@
import request from "../request.js" import request from "../request.js"
//个人中心 我的收益 金额 //个人中心 我的收益 金额
export function personRevenue(nurseStationPersonId, monthTime,monthStartTime, monthEndTime) { export function personRevenue(nurseStationPersonId, monthTime, monthStartTime, monthEndTime) {
return request({ return request({
url: `/nurseApplet/personCenter/personRevenue?nurseStationPersonId=${nurseStationPersonId}&&monthTime=${monthTime}&&monthStartTime=${monthStartTime}&&monthEndTime=${monthEndTime}`, url: `/nurseApplet/personCenter/personRevenue?nurseStationPersonId=${nurseStationPersonId}&&monthTime=${monthTime}&&monthStartTime=${monthStartTime}&&monthEndTime=${monthEndTime}`,
method: 'GET' 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({ 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', method: 'GET',
}) })
} }

View File

@ -13,7 +13,8 @@
"path": "pages/MyBenefits/MyBenefits", "path": "pages/MyBenefits/MyBenefits",
"style": { "style": {
"navigationBarTitleText": "我的收益", "navigationBarTitleText": "我的收益",
"enablePullDownRefresh": false "onReachBottomDistance": 50, // px
"enablePullDownRefresh": true //true
} }
}, { }, {
"path": "pages/Modifyinformation/Modifyinformation", "path": "pages/Modifyinformation/Modifyinformation",

View File

@ -50,9 +50,12 @@
<view class="title"> <view class="title">
{{item.nurseItemName}} {{item.nurseItemName}}
</view> </view>
<view class="price"> <view class="price" v-if="item.revenueAmount">
+ {{item.revenueAmount}} + {{item.revenueAmount}}
</view> </view>
<view class="price" v-else>
+ 0
</view>
</view> </view>
</view> </view>
<view v-else class="" style="margin-top: 100rpx;"> <view v-else class="" style="margin-top: 100rpx;">
@ -119,10 +122,14 @@
monthEndTime: '', // monthEndTime: '', //
toppricerlist: {}, //toplist toppricerlist: {}, //toplist
Detailslist: [], // Detailslist: [], //
Detailstotal: 0,
pageNum: 1,
pageSize: 5,
}; };
}, },
onShow() { onShow() {
var that = this var that = this
this.Detailslist = []
that.nowtime(); that.nowtime();
const value = uni.getStorageSync('nursePersonId'); const value = uni.getStorageSync('nursePersonId');
if (value) { if (value) {
@ -134,9 +141,13 @@
methods: { methods: {
// //
personRevenueDetailsinfo() { 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 => { 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}` 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);
},
} }
</script> </script>
<style lang="scss"> <style lang="scss">
.app { .app {
padding: 0; padding: 0 0 60rpx 0;
.timemask { .timemask {
height: 1100rpx; height: 1100rpx;