统一店务小程序主导航视觉与信息层级

This commit is contained in:
2026-07-25 16:47:12 +08:00
parent 67d493be85
commit 87862a3c36
9 changed files with 161 additions and 30 deletions
+1
View File
@@ -32,6 +32,7 @@ Page({
customers: list.map(item => ({
id: item.id,
name: item.nickname || item.name || item.account || '客户',
shortName: (item.nickname || item.name || item.account || '客户').slice(-1),
phone: item.contactPhone || item.phone || '未填写',
lastTime: item.lastOrderTime || item.lastConsumeTime || '-'
}))
+11 -5
View File
@@ -3,7 +3,7 @@
<view class="search-card card">
<input value="{{keyword}}" bindinput="onSearchInput" placeholder="搜索客户姓名或手机号" />
</view>
<button class="compact-btn" bindtap="addCustomer">新增</button>
<button class="compact-btn add-customer-btn" bindtap="addCustomer">+</button>
</view>
<view class="list section">
@@ -13,10 +13,16 @@
</view>
<view wx:elif="{{customers.length === 0}}" class="empty card">暂无客户</view>
<view wx:for="{{customers}}" wx:key="id" class="card list-card customer-card" data-id="{{item.id}}" bindtap="openDetail">
<view>
<text class="name">{{item.name}}</text>
<text class="meta">{{item.phone}}</text>
<text class="meta">最近消费 {{item.lastTime}}</text>
<view class="customer-identity">
<view class="customer-avatar">{{item.shortName}}</view>
<view class="customer-copy">
<view class="customer-name-row">
<text class="name">{{item.name}}</text>
<text class="customer-status">已建档</text>
</view>
<text class="meta">{{item.phone}}</text>
<text class="meta">最近消费 {{item.lastTime}}</text>
</view>
</view>
<text class="arrow">›</text>
</view>
+69 -1
View File
@@ -2,6 +2,7 @@
display: flex;
align-items: center;
gap: 14rpx;
margin-bottom: 8rpx;
}
.search-card {
@@ -10,6 +11,9 @@
height: 84rpx;
display: flex;
align-items: center;
border-color: rgba(111, 143, 131, 0.12);
background: rgba(255, 255, 255, 0.82);
box-shadow: 0 8rpx 22rpx rgba(78, 96, 78, 0.05);
}
.search-card input {
@@ -17,10 +21,74 @@
font-size: 26rpx;
}
.add-customer-btn {
width: 84rpx;
min-width: 84rpx;
max-width: 84rpx;
height: 84rpx;
min-height: 84rpx;
padding: 0;
border-radius: 50%;
background: #6f8f83;
color: #fffdf8;
font-size: 42rpx;
font-weight: 400;
line-height: 84rpx;
box-shadow: 0 10rpx 22rpx rgba(111, 143, 131, 0.2);
}
.customer-card {
display: flex;
align-items: center;
justify-content: space-between;
padding: 22rpx 20rpx;
border-color: rgba(111, 143, 131, 0.1);
background: rgba(255, 255, 255, 0.86);
box-shadow: 0 8rpx 20rpx rgba(78, 96, 78, 0.045);
}
.customer-identity {
display: flex;
align-items: center;
min-width: 0;
gap: 18rpx;
}
.customer-avatar {
display: flex;
align-items: center;
justify-content: center;
flex: 0 0 auto;
width: 76rpx;
height: 76rpx;
border: 4rpx solid #f4faf2;
border-radius: 50%;
background: #dcece0;
color: #4f8068;
font-size: 30rpx;
font-weight: 900;
}
.customer-copy {
min-width: 0;
}
.customer-name-row {
display: flex;
align-items: center;
gap: 10rpx;
}
.customer-status {
display: inline-flex;
align-items: center;
min-height: 32rpx;
padding: 0 10rpx;
border-radius: 999rpx;
background: #eff7ef;
color: #6a9876;
font-size: 18rpx;
font-weight: 800;
}
.name,
@@ -30,7 +98,7 @@
.name {
color: #292520;
font-size: 30rpx;
font-size: 29rpx;
font-weight: 800;
}