record.vue 2.1 KB
<template>
	<view>
		<!-- title -->
		<view class="user-wrapper">
			<view>
				<image @click="back" src="../../../static/imgs/left.png" mode=""></image>
				<text>伙伴消费记录</text>
				<view></view>
			</view>
			<view>
				<image :src="lower.avatar" mode=""></image>
				<text>{{lower.nickname}}</text>
			</view>
		</view>
		<!-- content -->
		<view v-for="(item,index) in pay" class="content-wrp">
			<view class="buy">
				<view>{{item.remark}}</view>
				<view>{{item.createtime}}</view>
			</view>
			<view class="money">¥{{item.money}}</view>
			
			
		</view>
		
		
	</view>
</template>

<script>
	import request from "../../../App.vue"
	export default {
		data() {
			return {
				lower:'',
				pay:''
			};
		},
		onLoad:function(option){
			const data = {
				lower_user_id : option.id
			}
			request.post('/api/user/lowerPayLog',data).then(r=>{
				if(r.code == 1){
					this.lower = r.data.lower
					this.pay = r.data.pay_log.data
				}
			})
		},
		methods:{
			back(){
				uni.navigateBack({
					
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.money{
		color: #FC8C06;
		font-size: 32rpx;
		font-weight: 500;
	}
	.buy{
		>view:first-child{
			color: #323233;
			font-size: 28rpx;
			padding-bottom: 16rpx;
		}
		>view:last-child{
			color: #969799;
			font-size: 24rpx;
		}
		
	}
	.content-wrp{
		display: flex;
		align-items: center;
		width: 686rpx;
		margin: 0 auto;
		justify-content: space-between;
		padding-bottom: 28rpx;
		border-bottom: 1rpx solid #EBEDF0;
		padding-top: 24rpx;
	}
	.user-wrapper{
		background-image: url("../../../static/imgs/bgrecord.png");
		background-size: cover;
		padding-top: 22rpx;
		padding-bottom: 32rpx;
		>view:first-child{
			display: flex;
			width: 686rpx;
			margin: 0 auto;
			justify-content: space-between;
			color: white;
			>image{
				width: 48rpx;
				height: 48rpx;
			}
		}
		>view:last-child{
			padding-top: 54rpx;
			width: 686rpx;
			margin: 0 auto;
			display: flex;
			align-items: center;
			>image{
				width: 96rpx;
				height: 96rpx;
				border-radius: 50%;
			}
			>text{
				font-size: 32rpx;
				color: white;
				padding-left: 24rpx;
			}
		}
	}

</style>