作者 吴孟雨

添加未购卡片

1 <!--pages/myCard/myCard.wxml--> 1 <!--pages/myCard/myCard.wxml-->
2 <block> 2 <block>
3 <view class='banner_box'> 3 <view class='banner_box'>
4 - <swiper class='swiper_box' interval='2000' duration='500' current='{{swipercurrent}}' bindchange='swiperCharge'> 4 + <!--未购买畅玩卡-->
  5 + <view class="default-card" wx:if="{{imgsUrl.length === 0}}">
  6 + <view class="banner_img">
  7 + <view class='img_top'>
  8 + <view class='logo_title'>畅玩卡</view>
  9 + </view>
  10 + <view class='img_info'>
  11 + <view class='info_title'>{{service.title}}:</view>
  12 + <view>{{service.description}}</view>
  13 + </view>
  14 + </view>
  15 + </view>
  16 + <!--已购买畅玩卡-->
  17 + <swiper wx:if="{{imgsUrl.length > 0}}" class='swiper_box' interval='2000' duration='500' current='{{swipercurrent}}' bindchange='swiperCharge'>
5 <swiper-item class="banner_img" wx:for='{{imgsUrl || default_card}}' wx:key='index'> 18 <swiper-item class="banner_img" wx:for='{{imgsUrl || default_card}}' wx:key='index'>
6 <!-- <image class='swiper_img' src='{{item}}'> --> 19 <!-- <image class='swiper_img' src='{{item}}'> -->
7 <view class='img_top'> 20 <view class='img_top'>
@@ -21,7 +34,7 @@ @@ -21,7 +34,7 @@
21 <!-- </image> --> 34 <!-- </image> -->
22 </swiper-item> 35 </swiper-item>
23 </swiper> 36 </swiper>
24 - <view class='indicator_dots'> 37 + <view wx:if="{{imgsUrl.length > 0}}" class='indicator_dots'>
25 <block wx:for='{{imgsUrl}}' wx:key='index'> 38 <block wx:for='{{imgsUrl}}' wx:key='index'>
26 <view class="dot {{ index == swipercurrent ? 'dot_active':''}}"></view> 39 <view class="dot {{ index == swipercurrent ? 'dot_active':''}}"></view>
27 </block> 40 </block>
@@ -8,7 +8,7 @@ page { @@ -8,7 +8,7 @@ page {
8 position: relative; 8 position: relative;
9 } 9 }
10 10
11 -.swiper_box { 11 +.swiper_box, .default-card {
12 width: 100%; 12 width: 100%;
13 height: 430rpx; 13 height: 430rpx;
14 padding: 30rpx; 14 padding: 30rpx;
@@ -20,7 +20,7 @@ page { @@ -20,7 +20,7 @@ page {
20 height: 370rpx; 20 height: 370rpx;
21 border-radius: 20rpx; 21 border-radius: 20rpx;
22 overflow: hidden; 22 overflow: hidden;
23 - background-image: url('http://science.w.bronet.cn/static/images/background.png'); 23 + background-image: url('http://science.w.bronet.cn/static/images/card.png');
24 background-repeat: no-repeat; 24 background-repeat: no-repeat;
25 -webkit-background-size: 100%; 25 -webkit-background-size: 100%;
26 background-size: 100%; 26 background-size: 100%;