<template>
	<view class="">
		<!-- 头部 -->
		<headContent>
			<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">
			<view class="currency-item">
				<view class="currency-info">
					<image class="currency-icon" src="@/static/images/bi/bi_01.png" mode="aspectFit"></image>
					<text class="currency-name">BTC</text>
				</view>
				<view class="select-currency" @click.stop="selectCurrency">
					<text>请选择币种</text>
					<text class="iconfont">&#xe88e;</text>
				</view>
			</view>
			<view class="currency-code"></view>
			
			<view class="currency-btn">保存二维码</view>
			<view class="currency-btn currency-copy">复制地址</view>
		</view>
	</view>
</template>

<script>
	import reverseBack from "@/components/headModules/reverse-back.vue"
	export default {
		name: 'top-up',
		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
			selectCurrency(){
				uni.redirectTo({
					url: '/pages/content/select-currency'
				});
			},
			// 查看充值记录
			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: 30rpx 40rpx;

		.currency-item {
			width: 100%;
			display: flex;
			justify-content: space-between;
			align-items: center;

			.currency-info {
				flex-shrink: 0;
				display: flex;
				align-items: center;

				.currency-icon {
					width: 46rpx;
					height: 46rpx;
					flex-shrink: 0;
				}

				.currency-name {
					font-size: 28rpx;
					padding-left: 7px;
					font-weight: 700;
				}
			}
			
			.select-currency{
				flex-shrink: 0;
				display: flex;
				align-items: center;
				font-size: 24rpx;
				.iconfont{
					color: #ccc;
				}
			}

		}

		.currency-code{
			margin: 80rpx auto 0;
			width: 350rpx;
			height: 350rpx;
			background-color: #fff;
		}
		
		.currency-btn{
			width: 360rpx;
			height: 80rpx;
			background-color: $Theme-Color;
			margin: 54rpx auto 0;
			border-radius: 6rpx;
			text-align: center;
			line-height: 80rpx;
			font-size: 30rpx;
			color: #fff;
		}
		
		.currency-copy{
			color: $Theme-Color;
			background-color: #fff;
			margin: 100rpx auto 0; 
			border: 1rpx solid $Theme-Color; 
			line-height: 78rpx;
		}

	}
</style>