<template>
	<view class="content">
		<view class="hg24px"></view>
		<no-none v-if='list.length<=0'></no-none>
		<block v-else>
			<view class="flex-y-center box-pack-between item" v-for='(item,index) of list' :key='index'>
				<view class="flex-grow-1 flex-y-center">
					<image style="margin-right:20rpx" class="wxtype" :src="item.cash_type==2?'../../static/images/ali.png':item.cash_type==3?'../../static/images/black.png':'../../static/images/wx.png'"></image>
					<view class="pay_type">
						<text>提现到 {{item.cash_type==1?"微信":item.cash_type==2?"支付宝":"银行卡"}} </text>
						<view class="time">{{item.create_time}}</view>
					</view>
				</view>
				<view class="flex-grow-0 price">
					<view class="flex-y-center flex-x-center">￥{{item.cash_money}}</view>
				</view>
			</view>
			<view class="no-more">
				---没有更多数据了---
			</view>
		</block>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				list: [],
				page: 1,
			}
		},
		onLoad(e) {
			this.http();
		},
		onShareAppMessage(e) {

		},
		onReachBottom(e) {
			this.http()
		},

		methods: {
			http() {
				this.request({
					url: "Advertiser/history",
					data: {
						token: uni.getStorageSync("token"),
						page: this.page,
					}
				}).then(res => {
					console.log(res, "res")
					if (res.code === '200') {
						this.list = this.list.concat(res.data);
						this.page = this.page + 1;
					}
				});
			}
		}
	}
</script>

<style>
		@import url("@/static/css/header.css");
	.item {
		width: 100%;
		height: 120rpx;
		padding: 24rpx 30rpx;
		background: rgba(255, 255, 255, 1);
		border-bottom: 1rpx solid #F1F1F1;
	}

	.wxtype {
		width: 36rpx;
		height: 36rpx;
	}

	.pay_type {
		font-size: 28rpx;
		font-weight: 400;
		color: rgba(102, 102, 102, 1);
		padding-bottom: 6rpx;
	}

	.price {
		font-size: 32rpx;
		font-weight: 500;
		color: rgba(51, 51, 51, 1);
	}
	.no-more{
		text-align: center;
		color: #999;
		margin: 30rpx 0;
	}
</style>
