tmp
This commit is contained in:
+10
-8
@@ -19,7 +19,7 @@ Page({
|
|||||||
],
|
],
|
||||||
online: true,
|
online: true,
|
||||||
profile: {
|
profile: {
|
||||||
name: '王姐陪诊师',
|
name: '',
|
||||||
level: '初级陪诊师',
|
level: '初级陪诊师',
|
||||||
avatar: ''
|
avatar: ''
|
||||||
},
|
},
|
||||||
@@ -76,14 +76,16 @@ Page({
|
|||||||
|
|
||||||
loadUser() {
|
loadUser() {
|
||||||
const app = getApp()
|
const app = getApp()
|
||||||
const user = app.globalData && app.globalData.user
|
app.ensureLogin()
|
||||||
if (user) {
|
.then(user => {
|
||||||
this.setData({
|
if (!user) return
|
||||||
'profile.name': user.nickname || this.data.profile.name,
|
const p = user.profile || {}
|
||||||
'profile.level': user.level || this.data.profile.level,
|
this.setData({
|
||||||
'profile.avatar': user.avatar || ''
|
'profile.name': p.name || '微信用户',
|
||||||
|
'profile.avatar': p.avatar || ''
|
||||||
|
})
|
||||||
})
|
})
|
||||||
}
|
.catch(() => {})
|
||||||
},
|
},
|
||||||
|
|
||||||
toggleOnline() {
|
toggleOnline() {
|
||||||
|
|||||||
+20
-16
@@ -1,7 +1,7 @@
|
|||||||
/* pages/home/index.wxss */
|
/* pages/home/index.wxss */
|
||||||
|
|
||||||
page {
|
page {
|
||||||
background: linear-gradient(180deg, #e8f8f2 0%, #f5f6fa 360rpx);
|
background: linear-gradient(180deg, #ffb97a 0%, #f5f6fa 420rpx);
|
||||||
color: #1a1a2e;
|
color: #1a1a2e;
|
||||||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
|
||||||
}
|
}
|
||||||
@@ -12,15 +12,16 @@ page {
|
|||||||
padding: 24rpx 24rpx 64rpx;
|
padding: 24rpx 24rpx 64rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* === 头部信息卡 === */
|
/* === 头部信息卡(浅色玻璃) === */
|
||||||
.header-card {
|
.header-card {
|
||||||
position: relative;
|
position: relative;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
background: linear-gradient(135deg, #2dd36f, #17c3a5);
|
background: rgba(255, 255, 255, 0.62);
|
||||||
|
border: 1rpx solid rgba(255, 255, 255, 0.85);
|
||||||
border-radius: 28rpx;
|
border-radius: 28rpx;
|
||||||
padding: 36rpx 32rpx;
|
padding: 36rpx 32rpx;
|
||||||
color: #ffffff;
|
color: #3d2f25;
|
||||||
box-shadow: 0 12rpx 32rpx rgba(23, 195, 165, 0.28);
|
box-shadow: 0 12rpx 32rpx rgba(242, 100, 80, 0.16);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 装饰光斑,增加层次 */
|
/* 装饰光斑,增加层次 */
|
||||||
@@ -29,7 +30,7 @@ page {
|
|||||||
content: '';
|
content: '';
|
||||||
position: absolute;
|
position: absolute;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
background: rgba(255, 255, 255, 0.12);
|
background: rgba(255, 138, 61, 0.1);
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -45,7 +46,7 @@ page {
|
|||||||
height: 160rpx;
|
height: 160rpx;
|
||||||
bottom: -80rpx;
|
bottom: -80rpx;
|
||||||
left: -40rpx;
|
left: -40rpx;
|
||||||
background: rgba(255, 255, 255, 0.08);
|
background: rgba(242, 100, 80, 0.08);
|
||||||
}
|
}
|
||||||
|
|
||||||
.profile-row {
|
.profile-row {
|
||||||
@@ -64,8 +65,8 @@ page {
|
|||||||
width: 96rpx;
|
width: 96rpx;
|
||||||
height: 96rpx;
|
height: 96rpx;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
background-color: rgba(255, 255, 255, 0.25);
|
background-color: rgba(255, 138, 61, 0.15);
|
||||||
border: 2rpx solid rgba(255, 255, 255, 0.4);
|
border: 2rpx solid rgba(255, 255, 255, 0.9);
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
@@ -81,7 +82,7 @@ page {
|
|||||||
.avatar-text {
|
.avatar-text {
|
||||||
font-size: 40rpx;
|
font-size: 40rpx;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
color: #ffffff;
|
color: #f2633f;
|
||||||
}
|
}
|
||||||
|
|
||||||
.profile-info {
|
.profile-info {
|
||||||
@@ -100,20 +101,21 @@ page {
|
|||||||
|
|
||||||
.level-tag {
|
.level-tag {
|
||||||
margin-left: 12rpx;
|
margin-left: 12rpx;
|
||||||
background-color: rgba(255, 255, 255, 0.2);
|
background-color: rgba(242, 100, 80, 0.12);
|
||||||
border-radius: 16rpx;
|
border-radius: 16rpx;
|
||||||
padding: 4rpx 14rpx;
|
padding: 4rpx 14rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.level-text {
|
.level-text {
|
||||||
font-size: 20rpx;
|
font-size: 20rpx;
|
||||||
color: #ffffff;
|
color: #e05a3a;
|
||||||
}
|
}
|
||||||
|
|
||||||
.online-switch {
|
.online-switch {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
background-color: rgba(255, 255, 255, 0.25);
|
background-color: rgba(255, 255, 255, 0.75);
|
||||||
|
border: 1rpx solid rgba(255, 255, 255, 0.9);
|
||||||
border-radius: 28rpx;
|
border-radius: 28rpx;
|
||||||
padding: 6rpx 6rpx 6rpx 18rpx;
|
padding: 6rpx 6rpx 6rpx 18rpx;
|
||||||
}
|
}
|
||||||
@@ -121,13 +123,14 @@ page {
|
|||||||
.switch-text {
|
.switch-text {
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
margin-right: 10rpx;
|
margin-right: 10rpx;
|
||||||
|
color: #3d2f25;
|
||||||
}
|
}
|
||||||
|
|
||||||
.switch-track {
|
.switch-track {
|
||||||
width: 56rpx;
|
width: 56rpx;
|
||||||
height: 32rpx;
|
height: 32rpx;
|
||||||
border-radius: 16rpx;
|
border-radius: 16rpx;
|
||||||
background-color: rgba(0, 0, 0, 0.15);
|
background-color: rgba(61, 47, 37, 0.15);
|
||||||
position: relative;
|
position: relative;
|
||||||
transition: background-color 0.2s ease;
|
transition: background-color 0.2s ease;
|
||||||
}
|
}
|
||||||
@@ -149,7 +152,7 @@ page {
|
|||||||
|
|
||||||
.switch-track.on .switch-thumb {
|
.switch-track.on .switch-thumb {
|
||||||
left: 26rpx;
|
left: 26rpx;
|
||||||
background-color: #17c3a5;
|
background-color: #ff8f4d;
|
||||||
}
|
}
|
||||||
|
|
||||||
.stats-row {
|
.stats-row {
|
||||||
@@ -169,7 +172,7 @@ page {
|
|||||||
|
|
||||||
.stat-label {
|
.stat-label {
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
opacity: 0.9;
|
color: rgba(61, 47, 37, 0.65);
|
||||||
}
|
}
|
||||||
|
|
||||||
.stat-value {
|
.stat-value {
|
||||||
@@ -188,6 +191,7 @@ page {
|
|||||||
font-size: 44rpx;
|
font-size: 44rpx;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
|
color: #f2633f;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* === 通用 Section === */
|
/* === 通用 Section === */
|
||||||
|
|||||||
Reference in New Issue
Block a user