<!-- <button class='goback' bindtap='goback'><image src='{{wmhome}}' mode="widthFix"></image></button> -->
<navbar back home text="积分商城" background='#FD832D' color="#FFF"></navbar>
<view style="height:{{navigationBarHeight}} "></view>
<view class='content-box' >
  <view class='topbg'>
    <view class='topbg-top'>
      <view class="user-avatar" bindtap='gotograde'>
        <view class='user-box'>
          <open-data class="open" type="userAvatarUrl"></open-data>
        </view>
      </view>
      <view class='bot'>
        <view class='myName'>
          <open-data class="name" type="userNickName"></open-data>
          <view class=' usre_level'>
            <text class='chengzhang '>{{levelName}}</text>
          </view>
        </view>
        <view class="view">
          <progress percent="{{upgradePercent}}"  stroke-width="6" activeColor="#FFB287" />
          <view class='msg'>还需{{upgradeScore}}成长值升级</view>
        </view>
      </view>
    </view>
    <view class='topbg-btom' mode='widthFix'>
      <view class='btoml' bindtap='gotojifen'>
        <view class='score'>{{creditAmount}}</view>
        <view class='jifen'>
          <text>积分详情</text>
          <image src="{{rightHr}}" class='right' mode='widthFix'></image>
        </view>
      </view>
      <!-- 二维码 -->
      <view class='qrcode' > 
        <image src="{{erweima}}" class='qrcodeimg' mode='widthFix' bindtap='qrcodeH'></image>
      </view>
    </view>
  </view>
  <view class='sort'>
    <view bindtap='canSort' hover-class="btn-hover">我可换购</view>
    <view class='need' bindtap='need' hover-class="btn-hover">
      <text>所需积分</text>
      <image tt:if="{{sort }}" src='{{sort}}' moda="aspectFill" ></image>
    </view>
  </view>
  <view class='no-data01' tt:if='{{lists.length==0}}'>
    <image src='{{nodata}}'></image>
    <view class='no-data-text'>暂无数据</view>
  </view>
  <view class='content' tt:if='{{lists.length>0}}' >
    <view class='sepll-list' tt:for="{{lists}}" tt:key="{{index}}" data-couponId='{{item.couponId}}' data-id='{{item.id}}' bindtap='invite'>
      <view class='spell-left'>
        <image src='{{item.coverImg}}' mode="aspectFill"></image>
      </view>
      <view class='spell-center'>
        <view class='tilte'>{{item.title}}</view>
        <!-- <view class='remark'>{{item.subTitle}}</view> -->
        <view class='price'>
          <view class='price01'>
            <view class='price-num'>{{item.creditPrice}}</view>
            <view class='price-unit'>积分</view>
            <!-- <view class='more' tt:if="{{item.salePrice!=0}}">+</view>
            <view class='price-num' tt:if="{{item.salePrice!=0}}">{{item.salePrice}}</view>
            <view class='price-unit' tt:if="{{item.salePrice!=0}}">元</view> -->
            <view class='price02'>{{'原价 '+item.priceStr+'元'}}</view>
          </view>
        </view>
      </view>
      <view class='spell-right'>
      <view class='right-button' tt:if="{{item.salePrice!=0}}">立即购买</view>
        <view class='right-button' tt:if="{{item.salePrice==0&&item.remainInventory!=0}}">立即换购</view>
        <view class='right-button remainInventory' tt:if="{{item.remainInventory==0}}">立即换购</view>
        <!-- <view class='right-text'>剩余{{item.remainInventory}}</view> -->
      </view>
      <view class='line'></view>
      <view class='spell-bot'>
        <view class='botMsg'>{{item.subTitle}}</view>
        <view class='botNum'>剩余{{item.remainInventory}}张</view>
      </view>
    </view>
  </view>
  <view class="loading" tt:if="{{loading}}">
    {{content}}
  </view>
</view>