<import src="../../../utils/wxParse/wxParse.wxml"></import>
<wxs module="filters" src="../../../utils/filter.wxs"></wxs>

<block >
  <view class="container">
    <view class="type-navbar">
      <view class="type-box" wx:for="{{categories}}" wx:key="id">
        <view bindtap="tabClick" class="type-navbar-item {{activeCategoryId==item.id?'type-item-on':''}}" id="{{item.id}}">{{item.name}}</view>
      </view>
    </view>
    <view class="goods-detail">
      <view class="goods-info" style="position: relative;" hidden="{{activeCategoryId==0?false:true}}">
        <view id="id" bindtouchstart="handletouchtart" bindtouchmove="handletouchmove">
          <view class="xc-videos-picture rel">
            <swiper autoplay="{{false}}" current="{{swiperCurrent}}" class="swiper_box  swiperContainer rel" duration="{{1000}}" indicatorDots="{{mapurl?false:true}}" interval="{{3000}}" vertical="{{false}}" bindchange="swiperChange">
              <swiper-item wx:if="{{mapurl}}">
                <view wx:if="{{noon == 0}}">
                  <image class="xc-picturess" src="{{iurl+mapurl_f_img}}" mode="aspectFit">
                    <image id="{{index}}" class="xc-play" src="{{iurl}}/miniapp/images/pofang.png" bindtap="videoPlay"></image>
                  </image>
                </view>
                <view wx:else>
                  <video bindfullscreenchange="screenChange" class="xc-videos" src="{{iurl+mapurl}}" id="{{index}}" wx:if="{{_index == index}}"></video>
                </view>
              </swiper-item>
              <swiper-item wx:for="{{data.listimages}}" wx:key="gallery">
                <view data-index="{{index}}" bindtap='pre_gallery_img' class="wh100 g_img_box" style="background-image:url({{iurl+item.imageUrl}});"></view>
              </swiper-item>
            </swiper>
            <block wx:if="{{mapurl}}">
              <view wx:if="{{hiddenn==1}}">
                <view class="xc-imageCount">{{current}}/{{data.listimages.length}}</view>
              </view>
              <view class="xc-video-picture abs">
                <view class="xc-video" data-vipi="0" bindtap="videopicture">
                  <view class="{{videopicture==0 ? 'xc-video-button':'xc-video-buttons'}}  {{videopicture==0 ? 'xc-sn':''}}">
                    视频
                  </view>
                </view>
                <view class="xc-picture  {{videopicture==1 ? 'xc-sn':''}}" data-vipi="1" bindtap="videopicture">
                  <view>图片</view>
                </view>
              </view>
            </block>
          </view>
        </view>

        <!-- 图文详情 -->
        <view class="bdt16">
          <view class="t_g_info">
            <view class="red_shu"></view>
            <view class="fs30 bold">商品详情</view>
          </view>
          <view class="pd20">
            <view class="table_s">
              <view class="tb_item tb-l">
                <view class="item_left">
                  <text>商品名称</text>
                </view>
                <view class="item_right">
                  <text>{{data.goods_name}}</text>
                </view>
              </view>
              <view class="tb_item tb-l">
                <view class="item_left">
                  <text>商品条码</text>
                </view>
                <view class="item_right">
                  <text>{{data.sku}}</text>
                </view>
              </view>
            </view>
          </view>
          <!-- 详情图片 -->
          <view class="wxParse">
            <template is="wxParse" data="{{wxParseData:content.nodes}}"></template>
          </view>
        </view>
      </view>
      <!-- ----------商品详情图片页面-------------- -->
      <view class="goods-norms" hidden="{{activeCategoryId==1?false:true}}">
        <view class="table_s">
          <view class="tb_item tb-l">
            <view class="item_left">
              <text>商品名称</text>
            </view>
            <view class="item_right">
              <text>{{data.goods_name}}</text>
            </view>
          </view>
          <view class="tb_item tb-l">
            <view class="item_left">
              <text>商品编号</text>
            </view>
            <view class="item_right">
              <text>{{data.goods_sn}}</text>
            </view>
          </view>
          <view class="tb_item tb-l">
            <view class="item_left">
              <text>商品条码</text>
            </view>
            <view class="item_right">
              <text>{{data.sku}}</text>
            </view>
          </view>
          
        </view>
        <view class="wxParse">
          <template is="wxParse" data="{{wxParseData:content.nodes}}"></template>
        </view>
      </view>

    </view>
    <!-- 技术支持 -->
    <view class="logo-container t-c">
      <view class="flex ai_c fs24 jc-center pdv30 white">
        <image src="{{iurl + 'miniapp/images/luckDraw/logo.png?v=3'}}" class="logo" lazy-load></image>
        提供技术支持
      </view>
    </view>
  </view>
  <!-- -滚动到顶部-- -->
  <view bindtap="doScrollTop" class="toTop" wx:if="{{supportPageScroll}}">
    <image class="wh100" src="{{iurl}}/miniapp/images/topup.png"></image>
  </view>

</block>