giftProceeds.vue 5.8 KB
<template>
	<view>
		<view class="walletBalWrap">
			<view class="checkName" v-if="pgType == 'gift' && userInfo.id_no == ''" @click="href('../checkName')">
				<view class="checkLeft" @click="href('../checkName')">
					<image src="../../../static/image/wallet/icon-wenjianxitong-1@2x.png" mode=""></image>
					您暂未实名认证,请立即实名认证
				</view>
				<image src="../../../static/image/right_icon.png" mode=""></image>
			</view>
			<view class="priceTxt">
				{{pgType == 'gift' ? '礼物' : '预约'}}收益余额
			</view>
			<view class="priceWrap">
				<text>{{pgType == 'gift' ? wallet.gift_money : wallet.make_money}}</text>
				<!-- <view class="priceBtn">
					提现
				</view> -->
			</view>
			<view class="incomeWrap">
				<view class="incomeItem">
					<view class="incomeTxt">
						今日收入
					</view>
					<view class="incomeNum">
						{{pgType == 'gift' ? wallet.gift_today : wallet.make_today}}
					</view>
				</view>
				<view class="incomeItem">
					<view class="incomeTxt">
						累计收入
					</view>
					<view class="incomeNum">
						{{pgType == 'gift' ? wallet.gift_total : wallet.make_total}}
					</view>
				</view>
			</view>
			<view class="handleWrap">
				<!-- <view class="handleItem" v-if="pgType == 'gift'" @click="href('accountDetail')">
					<text style="color: #4a8b94;font-size: 28rpx;">账户明细</text>
					<view class="handleRight">
						<image src="../../../static/image/right.png" mode=""></image>
					</view>
				</view> -->
				<view class="handleItem" @click="href(pgType == 'appoint' ? 'accountDetail' : 'giftDetail')">
					<text style="color: #4a8b94;font-size: 28rpx;">礼物明细</text>
					<view class="handleRight">
						<image src="../../../static/image/right.png" mode=""></image>
					</view>
				</view>
				<view class="handleItem" v-if="pgType == 'gift'" @click="href('../checkName')">
					<text style="color: #4a8b94;font-size: 28rpx;">实名认证</text>
					<view class="handleRight">
						{{userInfo.id_no != '' ? '已认证' : '未认证'}}
						<image src="../../../static/image/right.png" mode=""></image>
					</view>
				</view>
				<view class="handleItem" @click="href('problems')">
					<text style="color: #4a8b94;font-size: 28rpx;">常见问题</text>
					<view class="handleRight">
						<image src="../../../static/image/right.png" mode=""></image>
					</view>
				</view>
			</view>			
		</view>
		<!-- <view class="bottomCheckBox">
			<image v-if="!agreeStatus" @click="agreeStatus = !agreeStatus" src="../../../static/image/wallet/Rectangle_2319@2x.png" mode=""></image>
			<image v-if="agreeStatus" @click="agreeStatus = !agreeStatus" src="../../../static/image/wallet/Group_582@2x.png" mode=""></image>
			同意<text>《找地主钱包用户协议》</text>
		</view> -->
	</view>
</template>

<script>
	export default{
		data(){
			return{
				userInfo:{},
				wallet:{},
				agreeStatus:false,
				pgType:''
			}
		},
		onShow() {
			this.getData()
		},
		methods:{
			getData(){
				let url = ''
				if(this.pgType == 'gift'){
					url = '/wallet/gift'
				}else{
					url = '/wallet/make'
				}
				this.$request(url).then((res)=>{
					console.log('收益页面',res)
					this.wallet = res.data
				})
				//获取用户信息
				this.$request('/user/info').then((res)=>{
					this.userInfo = res.data
				})
			},
			href(url){
				this.$href(url)
			},
			onLoad(e){
				//gift:礼物收益,appoint:预约收益
				this.pgType = e.pgType
			},
			onReady(){
				if(this.pgType == 'gift'){
					uni.setNavigationBarTitle({
						title:'礼物收益'
					})
				}else{
					uni.setNavigationBarTitle({
						title:'预约收益'
					})
				}
			}
		}
	}
</script>

<style lang="scss" scoped>
	.walletBalWrap{
		background: url(../../../static/image/my/Frame_150@2x.png) no-repeat;
		background-size: 100% 334rpx;
		height: 334rpx;
		position: relative;
		padding: 0 32rpx;
		.checkName{
			font-size: 24rpx;
			height: 66rpx;
			background: rgba(255,255,255,0.90);
			border-radius: 174rpx;
			display: flex;
			justify-content: space-between;
			align-items: center;
			padding: 0 16rpx;
			image{width: 32rpx;height: 32rpx;}
			.checkLeft{
				display: flex;
				align-items: center;
				image{width: 32rpx;height: 32rpx;margin-right: 4rpx;}
			}
		}
		.priceTxt{
			font-size: 28rpx;
			color: rgba(255,255,255,0.80);
			padding-top: 8rpx;
		}
		.priceWrap{
			height: 124rpx;
			display: flex;
			justify-content: space-between;
			align-items: center;
			text{font-size: 88rpx;color: #fff;}
			.priceBtn{
				width: 168rpx;
				height: 64rpx;
				background: linear-gradient(135deg,#ffffff, rgba(255,255,255,0.70));
				border: 1rpx solid #ffffff;
				border-radius: 103rpx;
				text-align: center;
				line-height: 64rpx;
				font-size: 24rpx;
				color: #588989;
			}
		}
		.incomeWrap{
			margin-top: 58rpx;
			background: #ffffff;
			border-radius: 16rpx;
			box-shadow: 0rpx 20rpx 40rpx 0rpx rgba(12,98,98,0.07); 
			display: flex;
			padding: 32rpx;
			.incomeItem{
				flex: 1;
				.incomeTxt{
					color: #9897a3;
					font-size: 24rpx;
				}
				.incomeNum{
					padding-top: 8rpx;
					color: #4a8b94;
					font-size: 48rpx;
				}
			}
		}
		.handleWrap{
			margin-top: 32rpx;
			background: #ffffff;
			border-radius: 16rpx;
			box-shadow: 0rpx 20rpx 40rpx 0rpx rgba(12,98,98,0.07); 
			padding: 0 24rpx;
			.handleItem{
				height: 88rpx;
				display: flex;
				justify-content: space-between;
				align-items: center;
				border-bottom: 2rpx solid #f1f1f3;
				.handleRight{
					display: flex;
					align-items: center;
					image{width: 36rpx;height: 36rpx;}
					color: #4a8b94;
					font-size: 28rpx;
				}
			}
			.handleItem:nth-of-type(4){border-bottom: none;}
		}
	}
	.bottomCheckBox{
		position: fixed;
		width: 100%;
		display: flex;
		justify-content: center;
		align-items: center;
		font-size: 28rpx;
		image{width: 28rpx;height: 28rpx;margin-right: 10rpx;}
		text{color: #4a8b94;}
		bottom: 38rpx;
	}
</style>