envelopesActivity.wxml 5.3 KB
<import src="../goodsList/productListCell.wxml"/>


<block wx:if="{{loading}}"> 
  <loading wx:if="{{loading}}">加载中</loading>
</block>
<block wx:elif="{{loginFailded}}">
  <view class='errorView' bindtap="reloadTapped">
    <text class="error">出错啦!点击重试</text>
  </view>
</block>
<block wx:else>
  <view class='container'>
    <scroll-view scroll-y style="height: {{scrollViewHeigth}}px;background-color: #e0e0e0;">
      <view class='header'>
        <image class="activityBanner" src="{{activityBanner}}"bindtap="bannerTapped"></image>
      </view>
      <view class='userDetail'>
        <image class='userDetailBG' src="{{bgImage}}"/> 
        <image class='userIconBack' src="{{userIconS}}"/>
        <image class='userIcon' src="{{userAvatarUrl}}"/>

<view class='userDetailTextView'>

        <block wx:if="{{status == 0 || status == 1}}">
           <text class="userDetailText">你抢到了我的红包哦,快去使用吧!</text>
        </block>
        <block wx:elif="{{status == 2}}">
          <text class="userDetailText">你来晚了,红包已经抢光!</text>
        </block>
        <block wx:else>
          <text class="userDetailText">你来晚了,活动已过期!</text>
        </block>


</view>
        <block wx:if="{{status == 0}}">
          <view class='couponDetail'bindtap="useTapped">
            <image class='couponDetailImage' src="{{curCouponImage}}"bindtap="useTapped"/>
            <view class='couponPrice'bindtap="useTapped">
              <text class='couponPricefuhao'>¥</text> 
              <text class='couponPriceText'>{{receiveRecord.couponAmount}}</text> 
            </view>
            <view class='couponTextDetailView'bindtap="useTapped">
             <text class='couponTextDetail'>{{receiveRecord.couponUseLimit}}</text>
            </view>
          </view>
        </block>
        <block wx:elif="{{status == 1}}">
         <view class='couponDetail'bindtap="useTapped">
            <image class='couponDetailImage' src="{{curCouponImage}}"bindtap="useTapped"/>
            <view class='couponPrice'bindtap="useTapped">
              <text class='couponPricefuhao'>¥</text> 
              <text class='couponPriceText'>{{receiveRecord.couponAmount}}</text> 
            </view>
            <image class='ysyChuo' src="{{ysyChuo}}"bindtap="useTapped"/>
            <view class='couponTextDetailView'bindtap="useTapped">
              <text class='couponTextDetail'>{{receiveRecord.couponUseLimit}}</text>
            </view>
          </view>
        </block>
        <block wx:elif="{{status == 2}}">
          <view class='couponDetail'bindtap="useTapped">
                <image class='couponDetailImage' src="{{curCouponImageGuang}}"bindtap="useTapped"/>
                <view class='textView'bindtap="useTapped">
                  <text class='text1'>别灰心,看看我们</text> 
                  <text class='text2'>给你带来的精选潮品吧!</text> 
                </view>
            </view>
        </block>
        <block wx:else>
          <view class='couponDetail'bindtap="useTapped">
              <image class='couponDetailImage' src="{{curCouponImageGuang}}"bindtap="useTapped"/>
              <view class='textView'bindtap="useTapped">
                <text class='text1'>别灰心,</text> 
                <text class='text2'>去看看其他精彩活动吧!</text> 
              </view>
          </view>
        </block>
      <view class='activityTextView'>
        
         <text class="activityText" bindtap="lookTapped">查看活动说明</text>

        </view>
      </view>
      <view class='couponList'>
        <view class='backG'>

            <block wx:for="{{receiveRecords}}" wx:key="unique">
              <view class="couponCell">
                <image class="couponCellIcon" src="{{item.receiveUser.avatar}}"></image>  
                  <view class="couponCellMiddle">
                    <text class="name">{{item.receiveUser.name}}</text>
                    <text class="time">{{item.receiveTime}}</text>
                  </view>
                  <view class="couponCellRigth">
                    <text class="price">+{{item.couponAmount}}</text>
                  </view>
              </view>
          </block>
          <view class="bottomNum">
              <text class="numText">剩余{{currentNum}}/{{maxReceiveNum}}</text>
          </view> 
          <view class="listTopOffset"/>
          </view>

        </view>
          <block wx:if="{{product_list.length > 0}}"> 
            <view class="space"/> 
            <view class="couponCellActivityTitleView">
                <image class="couponCellActivityBG" src="{{czspImage}}"> </image>    
            </view> 
          </block>  
          <view class="likeContainer">
            <block wx:for="{{product_list}}" wx:key="{{index}}">
              <template is="productListCell" data="{{listWidth, listHeight, listImageWidth, listImageHeight, listImageTop, listMarginHorizontal,index,f_index:3, item}}"/>
            </block>
          </view>
    </scroll-view>
    <view class='line'></view> 
    <view class='bottom'>
      <view class="button1" bindtap="useTapped">
        <text class="buttonText1">有货商城</text>
      </view> 
      <view class="button2"  bindtap="myCouponTapped">
          <text class="buttonText2">我的优惠劵</text>
      </view>  
    </view>

  </view>
</block>