12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182 |
- <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>
|