重构项目文件夹目录

This commit is contained in:
2026-06-15 15:53:55 +08:00
parent 8093e07190
commit 7cbe5b3de5
1098 changed files with 34 additions and 4441 deletions
@@ -0,0 +1,25 @@
Page({
data: {
id: '',
avatarText: '客',
customer: { name: '王女士', phone: '138****1201' },
stats: { orderCount: 12, amount: 2860, lastTime: '06-01' },
orders: [
{ id: 1, date: '2026-06-01', project: '纯色美甲', amount: 168, artist: '小王' },
{ id: 2, date: '2026-05-18', project: '猫眼延长', amount: 268, artist: '小李' },
{ id: 3, date: '2026-05-02', project: '手部护理', amount: 98, artist: '小张' }
]
},
onLoad(options) {
this.setData({ id: options.id || '' })
},
createAppointment() {
wx.navigateTo({ url: '/pages/appointment-form/index' })
},
back() {
wx.navigateBack()
}
})
@@ -0,0 +1,3 @@
{
"navigationBarTitleText": "客户详情"
}
@@ -0,0 +1,40 @@
<view class="page no-tab">
<view class="card customer-head">
<view class="customer-identity">
<view class="avatar">{{avatarText}}</view>
<view>
<text class="customer-name">{{customer.name}}</text>
<text class="customer-phone">{{customer.phone}}</text>
</view>
</view>
<button class="small-action" bindtap="createAppointment">新预约</button>
</view>
<view class="stats">
<view class="card stat">
<text class="stat-value">{{stats.orderCount}}</text>
<text class="stat-label">累计订单</text>
</view>
<view class="card stat">
<text class="stat-value">¥{{stats.amount}}</text>
<text class="stat-label">累计消费</text>
</view>
<view class="card stat">
<text class="stat-value">{{stats.lastTime}}</text>
<text class="stat-label">最近消费</text>
</view>
</view>
<view class="section">
<view class="section-title">历史订单</view>
<view class="list">
<view wx:for="{{orders}}" wx:key="id" class="card list-card order-card">
<view>
<text class="order-title">{{item.project}}</text>
<text class="meta">{{item.date}} · {{item.artist}}</text>
</view>
<text class="amount">¥{{item.amount}}</text>
</view>
</view>
</view>
</view>
@@ -0,0 +1,89 @@
.customer-head {
display: flex;
align-items: center;
justify-content: space-between;
gap: 18rpx;
padding: 24rpx;
}
.customer-identity {
display: flex;
align-items: center;
min-width: 0;
gap: 18rpx;
}
.avatar {
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
width: 84rpx;
height: 84rpx;
border-radius: 50%;
background: #e5eee9;
color: #5b7f73;
font-size: 32rpx;
font-weight: 900;
}
.customer-name,
.customer-phone {
display: block;
}
.customer-name {
font-size: 32rpx;
font-weight: 800;
}
.customer-phone {
margin-top: 8rpx;
color: #928a81;
font-size: 24rpx;
}
.stats {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 14rpx;
margin-top: 18rpx;
}
.stat {
padding: 16rpx 12rpx;
}
.stat-value,
.stat-label {
display: block;
}
.stat-value {
color: #26231f;
font-size: 28rpx;
font-weight: 800;
}
.stat-label {
margin-top: 8rpx;
color: #91897f;
font-size: 20rpx;
}
.order-card {
display: flex;
align-items: center;
justify-content: space-between;
}
.order-title {
display: block;
font-size: 28rpx;
font-weight: 800;
}
.amount {
color: #6f8f83;
font-weight: 900;
}