123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154 |
- <!-- <swiper class="swiper" indicator-dots="true" autoplay="true">
- <swiper-item wx:for="{{imgUrls}}" wx:key="index">
- <image src="{{item}}" class="slide-image" mode="aspectFill" />
- </swiper-item>
- </swiper> -->
- <headerCard imgUrls="{{banner}}" title='商超预定'></headerCard>
- <view class="store" date-store="{{store.objectId ? store.objectId : ''}}">
- <view class="cover" bind:tap="selectStore">
- <image src="{{store.cover ? store.cover : 'https://file-cloud.fmode.cn/sHNeVwSaAg/20220823/n1ei8h103147.png'}}" mode="aspectFill"></image>
- </view>
- <view class="storeInfo" bind:tap="selectStore">
- <view class="storeInfo_left">
- <view class="name">
- {{store.storeName ? store.storeName : '请选择店铺'}}
- <!-- <van-icon name="arrow" /> -->
- </view>
- <view class="add">
- {{store.address ? store.address : '暂无店铺地址'}}
- <!-- <van-icon name="arrow" /> -->
- </view>
- </view>
- <view class="storeInfo_right">
- <view class="mobile">
- <image src="https://file-cloud.fmode.cn/sHNeVwSaAg/20230812/89brc6034149394.png?imageView2/1/w/200/h/200" style="height: 21rpx;width: 21rpx;"></image>
- 联系方式:{{store.mobile ? store.mobile : '暂无联系方式' }}
- </view>
- <view class="opening">
- <image src="https://file-cloud.fmode.cn/sHNeVwSaAg/20230812/6hmule034139186.png?imageView2/1/w/200/h/200" style="height: 21rpx;width: 21rpx;"></image>
- 营业时间:{{store.workingTime ? store.workingTime : '暂未设置营业时间'}}
- </view>
- </view>
- </view>
- <view class="shopCart" bind:tap="checkCart">
- <image src="https://file-cloud.fmode.cn/sHNeVwSaAg/20220824/a18ee1095119.png" mode="aspectFill"></image>
- <view class="total" wx:if="{{shopCart.length > 0}}">{{shopCart.length}}</view>
- </view>
- </view>
- <!-- 导航 -->
- <view class="tabs">
- <view class="tab {{activeItem == 'all' ? 'tabIndex' : ''}}" data-id="all" bind:tap="changeCate">全部
- <view class="borderRadius" wx:if="{{activeItem == 'all' ? 'tabIndex' : ''}}"></view>
- </view>
- <view class="tab {{activeItem == item.objectId ? 'tabIndex' : ''}}" wx:for="{{category}}" wx:key="index" data-id="{{item.objectId}}" bind:tap="changeCate" >{{item.name}}
- <view class="borderRadius" wx:if="{{activeItem == item.objectId ? 'tabIndex' : ''}}"></view>
- </view>
- </view>
- <!-- 商品 -->
- <view class="loading" wx:if="{{loading}}">
- <van-loading type="spinner" size='60rpx' vertical>加载中...</van-loading>
- </view>
- <view class="right_content" wx:elif="{{goods && goods.length > 0}}">
- <view class="goods_box" wx:for="{{goods}}" wx:key="index">
- <!-- <view class="title" wx:if="{{activeItem == 'all'}}">{{item.category.name}}</view> -->
- <view class="goods_item" data-id="{{item.objectId}}">
- <view class="image">
- <image class="image" src="{{item.image}}" mode="aspectFill" />
- </view>
- <view class="content">
- <view class="name">{{item.name}}</view>
- <view class="tags">
- <text wx:for="{{item.tag}}" wx:key="index" wx:for-item="tag">{{tag}}</text>
- </view>
- <view class="li_desc">{{item.desc ? item.desc : '暂无零食介绍~'}}</view>
- <!-- <view class="li_num">
- <view class="li_desc_row">销量 {{item.sales}}</view>
- <view class="li_desc_row" wx:if="{{!active}}">库存 {{item.total}}</view>
- </view> -->
- <view class="li_row">
- <view class="price">
- ¥{{item.price}}
- <!-- <view class="decoration">
- {{item.originalPrice ? item.originalPrice : item.price}}
- </view> -->
- </view>
- <view class="count">
- <van-icon wx:if="{{!active && !item.total}}" color="yellowgreen" name="add" class="tag" bind:tap="onTips" />
- <van-icon wx:else name="add" class="tag" data-index="{{index}}" bind:tap="addCount" />
- </view>
- </view>
- </view>
- </view>
- </view>
-
- <view style="height: 300rpx;"></view>
- </view>
- <view style="width: 100%;" wx:else>
- <van-empty description="暂无商品" />
- </view>
- <!-- 购物车 -->
- <van-popup show="{{ show }}" bind:close="onClose" round closeable close-icon-position="top-right" position="bottom" custom-style="height: 60%;">
- <view class="shopGoods">
- <view class="title" style="bottom:{{screenHeight - bottom }}px">购物车</view>
- <view class="loading" wx:if="{{cartLoading}}">
- <van-loading type="spinner" size='60rpx' vertical>加载中...</van-loading>
- </view>
- <block wx:if="{{shopCart.length > 0}}">
- <scroll-view scroll-y="{{true}}" style="height: 100% - 80rpx;padding-bottom: 200rpx;">
- <van-notice-bar color="#1989fa" background="#ecf9ff" left-icon="info-o" text="向右滑动删除商品即可移出购物车" />
- <view class="goods" wx:for="{{orderGoods}}" wx:key="index">
- <van-radio-group value="{{ radio }}" bind:change="onChange">
- <van-swipe-cell right-width="{{ 65 }}" data-index="{{index}}" data-id="{{item.objectId}}" async-close bind:close="delete">
- <view class="cart_info">
- <view class="left_info">
- <radio class="radio" wx:if="{{!item.open}}" disabled color="#fd4441" />
- <radio class="radio" bindtap="checkItem" wx:else data-index="{{index}}" checked="{{item.check}}" color="#fd4441" />
- <view class="image_box">
- <view class="open" wx:if="{{!item.open}}">该店铺库存不足</view>
- <image class="image" src="{{item.image}}" mode="aspectFill" lazy-load="false" />
- </view>
- </view>
- <view class="right_info">
- <view class="title">{{item.name}}</view>
- <view class="down_info">
- <view class="price">¥{{item.totalPrice}}</view>
- <van-stepper value="{{item.count}}" min="1" max="100" disable-input="true" input-class="ipt" data-index="{{index}}" bind:plus="plus" bind:minus="minus" bind:change="onChange" />
- </view>
- </view>
- </view>
- <view slot="right" class="delete">删除</view>
- </van-swipe-cell>
- </van-radio-group>
- </view>
- </scroll-view>
- <view class="cart_down" style="--bottom:{{screenHeight - bottom }}px">
- <view class="cart_left">
- <label class="">
- <radio bindtap="checkAll" class="all_radio" checked="{{allCheck}}" color="#ef2a01" />
- </label>
- <view class="choose">全选</view>
- </view>
- <view class="cart_right">
- <view class="total_info">
- <view class="total_price">合计:¥{{totalPrice ? totalPrice : 0}}</view>
- </view>
- <button bindtap="{{totalPrice > 0 ? 'onDelete' : ''}}" class="button {{totalPrice > 0 ? 'actives' : ''}}">
- 删除
- </button>
- <button bindtap="submit" class="button {{totalPrice > 0 ? 'active' : ''}}">结算</button>
- </view>
- </view>
- </block>
- <block wx:else>
- <van-empty description="购物车空空如也~" />
- </block>
- </view>
- </van-popup>
- <view style="width: 750rpx; height: 300rpx;"></view>
|