style(小程序): 我的页身份胶囊与菜单重组、审核面板重构、客户新增悬浮按钮等页面视觉对齐设计稿
自动发布开发环境 Nacos 配置 / publish (push) Successful in 22s
自动发布开发环境 Nacos 配置 / publish (push) Successful in 22s
This commit is contained in:
@@ -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)
|
||||
})
|
||||
}
|
||||
|
||||
@@ -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">
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user