<template>
	<view>
		<no-none v-if="list.length<=0"></no-none>
		<block v-else>
			<view class="flex-y-center content-home" v-for='(item,index) of list' :key='index' v-if="item.state==2">
				<view class="flex-grow-1">
<!-- 					<block v-if="type==1">
						<view class="pay_type flex-y-center">
							<text>{{item.code}}</text>
						</view>
						<view class="time">{{item.create_time}}</view>
					</block> -->
					<!-- <block v-if="type==2"> -->
						<view class="pay_type flex-y-center">
							<text>{{item.name}}</text>
						</view>
						<view class="time">{{item.create_time}}</view>
					<!-- </block> -->
				</view>
				<view class="flex-grow-0 price">
					<!-- <block v-if="type==1"> -->
						<view class="flex-y-center flex-x-center">￥{{item.pay_money}}</view>
						<!-- <text class="getmaney">赠送金额：{{item.send_price}}</text> -->
					<!-- </block> -->
			<!-- 		<block v-if="type==2">
						<view class="flex-y-center flex-x-center">{{item.type==1?'+':'-'}}{{item.score}}</view>
					</block> -->
				</view>
			</view>
		</block>
	</view>
</template>
<script>
	export default {
		data() {
			return {
				list: [],
				page: 1,
				userinfo: "",
				store_id: "",
				type: 1,
			}
		},

		onLoad(e) {
			this.http();
		},
		
		methods: {
			http() {
				this.request({
					url: "user/record_recharge",
					data: {
						user_id: uni.getStorageSync("my_uerInfo").id,
					},
				}).then(res => {
					if (res.code == "200") {
						this.list =res.data;
					}
				}).catch((res) => {
					console.log(res, "666")
					uni.showToast({
						title: res.message,
						icon: 'none'
					})
				});
			},
		}
	}
</script>

<style>
	.wxtype {
		width: 45rpx;
		height: 45rpx;
	}

	.content-home {
		font-size: 28rpx;
		border-bottom: 1rpx solid #f1f1f1;
		padding: 20rpx 30rpx;
	}

	.pay_type {
		padding-bottom: 6rpx;
	}

	.time {
		font-size: 24rpx;
		color: #999;
	}

	.price {
		color: red;
		font-size: 32rpx;
		text-align: center;
	}

	.getmaney {
		font-size: 22rpx;
		color: #999;

	}
</style>
