<template>
	<view class="container">
		<navBar title="提现记录" :back="true" color="#333333" background="#FFFFFF" />

		<view class="list">
			<view class="empty" style="margin-top: 50%;" v-if="list.length==0">
				<u-empty mode="data" />
			</view>

			<view class="" v-else>
				<view class="item" v-for="(item,index) in list">
					<view class="top">
						<view class="name">
							提现至{{item.type==1?'微信':item.type==2?'支付宝':'银行卡'}}
						</view>
						<view class="money">
							￥{{item.amount}}
						</view>
					</view>
					<view class="bot">
						<view class="item1">
							<view class="left">
								申请状态
							</view>
							<view class="right"
								:style="{color:item.state==0?'#EF8116':item.state==1?'#1BD03B':'#EC1E1E'}">
								{{item.state==0?'待审核':item.state==1?'审核通过':'拒绝'}}
							</view>
						</view>

						<view class="refuseBox" v-if="item.state==2">
							拒绝原因：{{item.not_desc}}
						</view>
						<view class="item1">
							<view class="left">
								申请时间
							</view>
							<view class="right rb">
								{{item.created_at}}
							</view>
						</view>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	// import navBar from '@/components/navBar/index.vue'

	import {
		cashList,
	} from '@/api/index/index.js'
	export default {
		// components: {
		// 	navBar
		// },
		data() {
			return {
				list: []
			}
		},
		onLoad() {
			this.cashList()
		},
		methods: {
			async cashList() {
				let res1 = await cashList()
				console.log('提现记录返回值--------', res1);
				if (res1.code == 0) {
					this.list = res1.data.data
				} else {
					this.$toast(res1.message)
				}
			},
		}
	}
</script>

<style lang="scss" scoped>
	@import "./index.scss";
</style>