| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654 | <template>	<view class="content">		<view class="headerSection">			<view class="sectionA">				<view class="left">					<view class="name">今日可提现</view>					<view class="value" :style="`color: ${color2};`">¥{{headerInfo.canCashOut || 0.00}}</view>					<!-- <num-run :value="700"></num-run> -->				</view>				<view class="right">					<view class="txRecord" :style="`color: ${color2};`" @click="txRecordList">提现记录></view>					<view class="txRequest" :style="`background-color: ${color1};`" @click="requestWithDrawal">提现申请</view>				</view>			</view>			<view class="sectionB">				<view class="item1" v-for="(item, idx) in shouyiList" :key="idx">					<view class="name">{{item.title}}</view>					<view class="value">¥{{item.value}}</view>					<view class="des" v-if="idx == 1">						(服续费¥{{item.subValue}})					</view>					<view class="rightLine" v-if="idx < 2"></view>				</view>			</view>		</view>		<view class="screenSection">			<view class="sectionA">				<view class="title">我的收益明细</view>				<view class="dataScreen">					<block v-if="listParmas.startDate">						<text @click="dataScreenAction">{{listParmas.startDate + '-' + listParmas.endDate}}</text>						<text @click="clearDate" :style="`margin-left: 10px; color: ${color2};`">清空</text>					</block>					<block v-else>						<text @click="dataScreenAction">时间选择</text>						<image src="../../static/icons/icon_dropDown@2x.png" mode="aspectFit"></image>					</block>				</view>			</view>			<view class="sectionB">				<view class="item" v-for="(item, idx) in tabList" :key="idx" :style="`background-color: ${item.isSelect ? color1: '#fff'}; color: ${item.isSelect ? '#fff': '#B1B1B1'};`"				 @click="selectTab(item)">					{{item.typeName}}				</view>			</view>		</view>				<view class="listSection">			<view class="top-Section">				<view class="point"></view>				<view class="name">任务详情</view>				<view class="totalPrice" :style="`color: ${color2};`">总收益:{{totalIncome}}元</view>			</view>						<view class="item" v-for="(item, idx) in dataList" :key="idx">				<view class="sectionA">					<view class="point" :style="`background-color: ${color1};`"></view>					<view class="name" :style="`color: ${color1};`">{{item.name}}</view>				</view>				<view class="sectionB">					<image class="icon" src="https://dm.static.elab-plus.com/yezhu/h5/icon_dingwei.png" mode="aspectFit" style="color: #0066CC;"></image>					<view class="date">{{item.happenTime || '-'}}</view>				</view>				<view class="sectionC">					<view class="point"></view>					<view class="name">收益明细</view>				</view>				<view class="sectionD">					<view class="name">{{item.incomeType || '-'}}</view>					<view class="value" :style="`color: ${color2};`">+{{item.income}}元</view>				</view>				<view class="bottomLine" v-if="idx < dataList.length - 1"></view>			</view>						<view class="com_noMore_text" v-if="noMore && dataList.length > 0">没有更多了</view>						<view class="empty" v-if="dataList.length == 0">				<image class="emptyImg" src="https://dm.static.elab-plus.com/yezhu/h5/icon_empty.png" mode=""></image>				<view class="text">暂无数据</view>			</view>					</view>				<view class="homeBtn" 		:style="`position: fixed; z-index: 1000; right: 0; bottom: 15%; width: 96rpx; height: 110rpx; display: flex; flex-direction: column; align-items: center;border-radius: 20rpx 0rpx 0px 20rpx;box-shadow: 0rpx 10rpx 20rpx 0px rgba(119,55,12,0.20); background-color: ${color2};`"		@click="backAction">			<image class="icon" style="margin-top: 8rpx;width: 30rpx; height: 28rpx;" src="https://dm.static.elab-plus.com/yezhu/h5/icon_homeBtn.png" mode="aspectFit"></image>			<view class="text" style="margin-top: 6rpx;font-size: 12rpx;font-family: PingFang SC, PingFang SC-Semibold;font-weight: 400;text-align: center;color: #ffffff;">返回</view>			<view class="text" style="margin-top: -2rpx;;font-size: 12rpx;font-family: PingFang SC, PingFang SC-Semibold;font-weight: 400;text-align: center;color: #ffffff;">任务大厅</view>		</view>				<dm-calendar-picker-view ref='calendarPickerView' @confirmSelDate='confirmSelDate'></dm-calendar-picker-view>	    <dmWithDrawalRecord ref='withDrawalRecord'></dmWithDrawalRecord>		<dmWithDrawal ref='withDrawal' :canCashOut='headerInfo.canCashOut'></dmWithDrawal>	</view></template><script>	import numRun from '../../components/numRun/numRun.vue'	import dmCalendarPickerView from '../../components/subComponents/dmCalendarPickerView.vue'	import moment from '../../static/moment.min.js'	import dmWithDrawalRecord from '../../components/subComponents/dmWithDrawalRecord.vue' 	import dmWithDrawal from '../../components/subComponents/dmWithDrawal.vue'	let app = getApp();	export default {		data() {			return {				headerInfo: {					alreadyCashOut: 0.00,					canCashOut: 0.00,					serviceFee: 0.00,					todayIncome: 0.00,					totalIncome: 0.00				},				shouyiList: [{						title: '今日收益',						value: 0,						des: ''					},					{						title: '总收益',						value: 0,						subValue: 20,						des: ''					},					{						title: '累计已提现',						value: 0,						des: ''					}				],				color1: '',				color2: '',				tabList: [],				listParmas: {					endDate: "",					pageNo: 1,					pageSize: 20,					startDate: "",					type: 0				},				dataList: [],				noMore: true,				totalIncome: 0.00			}		},		mounted() {			this.color1 = app.globalData.color1;			this.color2 = app.globalData.color2;			this.getReportHeader()			this.getReportMenu()		},		methods: {			// 表头数据			async getReportHeader() {				const res = await this.$myRequest({					url: '/report/header',					method: 'GET'				});				if (res && res.data.success) {					console.log('表头res:', res)					this.headerInfo = res.data.single || {						alreadyCashOut: 0.00,						canCashOut: 0.00,						serviceFee: 0.00,						todayIncome: 0.00,						totalIncome: 0.00					}					this.shouyiList[0].value = this.headerInfo.todayIncome || 0.00					this.shouyiList[1].value = this.headerInfo.totalIncome || 0.00					this.shouyiList[2].value = this.headerInfo.alreadyCashOut || 0.00					this.shouyiList[1].subValue = this.headerInfo.serviceFee || 0.00				}			},			async getReportMenu() {				const res = await this.$myRequest({					url: '/report/nav',					method: 'GET'				});				if (res && res.data.success) {					console.log('菜单res:', res)					var tempList = res.data.list || []					tempList.forEach((item, idx) => {						item['isSelect'] = idx == 0 ? true : false					})					this.tabList = tempList					if (this.tabList.length > 0) {						this.selectTab(this.tabList[0])					}				}			},						selectTab(e) {				this.tabList.forEach((item, idx) => {					item.isSelect = false					if (e.type == item.type) {						item.isSelect = true					}				})				this.listParmas.type = e.type				this.pullDownRefresh(true)			},						async getReportList() {				var self = this				const res = await this.$myRequest({					url: '/report/list',					data: self.listParmas				});				if (res && res.data.success) {					if (this.listParmas.pageNo == 1) {						this.dataList = res.data.single.pageInfoModel.resultSet || []					} else {						this.dataList = this.dataList.concat(res.data.single.pageInfoModel.resultSet || []);					}					this.totalIncome = res.data.single.totalIncome || '0.00'					this.noMore = res.data.single.pageInfoModel.resultSet.length < this.listParmas.pageSize					uni.stopPullDownRefresh();				}				else {					this.noMore = true					this.totalIncome = '0.00'					uni.stopPullDownRefresh();				}			},						dataScreenAction() {				this.$refs.calendarPickerView.show()			},						confirmSelDate(e) {							const startDate = e.startDate;				const endDate = e.endDate;				if (moment(startDate).isBefore(endDate)) {					this.listParmas.startDate = startDate;					this.listParmas.endDate = endDate;				} else {					this.listParmas.startDate = endDate;					this.listParmas.endDate = startDate;				}				this.pullDownRefresh()						},						clearDate() {				this.listParmas.startDate = '';				this.listParmas.endDate = '';				this.pullDownRefresh()			},						pullDownRefresh(isPullDown = true) {				if (isPullDown) {					this.listParmas.pageNo = 1;					this.getReportList()				} else {					if (this.noMore) {						return;					}					this.listParmas.pageNo++;					this.getReportList()				}			},						backAction() {				uni.navigateBack({					delta: 1				})			},			txRecordList(){				this.$refs.withDrawalRecord.show();			},			requestWithDrawal(){				this.$refs.withDrawal.show()			}		},						onPullDownRefresh() {			this.pullDownRefresh(true)			setTimeout(function() {				uni.stopPullDownRefresh();			}, 1000);		},				onReachBottom() {			this.pullDownRefresh(false)		},				watch: {					},		components: {			numRun,			dmCalendarPickerView,			dmWithDrawalRecord,			dmWithDrawal		}	}</script><style lang="scss" scoped>	page {		width: 100vw;		// height: 100vh;	}	.content {		width: 100%;		// height: 100%;		// max-height: 100%;		// overflow-y: scroll;		background-color: #F5F5F7;		padding: 20rpx 20rpx 100rpx 20rpx;		box-sizing: border-box;		.headerSection {			width: 100%;			height: 352rpx;			background-color: #fff;			border-radius: 16rpx;			padding: 32rpx 30rpx 16rpx 48rpx;			box-sizing: border-box;			.sectionA {				display: flex;				align-items: center;				justify-content: space-between;				.left {					.name {						font-size: 32rpx;						font-family: Verdana, Verdana-Regular;						font-weight: 400;						text-align: left;						color: #2c2c2c;						line-height: 40px;					}					.value {						margin-left: -12rpx;						font-size: 64rpx;						font-family: DIN Alternate, DIN Alternate-Bold;						font-weight: 700;						text-align: left;					}				}				.right {					.txRecord {						font-size: 24rpx;						font-family: Verdana, Verdana-Regular;						font-weight: 400;						text-align: right;					}					.txRequest {						margin-top: 32rpx;						width: 178rpx;						height: 60rpx;						border-radius: 12rpx;						font-size: 28rpx;						font-family: Verdana, Verdana-Bold;						font-weight: 700;						text-align: center;						color: #ffffff;						line-height: 60rpx;					}				}			}			.sectionB {				margin-top: 40rpx;				display: flex;				justify-content: space-between;				align-items: flex-start;				.item1 {					width: calc((100% - 90rpx) / 3);					position: relative;					height: 110rpx;					.name {						font-size: 24rpx;						font-family: Verdana, Verdana-Regular;						font-weight: 400;						text-align: left;						color: #999999;					}					.value {						font-size: 32rpx;						font-family: DIN Alternate, DIN Alternate-Bold;						font-weight: 700;						text-align: left;						color: #262626;					}					.des {						font-size: 20rpx;						font-family: Verdana, Verdana-Regular;						font-weight: 400;						text-align: left;						color: #cecece;						white-space: nowrap;						margin-left: -15rpx;					}					.rightLine {						position: absolute;						right: 0;						width: 2rpx;						height: 60rpx;						border-right: 2rpx dashed #7f7f7f;						top: calc((100% - 60rpx) / 2);						opacity: 0.2;					}				}			}		}		.screenSection {			margin-top: 60rpx;			width: 100%;			padding: 20rpx;			box-sizing: border-box;			.sectionA {				display: flex;				justify-content: space-between;				align-items: center;				.title {					font-size: 28rpx;					font-family: Verdana, Verdana-Bold;					font-weight: 700;					text-align: left;					color: #262626;				}				.dataScreen {					display: flex;					align-items: center;					font-size: 24rpx;					font-family: Verdana, Verdana-Regular;					font-weight: 400;					text-align: right;					color: #262626;					image {						margin-left: 10rpx;						width: 30rpx;						height: 30rpx;					}				}			}			.sectionB {				margin-top: 24rpx;				display: flex;				align-items: center;				justify-content: space-between;				flex-wrap: nowrap;				overflow-x: scroll;				.item {					width: 160rpx;					min-width: 160rpx;					height: 70rpx;					border-radius: 8rpx;					font-size: 24rpx;					font-family: Verdana, Verdana-Bold;					font-weight: 700;					text-align: center;					line-height: 70rpx;					margin-right: 10rpx;				}			}			.sectionB::-webkit-scrollbar {				display: none;				/* Chrome Safari */			}		}				.listSection {			padding: 30rpx;			box-sizing: border-box;			position: relative;			background-color: #fff;			border-radius: 20rpx;						.top-Section {				height: 80rpx;				display: flex;				justify-content: space-between;				align-items: center;				border-bottom: 2px dashed rgba($color: #7F7F7F, $alpha: 0.1);								.point {					width: 16rpx;					height: 16rpx;					background: #3ecde6;					border-radius: 50%;				}				.name {					margin-left: 26rpx;					font-size: 28rpx;					font-family: Verdana, Verdana-Regular;					font-weight: 400;					text-align: left;					color: #262626;					flex-grow: 1;				}				.totalPrice {					font-size: 28rpx;					font-family: Verdana, Verdana-Regular;					font-weight: 400;					text-align: right;				}			}						.item {				position: relative;				padding: 40rpx 0;				box-sizing: border-box;								.sectionA {					display: flex;					align-items: center;										.point {						width: 14rpx;						height: 14rpx;						border-radius: 50%;					}					.name {						margin-left: 28rpx;						font-size: 32rpx;						font-family: Verdana, Verdana-Bold;						font-weight: 700;						text-align: left;					}				}								.sectionB {					display: flex;					align-items: center;					margin-top: 12rpx;										.icon {						margin-left: -5rpx;						width: 22rpx;						height: 27rpx;						margin-right: 24rpx;					}					.date {						font-size: 30rpx;						font-family: Verdana, Verdana-Regular;						font-weight: 400;						text-align: left;						color: #262626;					}				}								.sectionC {					display: flex;					align-items: center;					margin-top: 34rpx;										.point {						width: 14rpx;						height: 14rpx;						background: #e0e0e0;						border-radius: 50%;						margin-right: 28rpx;					}					.name {						font-size: 22rpx;						font-family: Verdana, Verdana-Regular;						font-weight: 400;						text-align: left;						color: #b1b1b1;					}				}								.sectionD {					display: flex;					align-items: center;					margin-top: 6rpx;					justify-content: space-between;										.name {						margin-left: 35rpx;						font-size: 30rpx;						font-family: Verdana, Verdana-Regular;						font-weight: 400;						text-align: left;						color: #262626;					}										.value {						font-size: 30rpx;						font-family: Verdana, Verdana-Regular;						font-weight: 400;						text-align: right;						color: #fd8f3c;					}				}								.bottomLine {					bottom: 0;					width: 100%;					left: 0;					position: absolute;					border-bottom: 2rpx dashed rgba($color: #7F7F7F, $alpha: 0.1);				}			}						.empty {				display: flex;				flex-direction: column;				align-items: center;								.emptyImg {					width: 283rpx;					height: 227rpx;				}				.text {					margin-top: -20rpx;					font-size: 28rpx;					font-family: PingFang SC, PingFang SC-Medium;					font-weight: 500;					text-align: center;					color: #b1b3ba;				}			}		}			}</style>
 |