Files
qipai/miniapp/pages/index/index.wxml
T
2026-06-24 21:42:02 +08:00

23 lines
1.2 KiB
Plaintext

<scroll-view class="scrollarea" scroll-y type="list">
<view class="container">
<view class="title">选择门店</view>
<button bindtap="openOrders">我的订单</button>
<button loading="{{locating}}" bindtap="locateNearby">定位附近门店</button>
<view class="city-search">
<input value="{{city}}" placeholder="拒绝定位时输入城市" bindinput="onCityInput" />
<button size="mini" loading="{{loading}}" bindtap="searchByCity">查询</button>
</view>
<view wx:if="{{errorMessage}}" class="error">{{errorMessage}}</view>
<view wx:if="{{!loading && stores.length === 0}}" class="empty">暂无门店</view>
<view wx:for="{{stores}}" wx:key="id" class="store-card" bindtap="openStore" data-store-id="{{item.id}}">
<view class="store-name">{{item.name}}</view>
<view>{{item.city}}{{item.district}} {{item.address}}</view>
<view wx:if="{{item.distanceMeters !== null}}">距离 {{item.distanceMeters}} 米</view>
<view class="{{item.openNow ? 'open' : 'closed'}}">
{{item.openNow ? '营业中' : '休息中'}}
</view>
<view class="card-action">查看房间</view>
</view>
</view>
</scroll-view>