<!-- 积分兑换商品详情 -->
<!--pages/integralProdDet/integralProdDet.wxml-->
<scroll-view scroll-y="{{!showSku}}" style="height: 100%;">
  <view class="container">

    <!-- 轮播图 -->
    <swiper indicator-dots="{{indicatorDots}}" autoplay="{{autoplay}}" indicator-color="{{indicatorColor}}" interval="{{interval}}" duration="{{duration}}" indicator-active-color="{{indicatorActiveColor}}">
      <block wx:for="{{imgs}}" wx:key='index'>
        <swiper-item>
          <image src='{{item}}'></image>
        </swiper-item>
      </block>
    </swiper>
    <!-- 轮播图end -->

    <!-- 商品信息 -->
    <view class='prod-info'>
      <view class="tit-wrap">
        <view class="prod-tit">{{prodName}}</view>
      </view>
      <view class="sales-p">{{brief}}</view>

      <!-- 积分商品价格 -->
      <view class="integral-prod-price">
        <text wx:if="{{price}}">{{wxs.parsePrice(defaultSku.price)[0]}}.{{wxs.parsePrice(defaultSku.price)[1]}}元 +</text>{{defaultSku.skuScore}} 积分
      </view>

    </view>
    <!-- 商品信息end -->


    <!-- 已选规格 -->
    <view class="sku" bindtap='showSku'>
      <view class="sku-tit">已选</view>
      <view class="sku-con">{{selectedProp.length>0?selectedProp+'，':selectedProp}}{{prodNum}}件</view>
      <view class="more">...</view>
    </view>
    <!-- 已选规格end -->


    <!-- 商品详情 -->
    <view class="prod-detail">
      <view>
        <rich-text nodes="{{content}}"></rich-text>
      </view>
    </view>
    <!-- 商品详情end -->
    

    <!-- 规格弹窗 -->
    <view class="pup-sku" wx:if="{{skuShow}}">
      <view class="pup-sku-main">
        <view class='pup-sku-header'>
          <image class="pup-sku-img" src="{{defaultSku.pic?defaultSku.pic:pic}}"></image>
          <view class="prod-title">{{prodName}}</view>
          <!-- 积分商品价格 -->
          <view class="pup-sku-price">
            <text class="pup-sku-price-int" wx:if="{{defaultSku.price}}">￥{{wxs.parsePrice(defaultSku.price)[0]}}.{{wxs.parsePrice(defaultSku.price)[1]}}</text>  
            <text wx:if="{{defaultSku.price && scorePrice }}">+</text> {{defaultSku.skuScore}} 积分
          </view>
          <view class="pup-sku-price" wx-if="{{!findSku}}">无货</view>
          <view class='pup-sku-prop'>
            <text>已选</text><text decode="{{true}}">&nbsp;{{selectedProp.length>0?selectedProp+'，':selectedProp}}{{prodNum}}&nbsp;件</text>
          </view>
          <view class='close' bindtap='closePopup'></view>
        </view>
        <view class='pup-sku-body'>
          <view class="pup-sku-area">
            <block wx:for="{{skuGroup}}" wx:for-index="key" wx:for-item="value" wx:key='*this'>
              <view class='sku-kind'>{{key}}</view>
              <view class='sku-choose'>
                <block wx:for="{{value}}" wx:key='*this'>
                  <text class="sku-choose-item {{wxs.array_contain(selectedProp,item)?'active':''}} {{['gray','','dashed'][wxs.props_contain2(allProperties,selectedPropObj,key,item,propKeys)]}}" data-ok="{{wxs.props_contain2(allProperties,selectedPropObj,key,item,propKeys)}}" bindtap='toChooseItem'
                    data-key="{{key}}" data-val="{{item}}">{{item}}</text>
                </block>
              </view>
            </block>
          </view>
          <view class="pup-sku-count">
            <view class="num-wrap">
              <view class="minus" bindtap='onCountMinus'>
                <text class="row"></text>
              </view>
              <view class="text-wrap">
                <input type="number" value="{{prodNum}}" disabled />
              </view>
              <view class="plus" bindtap='onCountPlus'>
                <text class="row"></text>
                <text class="col"></text>
              </view>
            </view>
            <view class="count-name">数量</view>
          </view>
        </view>
        <!-- 积分 底部按钮 -->
        <view class="ex-integral-foot">
          <view class="ex-integral-btn">立即兑换</view>
        </view>
      </view>
    </view>
    <!-- 规格弹窗 end -->

  </view>
</scroll-view>

<!-- 积分 底部按钮 -->
<!-- <view class="foot-btn-box"> -->
  <view class="ex-integral-foot">
    <view class="ex-integral-btn" bindtap="redeemNow">立即兑换</view>
  </view>
<!-- </view> -->

<wxs module="wxs" src="../../../wxs/number.wxs" />

<!-- <login-popup bind:onGotUserInfo="onGotUserInfo" isAuthInfo="{{isAuthInfo}}"></login-popup> -->
