shop_item.wxml 2.3 KB
<view class="item" wx:for="{{list}}" wx:key="index">
  <view class="top"  bindtap="lookdetail" data-id="{{item.goods_id}}">
    <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.image:type==4?item.image:type==2?item.image:item.image}}" mode="aspectFill" bindtap="{{type == 1 || type == 2?'look_detail':''}}" data-id="{{item.product_id}}"  />
      <view class="right {{type==3||type==1||type==4?'ractive':''}}">
        <!-- <view class="word">{{type == 3||type==1||type==4?item.name:type==2?item.product_name:item.product.name}}</view> -->
        <view class="word">{{item.name}}</view>
        <view class="guige">
            <view class="guigeitem" wx:for="{{item.spec}}" wx:key="index">{{item.spec_name}}:{{item.spec_value}}</view>
        </view>
        <view class="info">
          <view class="jifen">
            <text wx:if="{{type==1}}">{{item.goods_price}}</text>
                 <text wx:if="{{type==2}}">{{item.goods.min_goods_price}}</text>
            <text style="margin-left: 10rpx;color:#ccc;font-size: 28rpx;" wx:if="{{type == 3 || type == 4}}">X{{item.number}}</text>
          </view>
          <view class="num_box" wx:if="{{type == 1}}"> 
            <image class="num_btn" src="/images/reduce.png" data-index="{{index}}" data-type="2" data-num="{{item.number}}" data-id="{{item.car_id}}" data-product_id="{{item.id}}"  catchtap="num_change"  data-specid="{{item.spec_sku_id}}"/>
            <text>{{item.number}}</text>
            <image class="num_btn" src="/images/add.png" data-index="{{index}}" data-type="1" data-num="{{item.number}}" data-id="{{item.car_id}}" data-specid="{{item.spec_sku_id}}" data-product_id="{{item.id}}" catchtap="num_change"/>
          </view>
        </view>
      </view>
    </view>
  </view>
  <view class="info_box" wx:if="{{type == 3}}">
    <view class="f_item">
      <view class="shop" bindtap="enter">
        商品积分
        <text wx:if="{{item.price2!=null}}">{{item.price2*100*item.num/100}}积分</text>
         <text wx:else>{{item.price*100*item.num/100}}积分</text>
      </view>
    </view>
  </view>
</view>