style(小程序): 我的页身份胶囊与菜单重组、审核面板重构、客户新增悬浮按钮等页面视觉对齐设计稿
自动发布开发环境 Nacos 配置 / publish (push) Successful in 22s

This commit is contained in:
2026-11-06 11:36:04 +08:00
parent 3e51247312
commit 70f5462d88
14 changed files with 238 additions and 83 deletions
@@ -38,8 +38,8 @@
align-items: center;
justify-content: center;
flex-shrink: 0;
width: 82rpx;
height: 82rpx;
width: 85rpx;
height: 85rpx;
border-radius: 50%;
background: #e5f4ed;
color: #5d8175;
@@ -76,13 +76,14 @@
.call-btn {
flex-shrink: 0;
margin: 0;
padding: 0 18rpx;
border-radius: 999rpx;
background: #edf6ef;
padding: 0 16rpx;
border: 1rpx solid #247b63;
border-radius: 20rpx;
background: #ffffff;
color: #247b63;
font-size: 22rpx;
font-weight: 800;
line-height: 44rpx;
font-size: 21rpx;
font-weight: 600;
line-height: 40rpx;
}
.status-tag {
@@ -26,6 +26,44 @@
.backfill-page .customer-library-btn { width: 76rpx; min-width: 76rpx; height: 76rpx; border-radius: 18rpx; }
.backfill-page .service-status-section { padding-bottom: 24rpx; }
.backfill-page .submit-btn { width: 100%; }
.status-segment {
display: flex;
gap: 12rpx;
}
.status-option {
display: flex;
flex: 1;
align-items: center;
justify-content: center;
gap: 10rpx;
height: 68rpx;
border: 1rpx solid #e7ece9;
border-radius: 16rpx;
background: #f3f7f4;
color: #71807a;
font-size: 24rpx;
line-height: 1;
}
.status-option.active {
border-color: #9ccdbb;
background: #dff1e9;
color: #247b63;
font-weight: 700;
}
.status-indicator {
width: 16rpx;
height: 16rpx;
border-radius: 50%;
background: #c9a26a;
}
.status-indicator.in-service {
background: #247b63;
}
.backfill-manual-style-sheet { height: 70vh; }
@media (max-width: 360px) {
.backfill-page .customer-fields { gap: 6rpx; }
@@ -3,7 +3,7 @@
align-items: center;
justify-content: space-between;
gap: 18rpx;
padding: 24rpx;
padding: 27rpx;
}
.customer-identity {
@@ -51,7 +51,7 @@
}
.stat {
padding: 16rpx 12rpx;
padding: 18rpx 12rpx;
}
.stat-value,
@@ -75,6 +75,14 @@
display: flex;
align-items: center;
justify-content: space-between;
padding: 27rpx;
}
.meta {
display: block;
margin-top: 8rpx;
color: #928a81;
font-size: 25rpx;
}
.order-title {
+1 -1
View File
@@ -3,8 +3,8 @@
<view class="search-card card">
<input value="{{keyword}}" bindinput="onSearchInput" placeholder="搜索客户姓名或手机号" />
</view>
<button class="compact-btn" bindtap="addCustomer">新增</button>
</view>
<view class="fab" bindtap="addCustomer">+</view>
<view class="list section">
<view wx:if="{{loadError}}" class="empty card">
@@ -23,6 +23,25 @@
justify-content: space-between;
}
.fab {
position: fixed;
right: 28rpx;
bottom: 12rpx;
z-index: 40;
display: flex;
align-items: center;
justify-content: center;
width: 87rpx;
height: 87rpx;
border-radius: 44rpx;
background: #247b63;
box-shadow: 0 12rpx 28rpx rgba(36, 123, 99, 0.28);
color: #ffffff;
font-size: 48rpx;
font-weight: 400;
line-height: 1;
}
.name,
.meta {
display: block;
@@ -43,7 +43,7 @@ function createPage() {
async function run() {
const styles = fs.readFileSync(path.join(__dirname, 'index.wxss'), 'utf8')
assert(styles.includes('min-width: 0;'))
assert(styles.includes('flex-wrap: wrap;'))
assert(styles.includes('.review-main'))
assert(styles.includes('@media (max-width: 390px)'))
assert(styles.includes('text-overflow: ellipsis;'))
const employeesApi = require('../../api/employees')
+17 -9
View File
@@ -9,8 +9,14 @@
<view wx:if="{{isManager && reviewExpanded}}" class="review-panel card">
<view class="review-panel-head">
<view><text class="review-title">美甲师申请审核</text><text class="review-subtitle">仅显示当前门店待处理申请</text></view>
<text class="review-count">{{reviewPendingCount}} 项</text>
<view class="review-head-text">
<text class="review-title">美甲师申请审核</text>
<text class="review-subtitle">仅显示当前门店待处理申请</text>
</view>
<view class="review-head-actions">
<text class="review-count">{{reviewPendingCount}} 项</text>
<view class="review-collapse" bindtap="toggleReview"><text class="review-collapse-icon">︿</text></view>
</view>
</view>
<view wx:if="{{reviewLoading}}" class="review-state">正在加载申请…</view>
<view wx:elif="{{reviewError}}" class="review-state review-error">
@@ -20,13 +26,15 @@
<view wx:elif="{{reviewApplications.length === 0}}" class="review-state">暂无待审核美甲师申请</view>
<view wx:else class="review-list">
<view wx:for="{{reviewApplications}}" wx:key="id" class="review-item">
<image class="review-avatar" src="{{item.applicantAvatar || '/assets/images/default-user-avatar.png'}}" mode="aspectFill" data-index="{{index}}" binderror="onReviewAvatarError"></image>
<view class="review-info">
<text class="review-name">{{item.applicantDisplayName}}</text>
<text wx:if="{{item.targetArtistUserId}}" class="review-meta">已预关联美甲师</text>
<text wx:if="{{item.applicantMaskedPhone}}" class="review-meta">{{item.applicantMaskedPhone}}</text>
<text class="review-meta">{{item.shopName || '当前门店'}} · {{item.applicationTimeText}}</text>
<text class="review-number">申请编号 {{item.applicationNo}}</text>
<view class="review-main">
<image class="review-avatar" src="{{item.applicantAvatar || '/assets/images/default-user-avatar.png'}}" mode="aspectFill" data-index="{{index}}" binderror="onReviewAvatarError"></image>
<view class="review-info">
<text class="review-name">{{item.applicantDisplayName}}</text>
<text wx:if="{{item.targetArtistUserId}}" class="review-meta">已预关联美甲师</text>
<text wx:if="{{item.applicantMaskedPhone}}" class="review-meta">{{item.applicantMaskedPhone}}</text>
<text class="review-meta">{{item.shopName || '当前门店'}} · {{item.applicationTimeText}}</text>
<text class="review-number">申请编号 {{item.applicationNo}}</text>
</view>
</view>
<view class="review-actions">
<button class="review-action reject" data-id="{{item.id}}" disabled="{{reviewingId}}" bindtap="rejectApplication">驳回</button>
+58 -34
View File
@@ -21,12 +21,13 @@
position: relative;
margin-right: 12rpx;
margin-left: 0;
border-color: #c9d8d2;
background: #eef5f2;
color: #247b63;
border-color: #247b63;
background: #247b63;
color: #fff;
}
.list-heading .review-toggle.is-open {
border-color: #247b63;
background: #247b63;
color: #fff;
}
@@ -48,23 +49,47 @@
.review-panel {
margin-bottom: 22rpx;
padding: 22rpx;
padding: 24rpx;
border: 1rpx solid #dce8e3;
background: #f8fcfa;
}
.review-panel-head,
.review-item,
.review-actions {
.review-panel-head {
display: flex;
align-items: center;
}
.review-panel-head {
justify-content: space-between;
margin-bottom: 16rpx;
}
.review-head-text {
min-width: 0;
flex: 1;
}
.review-head-actions {
display: flex;
align-items: center;
flex-shrink: 0;
gap: 12rpx;
}
.review-collapse {
display: flex;
align-items: center;
justify-content: center;
width: 48rpx;
height: 48rpx;
border-radius: 24rpx;
background: #e5f4ed;
}
.review-collapse-icon {
color: #247b63;
font-size: 22rpx;
font-weight: 700;
line-height: 1;
}
.review-title,
.review-subtitle,
.review-name,
@@ -87,8 +112,8 @@
.review-count {
color: #247b63;
font-size: 23rpx;
font-weight: 800;
font-size: 24rpx;
font-weight: 700;
}
.review-list {
@@ -99,19 +124,23 @@
.review-item {
box-sizing: border-box;
width: 100%;
gap: 14rpx;
min-width: 0;
flex-wrap: wrap;
padding: 18rpx;
border-radius: 20rpx;
background: #fff;
box-shadow: 0 5rpx 18rpx rgba(47, 111, 98, 0.07);
box-shadow: 0 6rpx 18rpx rgba(47, 111, 98, 0.07);
}
.review-main {
display: flex;
align-items: flex-start;
gap: 15rpx;
min-width: 0;
}
.review-avatar {
flex: 0 0 auto;
width: 72rpx;
height: 72rpx;
width: 75rpx;
height: 75rpx;
border-radius: 50%;
background: #e7ece9;
}
@@ -147,10 +176,12 @@
.review-actions {
box-sizing: border-box;
flex: 0 0 auto;
display: flex;
align-items: center;
max-width: 100%;
gap: 8rpx;
margin-left: auto;
margin-top: 15rpx;
padding-left: 0;
}
.review-action {
@@ -194,14 +225,7 @@
}
.review-info {
max-width: calc(100% - 100rpx);
}
.review-actions {
width: 100%;
justify-content: flex-end;
padding-left: 86rpx;
box-sizing: border-box;
max-width: calc(100% - 90rpx);
}
}
@@ -241,11 +265,11 @@
display: flex;
align-items: center;
justify-content: center;
width: 78rpx;
height: 78rpx;
width: 81rpx;
height: 81rpx;
border-radius: 50%;
color: #fff;
font-size: 28rpx;
font-size: 29rpx;
font-weight: 900;
overflow: hidden;
}
@@ -285,9 +309,9 @@
}
.color-pill {
width: 44rpx;
height: 18rpx;
border-radius: 999rpx;
width: 46rpx;
height: 20rpx;
border-radius: 10rpx;
}
.retry-btn {
+2 -2
View File
@@ -1,6 +1,6 @@
.launch-page { display:flex; min-height:100vh; box-sizing:border-box; flex-direction:column; align-items:center; justify-content:center; padding-bottom:100rpx; background:#fff; }
.launch-logo { width:196rpx; height:196rpx; border-radius:46rpx; }
.launch-logo { width:204rpx; height:204rpx; border-radius:48rpx; }
.launch-name { margin-top:26rpx; color:#17211f; font-size:40rpx; font-weight:800; letter-spacing:3rpx; }
.launch-status { display:flex; align-items:center; margin-top:42rpx; color:#8a918d; font-size:23rpx; }
.loading-dot { width:14rpx; height:14rpx; margin-right:14rpx; border-radius:50%; background:#247b63; animation:pulse 1.2s ease-in-out infinite; }
.loading-dot { width:16rpx; height:16rpx; margin-right:14rpx; border-radius:50%; background:#247b63; animation:pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity:.25; transform:scale(.75); } 50% { opacity:1; transform:scale(1); } }
+8 -8
View File
@@ -21,9 +21,9 @@
}
.login-logo {
width: 196rpx;
height: 196rpx;
border-radius: 46rpx;
width: 204rpx;
height: 204rpx;
border-radius: 48rpx;
}
.brand-name {
@@ -49,13 +49,13 @@
display: flex;
align-items: center;
justify-content: center;
height: 92rpx;
height: 96rpx;
border-radius: 999rpx;
background: #247b63;
color: #fff;
font-size: 30rpx;
font-weight: 500;
line-height: 92rpx;
line-height: 96rpx;
box-shadow: 0 10rpx 20rpx rgba(47, 143, 120, .16);
}
@@ -279,7 +279,7 @@
height: 38vh;
margin-top: 24rpx;
color: #707773;
font-size: 25rpx;
font-size: 26rpx;
line-height: 1.75;
white-space: pre-wrap;
}
@@ -291,11 +291,11 @@
}
.sheet-btn {
height: 88rpx;
height: 92rpx;
flex: 1;
border-radius: 14rpx;
font-size: 29rpx;
line-height: 88rpx;
line-height: 92rpx;
}
.sheet-btn.secondary {
+13 -5
View File
@@ -14,9 +14,17 @@ function resolveRoleText(type) {
return '管理端'
}
function resolveIdentityRole(type) {
const role = Number(type)
if (role === 2) return 'manager'
if (role === 3) return 'artist'
return ''
}
Page({
data: {
roleText: '管理端',
identityRole: '',
profileCard: buildProfileCard({}, BRAND_CONFIG.defaultShopName),
overviewLoading: false,
overview: {
@@ -31,11 +39,9 @@ Page({
},
menus: [
{ title: '个人信息', url: '/pages/profile-edit/index' },
{ title: '账号设置', url: '/pages/account-settings/index' },
{ title: '店铺设置', url: '/pages/shop-settings/index' },
{ title: '数据导出', url: '/pages/export/index' },
{ title: '用户协议', url: '/pages/legal/index?type=USER_TERMS' },
{ title: '隐私政策', url: '/pages/legal/index?type=PRIVACY_POLICY' },
{ title: '店铺信息', url: '/pages/shop-settings/index' },
{ title: '账号安全', url: '/pages/account-settings/index' },
{ title: '订单数据', url: '/pages/export/index' },
{ title: '关于系统', url: '/pages/about/index' }
]
},
@@ -84,6 +90,7 @@ Page({
const fallbackShopName = app.globalData.shopName || BRAND_CONFIG.defaultShopName
this.setData({
roleText: resolveRoleText(userInfo.type),
identityRole: resolveIdentityRole(userInfo.type),
profileCard: buildProfileCard(userInfo, fallbackShopName)
})
},
@@ -145,6 +152,7 @@ Page({
})
this.setData({
roleText: resolveRoleText(nextUserInfo.type),
identityRole: resolveIdentityRole(nextUserInfo.type),
profileCard: buildProfileCard(nextUserInfo, BRAND_CONFIG.defaultShopName)
})
}
+5 -1
View File
@@ -10,7 +10,11 @@
<text class="profile-shop">{{profileCard.shopName}}</text>
</view>
</view>
<text class="role-badge">{{roleText}}</text>
<view wx:if="{{identityRole}}" class="role-switch">
<text class="role-chip {{identityRole === 'manager' ? 'is-active' : ''}}">店长</text>
<text class="role-chip {{identityRole === 'artist' ? 'is-active' : ''}}">美甲师</text>
</view>
<text wx:else class="role-badge">{{roleText}}</text>
</view>
<view class="card overview-card">
+53 -8
View File
@@ -3,7 +3,7 @@
align-items: center;
justify-content: space-between;
gap: 20rpx;
padding: 28rpx;
padding: 26rpx;
}
.profile-main {
@@ -22,10 +22,10 @@
align-items: center;
justify-content: center;
flex-shrink: 0;
width: 96rpx;
height: 96rpx;
width: 100rpx;
height: 100rpx;
overflow: hidden;
border-radius: 24rpx;
border-radius: 25rpx;
background: #247b63;
color: #fff;
font-size: 40rpx;
@@ -67,6 +67,39 @@
line-height: 1.2;
}
.role-switch {
display: flex;
align-items: center;
flex-shrink: 0;
width: 184rpx;
height: 44rpx;
padding: 4rpx;
border-radius: 23rpx;
background: #e5f4ed;
}
.role-chip {
display: flex;
align-items: center;
justify-content: center;
height: 37rpx;
border-radius: 18rpx;
color: #71807a;
font-size: 21rpx;
line-height: 1;
}
.role-chip.is-active {
width: 81rpx;
background: #247b63;
color: #ffffff;
font-weight: 700;
}
.role-chip:not(.is-active) {
width: 95rpx;
}
.overview-card {
margin-top: 20rpx;
padding: 24rpx;
@@ -104,7 +137,7 @@
.overview-item {
display: flex;
min-height: 112rpx;
min-height: 104rpx;
align-items: center;
justify-content: center;
flex-direction: column;
@@ -154,6 +187,7 @@
}
.menu-list {
margin-top: 16rpx;
overflow: hidden;
}
@@ -161,8 +195,8 @@
display: flex;
align-items: center;
justify-content: space-between;
min-height: 104rpx;
padding: 0 26rpx;
min-height: 94rpx;
padding: 0 27rpx;
border-bottom: 1rpx solid #e7ece9;
color: #17211f;
font-size: 28rpx;
@@ -177,4 +211,15 @@
color: #b0a79e;
font-size: 44rpx;
}
.profile-logout { margin:48rpx 8rpx 24rpx; background:transparent; color:#a24f42; font-size:25rpx; }
.profile-logout {
display: flex;
align-items: center;
justify-content: center;
height: 88rpx;
margin: 40rpx 8rpx 24rpx;
border-radius: 20rpx;
background: #fbe9e7;
color: #b3261e;
font-size: 28rpx;
font-weight: 600;
}
+4 -4
View File
@@ -10,9 +10,9 @@
}
.logo {
width: 88rpx;
height: 88rpx;
border-radius: 26rpx;
width: 92rpx;
height: 92rpx;
border-radius: 27rpx;
background: #e5f4ed;
box-shadow: 0 12rpx 28rpx rgba(55, 94, 72, .14);
}
@@ -192,7 +192,7 @@
.role-option {
display: flex;
align-items: center;
min-height: 112rpx;
min-height: 116rpx;
margin-top: 16rpx;
padding: 0 20rpx;
border: 1rpx solid #e7ece9;