51 lines
2.2 KiB
Plaintext
51 lines
2.2 KiB
Plaintext
<navigation-bar title="店铺管理" back="{{true}}" color="#f6efe7" background="#081518"></navigation-bar>
|
|||
|
|
|
||
|
|
<view class="page-shell">
|
||
|
|
<view class="page-stack">
|
||
|
|
<view class="surface-card">
|
||
|
|
<text class="section-title">店铺列表</text>
|
||
|
|
<view class="search-row">
|
||
|
|
<input class="field-input search-input" placeholder="按店铺名搜索" placeholder-class="placeholder" value="{{keyword}}" bindinput="handleKeywordInput" confirm-type="search" bindconfirm="handleSearch"></input>
|
||
|
|
<button class="secondary-btn" bindtap="handleSearch">搜索</button>
|
||
|
|
</view>
|
||
|
|
</view>
|
||
|
|
|
||
|
|
<block wx:for="{{list}}" wx:key="id">
|
||
|
|
<view class="list-card">
|
||
|
|
<view class="list-head">
|
||
|
|
<view>
|
||
|
|
<text class="list-title">{{item.shopName}}</text>
|
||
|
|
<text class="list-subtitle">{{item.address || '暂无地址'}}</text>
|
||
|
|
</view>
|
||
|
|
<text class="{{item.status === 0 ? 'danger-badge' : 'badge'}}">{{item.displayStatusText}}</text>
|
||
|
|
</view>
|
||
|
|
<view class="meta-grid">
|
||
|
|
<view class="meta-item">
|
||
|
|
<text class="meta-label">营业时间</text>
|
||
|
|
<text class="meta-value">{{item.businessHours || '--'}}</text>
|
||
|
|
</view>
|
||
|
|
<view class="meta-item">
|
||
|
|
<text class="meta-label">描述</text>
|
||
|
|
<text class="meta-value">{{item.description || '暂无描述'}}</text>
|
||
|
|
</view>
|
||
|
|
</view>
|
||
|
|
<view class="list-actions">
|
||
|
|
<view class="mini-btn primary" data-shop="{{item}}" bindtap="handleEdit">编辑</view>
|
||
|
|
<view class="mini-btn" data-shop="{{item}}" bindtap="handleStatus">{{item.status === 0 ? '启用' : '停用'}}</view>
|
||
|
|
</view>
|
||
|
|
</view>
|
||
|
|
</block>
|
||
|
|
|
||
|
|
<view wx:if="{{loading && !list.length}}" class="empty-state">
|
||
|
|
<text class="empty-title">正在加载店铺列表</text>
|
||
|
|
</view>
|
||
|
|
|
||
|
|
<view wx:elif="{{!list.length}}" class="empty-state">
|
||
|
|
<text class="empty-title">暂无店铺</text>
|
||
|
|
<text class="empty-desc">如果这是首次部署后的无店铺管理员登录,可以直接在这里创建第一家店铺。</text>
|
||
|
|
</view>
|
||
|
|
|
||
|
|
<view wx:if="{{canCreate}}" class="fab" bindtap="handleCreate">+</view>
|
||
|
|
</view>
|
||
|
|
</view>
|