123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208 |
- <!--nova-tourism/components/template2/shop/index.wxml-->
- <nav type="location" title="商超店铺" frontColor="#ffffff" background-color="#f39283" />
- <view class="flexd" wx:if="{{!show}}">
- <view class="nav-background"></view>
- <view class="nav-info">
- <view class="info-top" bind:tap="selectStore">
- <view class="top-left">
- <view>
- <image
- src="{{store.cover ? store.cover : 'https://file-cloud.fmode.cn/sHNeVwSaAg/20220823/n1ei8h103147.png'}}"
- mode="aspectFill" style="width: 90rpx;height: 90rpx;border-radius: 100rpx;" />
- </view>
- <view class="name-distance">
- <view class="name">{{store.storeName ? store.storeName : '请选择店铺'}}</view>
- <view class="distance" wx:if="{{store.distance}}">该店铺距离您{{store.distance}}km</view>
- </view>
- </view>
- <view class="top-right">
- <view>
- <view>
- <image src="https://file.ruixiuauto.com/cDBRXuM6Xh/20230809/jirkaj100203799.png"
- style="width: 22rpx;height: 22rpx;" />
- </view>
- <view class="right-info">联系方式:{{store.mobile ? store.mobile : '暂无联系方式' }}</view>
- </view>
- <view>
- <view>
- <image src="https://file.ruixiuauto.com/cDBRXuM6Xh/20230809/bp3f3p100156488.png"
- style="width: 22rpx;height: 22rpx;" />
- </view>
- <view class="right-info">营业时间:{{store.workingTime ? store.workingTime : '暂未设置营业时间'}}</view>
- </view>
- </view>
- </view>
- <view class="v-search">
- <van-search model:value="{{ value }}"
- left-icon="https://file.ruixiuauto.com/cDBRXuM6Xh/20230809/eg1pes093404417.png" background="transparent"
- placeholder="搜索你想要的生活" shape="round" use-action-slot bind:change="search" bind:search="search">
- </van-search>
- </view>
- </view>
- </view>
- <view style="height: 275rpx;"></view>
- <view class="cate_info" style="height:1000rpx;">
- <view class="cate_container">
- <scroll-view class="left_menu" scroll-y
- style="height:calc(100vh - {{2 * (customBarHeight + screenHeight - bottom) + 50 + 340}}rpx)">
- <view class="left_content">
- <view class="left_item {{activeItem == 'all' ? 'active' : ''}}" data-id="all" bind:tap="changeCate">
- 全部
- </view>
- <view class="left_item {{activeItem == item.objectId ? 'active' : ''}}" wx:for="{{category}}" wx:key="index"
- data-id="{{item.objectId}}" bind:tap="changeCate">
- {{item.name}}
- </view>
- </view>
- </scroll-view>
- <!-- bindscrolltolower="scrolltolower" -->
- <scroll-view class="right_list" scroll-y="{{true}}" scroll-top="{{scrollTop}}"
- style="height:calc(100vh - {{2 * (customBarHeight + screenHeight - bottom) + 50+ 340}}rpx)"
- >
- <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}}">
- <swiper class="right_swiper" indicator-dots>
- <block wx:for="{{banner}}" wx:key="index">
- <swiper-item>
- <image src="{{item.image}}" style="height: 220rpx;border-radius: 12rpx;width: 528rpx;">
- </image>
- </swiper-item>
- </block>
- </swiper>
- <!-- <view class="title" wx:if="{{activeItem == 'all'}}">{{item.category.name}}</view> -->
- <view class="play-list">
- <block wx:for="{{goods}}" wx:key="index">
- <view class="play-item" bindtap="goUrl"
- data-url="/nova-tourism/pages/home/village/village-details/index?id={{item.objectId}}">
- <view>
- <image src="{{item.image}}" style="width: 246rpx;height: 250rpx;border-radius: 12rpx;" />
- </view>
- <view class="body">
- <view class="item-text">
- {{item.name}}</view>
- <view class="label">
- <block wx:for="{{item.tag}}" wx:for-item="tag" wx:key="*this" wx:for-index="i">
- <view>{{tag}}</view>
- </block>
- </view>
- <view class="detail">
- <view class="d-light">¥{{item.price}}</view>
- <view wx:if="{{!active && !item.total}}">
- <image bind:tap="onTips" src="https://file-cloud.fmode.cn/sHNeVwSaAg/20230811/31ljt6092632004.png"
- style="width: 40rpx;height: 40rpx;" />
- </view>
- <view wx:else>
- <image bind:tap="addCount" data-index="{{index}}"
- src="https://file-cloud.fmode.cn/sHNeVwSaAg/20230811/31ljt6092632004.png"
- style="width: 40rpx;height: 40rpx;" />
- </view>
- </view>
- </view>
- </view>
- </block>
- </view>
- <!-- <view class="right_item" data-id="{{item.objectId}}">
- <image class="image" src="{{item.image}}" mode="aspectFill" />
- <view class="li_right">
- <view class="name">{{item.name}}</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="#999" 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 wx:else>
- <van-empty description="暂无商品" />
- </view>
- </scroll-view>
- </view>
- </view>
- <view class="shopcart">
- <view class="price">
- <view style="position: relative;">
- <view class="total" wx:if="{{shopCart.length > 0}}">{{shopCart.length}}</view>
- <image src="https://file-cloud.fmode.cn/sHNeVwSaAg/20220824/a18ee1095119.png"
- style="width: 64rpx;height: 64rpx;" />
- </view>
- <view class="sum">¥{{totalPrice ? totalPrice : 0}}</view>
- </view>
- <view class="cart-btn"><button bind:tap="checkCart">我要付款</button></view>
- </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>
|