shop_item.wxml 2.3 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">
            <!-- 2023-10-19 需求要将积分改为微信支付的金额 -->
            <!-- <view class="name">积分</view> -->
            <text wx:if='{{item.product.price2!=null||item.price2!=null}}'>¥{{type == 3 || type == 2?item.price2:item.product.price2}}</text>
            <text wx:else>¥{{type == 3 || type == 2?item.goods_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 class="oldprice" wx:if="{{item.product.price2!=null||item.price2!=null}}">{{item.product.price||item.price}}</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>