shop_item.wxml 1.8 KB
<view class="item" wx:for="{{list}}" wx:key="index">
  <view class="top">
    <image class="check_box" src="{{item.check_type?'/images/check@.png':'/images/check.png'}}" wx:if="{{type == 1 || type == 2}}" catchtap="check_item" data-check_type="{{item.check_type}}" data-index="{{index}}" />
    <view class="content {{type==3?'active':''}}">
      <image class="show_img" src="{{type == 3?item.images[0]:type==4?item.product.images[0]:type==2?item.image:item.product.allimages[0]}}" mode="aspectFill" bindtap="{{type == 1 || type == 2?'look_detail':''}}" data-id="{{item.product_id}}"/>
      <view class="right {{type==3?'ractive':''}}">
        <view class="word">{{type == 3?item.name:type==2?item.product_name:item.product.name}}</view>
        <view class="info">
          <view class="jifen">
            <view class="name">积分</view>
            <text>{{type == 3 || type == 2?item.price:item.product.price}}</text>
            <text style="margin-left: 10rpx;color:#ccc;font-size: 28rpx;" wx:if="{{type == 3 || type == 4}}">X{{item.num}}</text>
          </view>
          <view class="num_box" wx:if="{{type == 1}}">
            <image class="num_btn" src="/images/reduce.png" data-index="{{index}}" data-type="0" data-num="{{item.num}}" data-id="{{item.id}}" data-product_id="{{item.product_id}}" catchtap="num_change" />
            <text>{{item.num}}</text>
            <image class="num_btn" src="/images/add.png" data-index="{{index}}" data-type="1" data-num="{{item.num}}" data-id="{{item.id}}" data-product_id="{{item.product_id}}" catchtap="num_change"/>
          </view>
        </view>
      </view>
    </view>
  </view>
  <view class="info_box" wx:if="{{type == 3}}">
    <view class="f_item">
      <view class="shop">
        商品积分
        <text>{{item.price*100*item.num/100}}积分</text>
      </view>
    </view>
  </view>
</view>