shopping-cart.wxml 5.5 KB
<!--pages/shopping-cart/shopping-cart.wxml-->
<view class="container" wx:if="{{Authorization}}">
  <!-- 地址 -->
  <view class="userInfo" bindtap="goAddress1">
    <view style="display:flex;align-items: center;">
      <view wx:if="{{userData!==''}}" style="width:95%">
        <view class="userName">{{userData.name}}</view>
        <view class="userTell">{{userData.phone}}</view>
        <view class="default" wx:if="{{userData.delFlag==1}}">默认</view>
        <view class="userAddress">{{userData.area}}{{userData.address}}</view>
      </view>
      <view wx:if="{{userData==''}}" class="noAdd">
        请选择收货地址
      </view>
      <view class="arrow">
        <image src="/images/04-01/arrow.png"></image>
      </view>
    </view>
  </view>
  <!-- 配送时间 -->
  <view class="timeBox">
    <view style="display:flex">
      <view class="calendar " bindtap='chooseTime'>
        <view style="display: flex;align-items: center;">
          <image src="/images/04-01/rili.png"></image>
        </view>
        <view wx:if="{{storePickupTime==''}}"> 请选择配送时间</view>
        <view wx:if="{{storePickupTime!==''}}"> 配送时间</view>
      </view>
      {{storePickupTime}}
    </view>
    <!-- <view class="arrow1" style="width:94%">
      <image src="/images/04-01/arrow.png"></image>
    </view> -->
    <view class="section">
      <van-popup show="{{ showTime }}" bind:close="onClose" position="bottom">
        <timepicker deliveryTime='{{deliveryTime}}' bind:selectTime="selectTime" id="timePicker"></timepicker>
      </van-popup>
    </view>
  </view>

  <!-- 购物车 -->
  <view class="main">
    <view wx:if="{{hasList}}">
      <view class="cart-box">
        <view class="cart-list" wx:for="{{carts}}" wx:key="{{index}}" data-goodsid="{{item.goodsId}}" bindtap="goDetail"
          bindlongpress="delGoods" data-index="{{index}}" data-cartId="{{item.cartId}}">
          <icon wx:if="{{item.selected}}" type="success" color="#FF4903" data-index="{{index}}" class="cart-pro-select"
            catchtap="selectList" />
          <icon wx:else type="circle" class="cart-pro-select" data-index="{{index}}" catchtap="selectList" />
          <navigator url="../details/details?id={{item.id}}">
            <image class="cart-thumb" src="{{item.goodsImg}}"></image>
          </navigator>
          <text class="cart-pro-name">{{item.goodsName}}</text>
          <text class="cart-pro-desc">{{item.goodsAttributes}}</text>
          <text class="cart-pro-price">¥{{item.goodsPrice}}</text>
          <view class="cart-count-box">
            <text class="cart-count-down" catchtap="minusCount" data-obj="{{obj}}" data-index="{{index}}"
              data-goodSkuId="{{item.goodsSkuId}}">-</text>
            <text class="cart-count-num">{{item.num}}</text>
            <text class="cart-count-add" catchtap="addCount" data-index="{{index}}"
              data-goodSkuId="{{item.goodsSkuId}}">+</text>
          </view>
        </view>
      </view>

    </view>
    <!-- <view wx:if="{{carts.length==0}}"> -->
    <view wx:if="{{!hasList}}">
    <!-- <view wx:if="{{cartnoData}}"> -->
      <view class="cart-no-data">一件商品都没有呢</view>
      <view class="cart-no-data-btn" bindtap="goHome">去逛逛</view>
    </view>
  </view>
  <!-- 猜你喜欢 -->
  <view class="like">
    <view class="titleMain">
      <view class="icon"></view>
      <view class="title">{{title}}</view>
    </view>
    <view class="listTable">
      <view class="listSon" wx:for="{{list}}" bindtap="goGoodsDetail" data-id="{{item.goodsId}}">
        <view class="listPic">
          <image src="{{item.goodsImg}}"></image>
        </view>
        <view class="listTitle">{{item.goodsName}}</view>
        <view class="collect">{{item.goodsAttributes}}</view>
        <view class="discount">
          <view class="discountTitle"></view>
          <view class="discountPic">
            ¥{{item.goodsPrice}}
          </view>
        </view>
      </view>
    </view>

    <view class="bottomHint" wx:if="{{bottomHint}}">
      我是有底线的~
    </view>
  </view>
  <!-- 立即购买 -->
  <view class="bottom">
    <!-- <view class="checkPic">
      <image src="/images/04-01/uncheck.png"></image>
    </view> -->
    <view class="checkText">
      已选({{checkNum}})
    </view>
    <view class="totalText">合计:</view>
    <view class="totalPrice">
      <view class="icon">¥</view>
      <view class="number">{{totalPrice}}</view>
    </view>
    <view class="buyText" catchtap='immediatelyPay'>
      立即购买
    </view>
  </view>
</view>
<!-- 没登录 -->
<view wx:if="{{!Authorization}}" class="noToken">
  <view class="logBox">
    <text class="logText1" bindtap="login">登录</text>
    <text class="logText2">后同步您购物车的商品</text>
  </view>
  <view class="noGoodPic">
    <image src="/images/message@2x.png"></image>
    购物车里空空如也~
  </view>
</view>
<!-- tabbar -->
<!-- <view class="tabbarBox" >
	<ul>
		<li>
			<view class="tabbarPic" bindtap="toHome">
				<image src="/images/tab/home.png"></image>
			</view>
			<text bindtap="toHome">首页</text>
		</li>
		<li>
			<view class="tabbarPic" bindtap="toClassify">
				<image src="/images/tab/classify (2).png"></image>
			</view>
			<text bindtap="toClassify">分类</text>
		</li>
		<li>
			<view class="tabbarPic">
				<image src="/images/tab/cart.png"></image>
			</view>
			<text class="check">购物车</text>
		</li>
		<li>
			<view class="tabbarPic" bindtap="toUser">
				<image src="/images/tab/user.png"></image>
			</view>
			<text bindtap="toUser">我的</text>
		</li>
	</ul>
</view> -->