<template>
	<view class="card">
		<view class="card-item" :style="{backgroundImage: 'url(' + item.bgImage + ')',
  'background-repeat':'no-repeat', backgroundSize:'100% 100%'}" v-for="(item,index) in list" :key="index">
			<view class="info">
				<view class="title">{{item.title}}</view>
				<view class="score">{{item.desc}}</view>
			</view>
			<view class="btn">
				立即使用
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				list: [{
						title: '会员卡',
						num: 45,
						desc:'VIP会员用户，尊享9大特权',
						bgImage: require('../../static/card-bg1.png')
					},
					{
						title: '次数卡',
						num: 45,
						desc:'剩余次数：3次',
						bgImage: require('../../static/card-bg.png')
					},

				]
			}
		}
	}
</script>

<style lang="scss" scoped>
	.card {
		background: black;
		padding: 30rpx 15rpx 0;
		min-height: 100vh;

		.card-item {
			height: 154rpx;
			border-radius: 16rpx;
			display: flex;
			align-items: center;
			justify-content: space-between;
			margin-bottom: 30rpx;
			padding: 40rpx 60rpx;
			box-sizing: border-box;

			.info {
				color: #FEDEB5;

				.title {
					font-size: 40rpx;
					font-weight: bold;
				}

				.score {
					font-size: 24rpx;
					font-family: PingFang SC-Regular, PingFang SC;
					margin-top: 10rpx;
				}
			}

			.btn {
				width: 144rpx;
				height: 52rpx;
				line-height: 52rpx;
				color: #302E2F;
				font-size: 24rpx;
				background: #FEDEB5;
				border-radius: 26rpx;
				text-align: center;
			}
		}
	}
</style>