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;
}
}
}