This commit is contained in:
Your Name
2026-03-18 14:53:09 +08:00
parent 338b104d50
commit 7832514f28
315 changed files with 7071 additions and 1136 deletions
+61 -57
View File
@@ -6,23 +6,23 @@
<image class="avatar" :src="userInfo.avatar" mode="aspectFill" />
<div class="user-info">
<text class="nickname">{{ userInfo.nickname || '未登录' }}</text>
<text class="vip-tag">VIP会员</text>
<!-- <text class="vip-tag">VIP会员</text> -->
</div>
<div class="qr-code" @click.stop="showQRCode">
<!-- <div class="qr-code" @click.stop="showQRCode">
<uni-icons type="scan" size="20" color="#333"></uni-icons>
</div>
</div> -->
</div>
<div class="stat-row">
<div class="stat-item">
<text class="value">{{ userInfo.balance ||0}}</text>
<text class="value">{{ userInfo.balance || 0 }}</text>
<text class="label">钱包()</text>
</div>
<div class="stat-item">
<text class="value">{{ userInfo.points ||0}}</text>
<text class="value">{{ userInfo.points || 0 }}</text>
<text class="label">积分</text>
</div>
<div class="stat-item">
<text class="value">{{ userInfo.coupons ||0}}</text>
<text class="value">{{ userInfo.coupons || 0 }}</text>
<text class="label">优惠券</text>
</div>
</div>
@@ -68,23 +68,23 @@
</div>
</div> -->
<!-- 服务菜单列表 -->
<!-- 服务菜单列表适老化显示全部大触控区 -->
<div class="service-list">
<div
class="service-item"
v-for="(item, index) in allServices.slice(4)"
v-for="(item, index) in allServices"
:key="index"
@click="navigateTo(item.path)"
>
<div class="left">
<div class="service-icon" :class="item.class">
<uni-icons :type="item.icon" size="20" color="#fff"></uni-icons>
<uni-icons :type="item.icon" size="28" color="#fff"></uni-icons>
</div>
<text class="service-name">{{ item.name }}</text>
</div>
<div class="right">
<text v-if="item.desc" class="desc">{{ item.desc }}</text>
<uni-icons type="right" size="14" color="#999"></uni-icons>
<uni-icons type="right" size="20" color="#666"></uni-icons>
</div>
</div>
</div>
@@ -92,6 +92,7 @@
</template>
<script>
import { onShow, onShareAppMessage } from '@dcloudio/uni-app'
export default {
name: 'profileB',
data() {
@@ -137,19 +138,15 @@ export default {
}
],
allServices: [
{ name: '收藏夹', icon: 'star', path: '/pages/favorite/index', class: 'bg-red' },
{ name: '浏览记录', icon: 'eye', path: '/pages/history/index', class: 'bg-blue' },
{ name: '收货地址', icon: 'location', path: '/pages/address/list', class: 'bg-green' },
{ name: '优惠券', icon: 'gift', path: '/pages/coupon/list', class: 'bg-purple' },
{ name: '就诊卡', icon: 'folder-add', path: '/pages/Card/Card', class: 'bg-cyan' },
{ name: '设置', icon: 'gear', path: '/pages/user/userinfo', class: 'bg-gray' }// ,
{ name: '设置', icon: 'gear', path: '/pages/user/userinfo', class: 'bg-gray' }// ,
// { name: '客服中心', icon: 'headphones', path: '/pages/service/index', class: 'bg-orange', desc: '在线客服' }
]
}
},
onShow() {
this.userInfo=uni.getStorageSync('userData')
this.user()
},
methods: {
navigateTo(path) {
@@ -163,56 +160,59 @@ export default {
</script>
<style lang="scss" scoped>
/* 适老化设计:50-80岁老人 - 大字号、高对比、大触控区 */
.mine-page {
min-height: 100vh;
background: #f5f6fa;
padding: 30rpx;
background: #e8eaed;
padding: 40rpx;
}
.user-card {
background: #fff;
border-radius: 24rpx;
padding: 40rpx;
margin-bottom: 30rpx;
box-shadow: 0 4rpx 16rpx rgba(0,0,0,0.04);
border-radius: 28rpx;
padding: 48rpx;
margin-bottom: 40rpx;
box-shadow: 0 4rpx 20rpx rgba(0,0,0,0.06);
.user-header {
display: flex;
align-items: center;
margin-bottom: 40rpx;
margin-bottom: 48rpx;
.avatar {
width: 120rpx;
height: 120rpx;
border-radius: 60rpx;
margin-right: 30rpx;
width: 160rpx;
height: 160rpx;
border-radius: 80rpx;
margin-right: 36rpx;
border: 4rpx solid #e0e0e0;
}
.user-info {
flex: 1;
.nickname {
font-size: 36rpx;
font-size: 48rpx;
font-weight: 600;
color: #333;
margin-bottom: 12rpx;
color: #1a1a1a;
margin-bottom: 16rpx;
display: block;
letter-spacing: 1rpx;
}
.vip-tag {
background: linear-gradient(90deg, #FFD700 0%, #FFA500 100%);
color: #fff;
font-size: 24rpx;
padding: 4rpx 16rpx;
border-radius: 20rpx;
font-size: 28rpx;
padding: 6rpx 20rpx;
border-radius: 24rpx;
display: inline-block;
}
}
.qr-code {
width: 72rpx;
height: 72rpx;
border-radius: 36rpx;
width: 88rpx;
height: 88rpx;
border-radius: 44rpx;
background: #f5f6fa;
display: flex;
align-items: center;
@@ -222,24 +222,26 @@ export default {
.stat-row {
display: flex;
padding-top: 30rpx;
border-top: 2rpx solid #f5f6fa;
padding-top: 40rpx;
border-top: 4rpx solid #e8eaed;
.stat-item {
flex: 1;
text-align: center;
min-height: 120rpx;
.value {
font-size: 40rpx;
font-size: 52rpx;
font-weight: 600;
color: #333;
margin-bottom: 8rpx;
color: #1a1a1a;
margin-bottom: 12rpx;
display: block;
}
.label {
font-size: 24rpx;
color: #999;
font-size: 32rpx;
color: #555;
font-weight: 500;
}
}
}
@@ -354,16 +356,17 @@ export default {
.service-list {
background: #fff;
border-radius: 24rpx;
padding: 10rpx 30rpx;
box-shadow: 0 4rpx 16rpx rgba(0,0,0,0.04);
border-radius: 28rpx;
padding: 20rpx 40rpx;
box-shadow: 0 4rpx 20rpx rgba(0,0,0,0.06);
.service-item {
display: flex;
align-items: center;
justify-content: space-between;
padding: 30rpx 0;
border-bottom: 2rpx solid #f5f6fa;
padding: 44rpx 0;
border-bottom: 4rpx solid #e8eaed;
min-height: 120rpx;
&:last-child {
border-bottom: none;
@@ -374,18 +377,19 @@ export default {
align-items: center;
.service-icon {
width: 64rpx;
height: 64rpx;
border-radius: 32rpx;
margin-right: 24rpx;
width: 88rpx;
height: 88rpx;
border-radius: 44rpx;
margin-right: 32rpx;
display: flex;
align-items: center;
justify-content: center;
}
.service-name {
font-size: 28rpx;
color: #333;
font-size: 38rpx;
color: #1a1a1a;
font-weight: 500;
}
}
@@ -394,9 +398,9 @@ export default {
align-items: center;
.desc {
font-size: 24rpx;
color: #999;
margin-right: 16rpx;
font-size: 30rpx;
color: #555;
margin-right: 20rpx;
}
}
}
+66 -61
View File
@@ -21,8 +21,7 @@
mode="aspectFill"
/>
<view class="avatar-upload" @click="uploadAvatar">
<uni-icons type="upload-filled" size="14" color="#999" class="upload-icon"></uni-icons>
<uni-icons type="upload-filled" size="24" color="#FFA500" class="upload-icon"></uni-icons>
<text class="upload-text">更换头像</text>
</view>
</view>
@@ -281,9 +280,10 @@ const goBack = () => {
</script>
<style scoped>
/* 适老化设计:50-80岁 - 大字号、高对比、大触控区 */
.userinfo-container {
min-height: 100vh;
background: #f5f5f5;
background: #e8eaed;
}
.header {
@@ -291,30 +291,30 @@ const goBack = () => {
justify-content: space-between;
align-items: center;
background: #ffffff;
padding: 20rpx 30rpx;
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.05);
padding: 24rpx 40rpx;
box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.06);
}
.header-back {
font-size: 40rpx;
font-size: 48rpx;
color: #FFA500;
width: 60rpx;
height: 60rpx;
width: 88rpx;
height: 88rpx;
display: flex;
align-items: center;
justify-content: center;
}
.header-title {
font-size: 36rpx;
font-size: 44rpx;
font-weight: bold;
color: #333333;
color: #1a1a1a;
flex: 1;
text-align: center;
}
.header-placeholder {
width: 60rpx;
width: 88rpx;
}
.loading-state {
@@ -322,34 +322,34 @@ const goBack = () => {
justify-content: center;
align-items: center;
height: 100vh;
font-size: 28rpx;
color: #999999;
font-size: 36rpx;
color: #555;
}
.form-wrapper {
padding: 30rpx;
padding: 40rpx;
}
.form-section {
background: #ffffff;
border-radius: 16rpx;
padding: 30rpx;
margin-bottom: 24rpx;
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.05);
border-radius: 24rpx;
padding: 40rpx;
margin-bottom: 36rpx;
box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.06);
}
.section-title {
font-size: 32rpx;
font-size: 40rpx;
font-weight: bold;
color: #FFA500;
margin-bottom: 24rpx;
margin-bottom: 32rpx;
display: block;
padding-bottom: 16rpx;
border-bottom: 2rpx solid #f0f0f0;
padding-bottom: 24rpx;
border-bottom: 4rpx solid #f0f0f0;
}
.form-group {
margin-bottom: 24rpx;
margin-bottom: 36rpx;
}
.form-group:last-child {
@@ -358,111 +358,116 @@ const goBack = () => {
.form-label {
display: block;
font-size: 28rpx;
color: #333333;
font-size: 36rpx;
color: #1a1a1a;
font-weight: 500;
margin-bottom: 16rpx;
line-height: 1.5;
margin-bottom: 20rpx;
line-height: 1.6;
}
.form-input {
width: 100%;
padding: 20rpx;
border: 2rpx solid #e8e8e8;
border-radius: 12rpx;
font-size: 28rpx;
line-height: 1.5;
color: #333333;
padding: 28rpx;
border: 4rpx solid #e0e0e0;
border-radius: 16rpx;
font-size: 36rpx;
line-height: 1.6;
color: #1a1a1a;
background: #ffffff;
box-sizing: border-box;
display: block;
height: auto;
min-height: 60rpx;
min-height: 96rpx;
}
.form-input::placeholder {
color: #cccccc;
color: #999;
font-size: 34rpx;
}
.avatar-container {
display: flex;
align-items: center;
gap: 20rpx;
gap: 32rpx;
}
.avatar-image {
width: 120rpx;
height: 120rpx;
border-radius: 60rpx;
width: 160rpx;
height: 160rpx;
border-radius: 80rpx;
background: #f0f0f0;
border: 4rpx solid #e0e0e0;
}
.avatar-upload {
flex: 1;
padding: 20rpx;
border: 2rpx dashed #FFA500;
border-radius: 12rpx;
padding: 36rpx;
border: 4rpx dashed #FFA500;
border-radius: 20rpx;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 8rpx;
gap: 16rpx;
min-height: 120rpx;
}
.upload-icon {
font-size: 40rpx;
font-size: 56rpx;
}
.upload-text {
font-size: 24rpx;
font-size: 34rpx;
color: #FFA500;
font-weight: 500;
}
.sex-group {
display: flex;
gap: 20rpx;
gap: 28rpx;
}
.sex-btn {
flex: 1;
padding: 20rpx;
border: 2rpx solid #e8e8e8;
border-radius: 12rpx;
padding: 32rpx;
border: 4rpx solid #e0e0e0;
border-radius: 16rpx;
text-align: center;
font-size: 28rpx;
font-size: 38rpx;
line-height: 1.5;
color: #666666;
color: #555;
background: #ffffff;
transition: all 0.3s;
display: flex;
align-items: center;
justify-content: center;
min-height: 60rpx;
min-height: 96rpx;
}
.sex-btn.active {
border-color: #FFA500;
background: #e6f7ff;
background: #fff7e6;
color: #FFA500;
font-weight: bold;
}
.button-group {
display: flex;
gap: 20rpx;
margin-top: 40rpx;
margin-bottom: 40rpx;
gap: 28rpx;
margin-top: 56rpx;
margin-bottom: 56rpx;
}
.btn {
flex: 1;
padding: 20rpx;
border-radius: 12rpx;
font-size: 32rpx;
padding: 36rpx;
border-radius: 20rpx;
font-size: 40rpx;
font-weight: bold;
border: none;
cursor: pointer;
transition: all 0.3s;
min-height: 100rpx;
}
.btn:active {
@@ -476,7 +481,7 @@ const goBack = () => {
.btn-cancel {
background: #f0f0f0;
color: #666666;
color: #555;
}
.btn-submit {
@@ -485,6 +490,6 @@ const goBack = () => {
}
.btn-submit:active:not(:disabled) {
background: #0050b3;
background: #e69500;
}
</style>