<template>
	<view class="">
		<!-- 头部 -->
		<headContent>&#xe642;
			<template #left>
				<reverse-back />
			</template>
			<template #content>
				<view class="haed-title">
					选择币种
				</view>
			</template>
			<template #right>
				<view @click.stop="lookRecord()" class="head-record iconfont">&#xe642;</view>
			</template>
		</headContent>

		<view class="currency-box">
			<block v-for="(item , index) in currencyList" :key="`currency_${index}`">
				<view class="currency-item" @click.stop="topUp(item.name)">
					<image class="currency-icon" :src="item.icon" mode="aspectFit"></image>
					<text class="currency-name">{{ item.name }}</text>
				</view>
			</block>
		</view>
	</view>
</template>

<script>
	import reverseBack from "@/components/headModules/reverse-back.vue"
	export default {
		name: 'selectCurrency',
		components: {
			reverseBack
		},
		data() {
			return {
				currencyList: [{
						icon: require('@/static/images/bi/bi_01.png'),
						name: 'BTC'
					},
					{
						icon: require('@/static/images/bi/bi_02.png'),
						name: 'BTC'
					},
					{
						icon: require('@/static/images/bi/bi_03.png'),
						name: 'BTC'
					},
					{
						icon: require('@/static/images/bi/bi_03.png'),
						name: 'BTC'
					}
				]
			};
		},
		methods:{
			// pages/content/top-up
			topUp(name){
				uni.navigateTo({
					url:`/pages/content/top-up?name=${name}`
				})
			},
			// 查看充值记录
			lookRecord(){
				uni.navigateTo({
					url:'/pages/content/charge-record'
				})
			}
		}
	}
</script>
<style>
	page {
		background-color: #f5f5f5;
	}
</style>
<style lang="scss" scoped>
	.head-record{
		font-size: 60rpx;
	}
	.currency-box {
		width: 100%;
		padding: 40rpx $pages-padding 0;
		.currency-item{
			width: 100%;
			display: flex;
			align-items: center;
			padding: 30rpx 0;
			.currency-icon{
				width: 46rpx;
				height: 46rpx;
				flex-shrink: 0;
			}
			.currency-name{
				font-size: 28rpx;
				padding-left: 7px;
				font-weight: 700;
			}
		}
		// <view class="currency-box">
		// 	<block v-for="(item , index) in currencyList" :key="`currency_${index}`">
		// 		<view class="currency-item">
		// 			<image class="currency-icon" :src="item.icon" mode="aspectFit"></image>
		// 			<text class="currency-name">{{ item.name }}</text>
		// 		</view>
		// 	</block>
		// </view>
	}
</style>