goodtail.wxml 7.2 KB
<import src="../../wxParse/wxParse.wxml" />

<!-- 转换箭头 -->
<view class="zhuanhuan" bindtap="gogift">
  <image src="/img/jump.png"></image>
</view>


<view class="swiper_image">
  <swiper indicator-dots="{{indicatorDots}}" autoplay="{{autoplay}}" interval="{{interval}}" duration="{{duration}}" class="swiper_item_img" bindchange="swiperChange" circular="true">
    <block wx:for="{{imgUrls}}" wx:key="doct">
      <swiper-item>
        <image src="{{item}}" data-index='{{index}}' class="slide-image" bindtap='viewImg' width="355" height="150" />
      </swiper-item>
    </block>
  </swiper>

  <view class="bannerdot">
    <text>{{currentSwiper+1}}</text>/
    <text>{{imgUrls.length}}</text>
  </view>

  <!-- <view class="dots">
    <block wx:for="{{imgUrls}}" wx:key="">
      <view class="dot{{index == currentSwiper ? ' active' : ''}}"></view>
    </block>
  </view> -->


</view>
<view class="goodname">
  <view class="boxgoodrightop">
    <view class="boxgoodrigtl">
      <image src="/img/good.png"></image>
    </view>
    {{goodtail.goods_name}}
  </view>

  <view class="goodprice">

    <view class="goodpriceleft">¥{{goodtail.price}}</view>
    <view class="goodpriceright" wx:if="{{goodtail.freight=='0.00'}}">运费:免运费</view>
    <view class="goodpriceright" wx:else>运费:{{goodtail.freight}}元</view>
  </view>
</view>

<!--赠品 -->
<view class="zenggood" bindtap="gogift">
  <view class="zenggoodleft">
    <image src='{{goodtail.gift.image}}'></image>
  </view>
  <view class="zengright">
    <view class="boxgoodrightop zengname">
      <view class="boxgoodrigtl">
        <image src="/img/zeng.png"></image>
      </view>
      {{goodtail.gift.goods_name}}
    </view>
  </view>
</view>

<!-- 详情和评论 -->

<view class="pingxiang">
  <view class="pingxiangitem {{ping==1?'pingzctive':''}} " data-id="1" bindtap="comment">详情</view>
  <view class="pingxiangitem {{ping==2?'pingzctive':''}}" data-id="2" bindtap="comment">评论({{totalping}})</view>
</view>

<view class="pingdetail" wx:if="{{ping==1}}">

  <template is="wxParse" data="{{wxParseData:article.nodes}}" />
  <!-- <view class="pingdetailimg">
        <image src="/img/changtu.png"></image>
    </view> -->

</view>

<view class='commentdetail' wx:else>

  <view class="nodata" wx:if="{{commentlist.length==0}}">暂无评论</view>

  <view wx:else>
    <view class="commentitem" wx:for="{{commentlist}}" wx:key="">
      <view class="commentitemtop">
        <view class="commentleft">
          <view class="commentitemleft">
            <image src="{{item.avatar}}"></image>
          </view>
          <view class="commentitemright">{{item.nickname}}</view>
        </view>

        <view class="commentright">{{item.createtime}}</view>

      </view>

      <view class="commenttext">
        {{item.content}}
      </view>

      <view class="pingfen">
        <view class="pingfenleft">
          <view class="pingfenitem">
            <image src="{{item.star>=1?'/img/shixing.png':'/img/kongxing.png'}}"></image>
          </view>
          <view class="pingfenitem">
            <image src="{{item.star>=2?'/img/shixing.png':'/img/kongxing.png'}}"></image>
          </view>
          <view class="pingfenitem">
            <image src="{{item.star>=3?'/img/shixing.png':'/img/kongxing.png'}}"></image>
          </view>
          <view class="pingfenitem">
            <image src="{{item.star>=4?'/img/shixing.png':'/img/kongxing.png'}}"></image>
          </view>
          <view class="pingfenitem">
            <image src="{{item.star>=5?'/img/shixing.png':'/img/kongxing.png'}}"></image>
          </view>
        </view>

        <view class="pingfenname">{{item.star}}分</view>
      </view>

      <view class="pingimg">
        <view class="pingimgitem" wx:for="{{item.images}}" wx:key="">
          <image src="{{item}}"></image>
        </view>

      </view>
    </view>
  </view>

</view>

<view class="cartbottom">
  <view class="cartbottomleft" bindtap="gocart">
    <view class="cartbototmtopimg">
      <image src="/img/shop.png"></image>
      <view class="cartnum">{{count}}</view>
    </view>

    <view class="gouwucart">购物车</view>


  </view>

  <view class="cartright">
    <view class="cartleftname" bindtap="addcart">加入购物车</view>
    <view class="qianggou" bindtap="lijiqiang">立即抢购</view>
  </view>
</view>

<!-- 选择商品属性 -->
<view class="registerk">
  <view class="naturewrap">
  <view class="naturebox">
   <view class="naturetop flexone">
      <view class="naturetopleft">
        <image src="{{goodtail.image}}"></image>
      </view>
      <view class="naturetopright">
        <view class="goodprice">¥{{goodtail.price}}</view>
        <view class="naturestock">库存:{{goodtail.inventory}}件</view>
        <view class="natureshu">{{standard}}</view>
      </view>
    </view>
    <view class="sizebox">
    <view class="size" wx:for='{{goodtail.standard}}' wx:key="" wx:for-item="standarditem" wx:if="{{goodtail.standard!=null}}" wx:for-index="bindex" >
      <view class="sizetop">{{standarditem.name}}</view>
      <view class="sizebox flexone">
        <view class="coloritem {{standarditem.selindex==index?'itemactive':''}}" wx:for='{{standarditem.value}}' wx:key="" bindtap="selattr" data-index="{{index}}" data-bindex="{{bindex}}" data-name="{{item}}">{{item}}</view>
        
      </view>
    </view>
    </view>
    
    

    <view class="buynum flextwo">
      <view class="buymumleft">购买数量</view>
      <view class='buynumright flexone'>
        <view class="buynumreduce" bindtap="reducenum">
          <image src="/img/buyreduce.png"></image>
        </view>
        <view class="numname">{{buynum}}</view>
        <view class="buynumreduce" bindtap="addnum">
          <image src="/img/buyadd.png"></image>
        </view>
      </view>
    </view>

    <view class="naturetop flexone">
      <view class="naturetopleft">
        <image src="{{goodtail.gift.image}}"></image>
      </view>
      <view class="naturetopright">
        <view class="goodprice">{{goodtail.gift.goods_name}}</view>
        <view class="naturestock">库存:{{goodtail.gift.inventory}}件</view>
        <view class="natureshu">{{giftstandard}}</view>
      </view>
    </view>

    <view>
    <view class="size" wx:for="{{goodtail.gift.standard}}" wx:if='{{goodtail.gift.standard!=null}}' wx:for-item="standarditem" wx:for-index="bindex">
      <view class="sizetop">{{standarditem.name}}</view>
      <view class="sizebox flexone">
        <view class="coloritem {{standarditem.selindex==index?'itemactive':''}}" wx:for='{{standarditem.value}}' wx:key=""  bindtap="selgiftattr" data-index="{{index}}" data-bindex="{{bindex}}" data-name="{{item}}">{{item}}</view>


      </view>
    </view>
    </view>
    
  </view>
   

    <view class="cartbottom boxcartbot">
      <view class="cartbottomleft" bindtap="gocart">
        <view class="cartbototmtopimg">
          <image src="/img/shop.png"></image>
          <view class="cartnum">{{count}}</view>
        </view>

        <view class="gouwucart">购物车</view>


      </view>

      <view class="cartright">
        <view class="cartleftname" bindtap="addcart">加入购物车</view>
        <view class="qianggou" bindtap="lijiqiang">立即抢购</view>
      </view>
    </view>

  </view>
</view>