作者 吴孟雨

添加未购卡片

<!--pages/myCard/myCard.wxml-->
<block>
<view class='banner_box'>
<swiper class='swiper_box' interval='2000' duration='500' current='{{swipercurrent}}' bindchange='swiperCharge'>
<!--未购买畅玩卡-->
<view class="default-card" wx:if="{{imgsUrl.length === 0}}">
<view class="banner_img">
<view class='img_top'>
<view class='logo_title'>畅玩卡</view>
</view>
<view class='img_info'>
<view class='info_title'>{{service.title}}:</view>
<view>{{service.description}}</view>
</view>
</view>
</view>
<!--已购买畅玩卡-->
<swiper wx:if="{{imgsUrl.length > 0}}" class='swiper_box' interval='2000' duration='500' current='{{swipercurrent}}' bindchange='swiperCharge'>
<swiper-item class="banner_img" wx:for='{{imgsUrl || default_card}}' wx:key='index'>
<!-- <image class='swiper_img' src='{{item}}'> -->
<view class='img_top'>
... ... @@ -21,7 +34,7 @@
<!-- </image> -->
</swiper-item>
</swiper>
<view class='indicator_dots'>
<view wx:if="{{imgsUrl.length > 0}}" class='indicator_dots'>
<block wx:for='{{imgsUrl}}' wx:key='index'>
<view class="dot {{ index == swipercurrent ? 'dot_active':''}}"></view>
</block>
... ...
... ... @@ -8,7 +8,7 @@ page {
position: relative;
}
.swiper_box {
.swiper_box, .default-card {
width: 100%;
height: 430rpx;
padding: 30rpx;
... ... @@ -20,7 +20,7 @@ page {
height: 370rpx;
border-radius: 20rpx;
overflow: hidden;
background-image: url('http://science.w.bronet.cn/static/images/background.png');
background-image: url('http://science.w.bronet.cn/static/images/card.png');
background-repeat: no-repeat;
-webkit-background-size: 100%;
background-size: 100%;
... ...