|
|
@@ -1,9 +1,9 @@
|
|
|
<template>
|
|
|
<view class="container">
|
|
|
- <!-- 用户信息区域 -->
|
|
|
- <view class="user-info">
|
|
|
- <view class="avatar">
|
|
|
- <image class="avatar-icon" src="/static/icons/user.svg"></image>
|
|
|
+ <!-- 用户信息卡片 -->
|
|
|
+ <view class="user-card">
|
|
|
+ <view class="user-avatar">
|
|
|
+ <image class="avatar-icon" src="/static/icons/user.svg" mode="aspectFit"></image>
|
|
|
</view>
|
|
|
<view class="user-details">
|
|
|
<view class="user-name">微信用户</view>
|
|
|
@@ -11,75 +11,90 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
- <!-- 菜单列表 -->
|
|
|
- <view class="menu-list">
|
|
|
- <view class="menu-item" @click="goToOrders">
|
|
|
- <view class="menu-icon">
|
|
|
- <image class="menu-svg-icon" src="/static/icons/orders.svg"></image>
|
|
|
+ <!-- 菜单分组 -->
|
|
|
+ <view class="menu-section">
|
|
|
+ <view class="section-title">订单与服务</view>
|
|
|
+ <view class="menu-card">
|
|
|
+ <view class="menu-item" @click="goToOrders">
|
|
|
+ <view class="menu-icon">
|
|
|
+ <image class="menu-svg-icon" src="/static/icons/orders.svg" mode="aspectFit"></image>
|
|
|
+ </view>
|
|
|
+ <view class="menu-text">我的订单</view>
|
|
|
+ <view class="menu-arrow"></view>
|
|
|
</view>
|
|
|
- <view class="menu-text">我的订单</view>
|
|
|
- <view class="menu-arrow"></view>
|
|
|
- </view>
|
|
|
- <view class="menu-item" @click="goToCoupons">
|
|
|
- <view class="menu-icon">
|
|
|
- <image class="menu-svg-icon" src="/static/icons/coupon.svg"></image>
|
|
|
+ <view class="menu-item" @click="goToCoupons">
|
|
|
+ <view class="menu-icon">
|
|
|
+ <image class="menu-svg-icon" src="/static/icons/coupon.svg" mode="aspectFit"></image>
|
|
|
+ </view>
|
|
|
+ <view class="menu-text">我的优惠券</view>
|
|
|
+ <view v-if="availableCouponCount > 0" class="menu-badge">{{ availableCouponCount }}</view>
|
|
|
+ <view class="menu-arrow"></view>
|
|
|
</view>
|
|
|
- <view class="menu-text">我的优惠券</view>
|
|
|
- <view v-if="availableCouponCount > 0" class="menu-badge">{{ availableCouponCount }}</view>
|
|
|
- <view class="menu-arrow"></view>
|
|
|
- </view>
|
|
|
- <view class="menu-item" @click="goToCouponCenter">
|
|
|
- <view class="menu-icon">
|
|
|
- <image class="menu-svg-icon" src="/static/icons/coupon.svg"></image>
|
|
|
+ <view class="menu-item" @click="goToCouponCenter">
|
|
|
+ <view class="menu-icon">
|
|
|
+ <image class="menu-svg-icon" src="/static/icons/coupon.svg" mode="aspectFit"></image>
|
|
|
+ </view>
|
|
|
+ <view class="menu-text">领券中心</view>
|
|
|
+ <view class="menu-arrow"></view>
|
|
|
</view>
|
|
|
- <view class="menu-text">领券中心</view>
|
|
|
- <view class="menu-arrow"></view>
|
|
|
</view>
|
|
|
- <view class="menu-item" @click="goToMembership">
|
|
|
- <view class="menu-icon">
|
|
|
- <image class="menu-svg-icon" src="/static/icons/membership.svg"></image>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <view class="menu-section">
|
|
|
+ <view class="section-title">个人中心</view>
|
|
|
+ <view class="menu-card">
|
|
|
+ <view class="menu-item" @click="goToMembership">
|
|
|
+ <view class="menu-icon">
|
|
|
+ <image class="menu-svg-icon" src="/static/icons/membership.svg" mode="aspectFit"></image>
|
|
|
+ </view>
|
|
|
+ <view class="menu-text">我的会员卡</view>
|
|
|
+ <view class="menu-arrow"></view>
|
|
|
</view>
|
|
|
- <view class="menu-text">我的会员卡</view>
|
|
|
- <view class="menu-arrow"></view>
|
|
|
- </view>
|
|
|
- <view class="menu-item" @click="goToCards">
|
|
|
- <view class="menu-icon">
|
|
|
- <image class="menu-svg-icon" src="/static/icons/wallet.svg"></image>
|
|
|
+ <view class="menu-item" @click="goToCards">
|
|
|
+ <view class="menu-icon">
|
|
|
+ <image class="menu-svg-icon" src="/static/icons/wallet.svg" mode="aspectFit"></image>
|
|
|
+ </view>
|
|
|
+ <view class="menu-text">我的卡片</view>
|
|
|
+ <view class="menu-arrow"></view>
|
|
|
</view>
|
|
|
- <view class="menu-text">我的卡片</view>
|
|
|
- <view class="menu-arrow"></view>
|
|
|
- </view>
|
|
|
- <view class="menu-item" @click="goToInvoice">
|
|
|
- <view class="menu-icon">
|
|
|
- <image class="menu-svg-icon" src="/static/icons/invoice.svg"></image>
|
|
|
+ <view class="menu-item" @click="goToInvoice">
|
|
|
+ <view class="menu-icon">
|
|
|
+ <image class="menu-svg-icon" src="/static/icons/invoice.svg" mode="aspectFit"></image>
|
|
|
+ </view>
|
|
|
+ <view class="menu-text">发票管理</view>
|
|
|
+ <view class="menu-arrow"></view>
|
|
|
</view>
|
|
|
- <view class="menu-text">发票管理</view>
|
|
|
- <view class="menu-arrow"></view>
|
|
|
</view>
|
|
|
- <view class="menu-item" @click="goToFAQ">
|
|
|
- <view class="menu-icon">
|
|
|
- <image class="menu-svg-icon" src="/static/icons/faq.svg"></image>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <view class="menu-section">
|
|
|
+ <view class="section-title">帮助与支持</view>
|
|
|
+ <view class="menu-card">
|
|
|
+ <view class="menu-item" @click="goToFAQ">
|
|
|
+ <view class="menu-icon">
|
|
|
+ <image class="menu-svg-icon" src="/static/icons/faq.svg" mode="aspectFit"></image>
|
|
|
+ </view>
|
|
|
+ <view class="menu-text">常见问题</view>
|
|
|
+ <view class="menu-arrow"></view>
|
|
|
</view>
|
|
|
- <view class="menu-text">常见问题</view>
|
|
|
- <view class="menu-arrow"></view>
|
|
|
- </view>
|
|
|
- <view class="menu-item" @click="callService">
|
|
|
- <view class="menu-icon">
|
|
|
- <image class="menu-svg-icon" src="/static/icons/service.svg"></image>
|
|
|
+ <view class="menu-item" @click="callService">
|
|
|
+ <view class="menu-icon">
|
|
|
+ <image class="menu-svg-icon" src="/static/icons/service.svg" mode="aspectFit"></image>
|
|
|
+ </view>
|
|
|
+ <view class="menu-text">联系客服</view>
|
|
|
+ <view class="service-phone">400-0755-315</view>
|
|
|
</view>
|
|
|
- <view class="menu-text">联系客服</view>
|
|
|
- <view class="service-phone">400-0755-315</view>
|
|
|
- </view>
|
|
|
- <view class="menu-item" @click="goToOfficialAccount">
|
|
|
- <view class="menu-icon">
|
|
|
- <image class="menu-svg-icon" src="/static/icons/official.svg"></image>
|
|
|
+ <view class="menu-item" @click="goToOfficialAccount">
|
|
|
+ <view class="menu-icon">
|
|
|
+ <image class="menu-svg-icon" src="/static/icons/official.svg" mode="aspectFit"></image>
|
|
|
+ </view>
|
|
|
+ <view class="menu-text">公众号信息</view>
|
|
|
+ <view class="menu-arrow"></view>
|
|
|
</view>
|
|
|
- <view class="menu-text">公众号信息</view>
|
|
|
- <view class="menu-arrow"></view>
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
- <!-- 退出登录按钮 -->
|
|
|
+ <!-- 退出登录 -->
|
|
|
<view class="logout-section">
|
|
|
<button class="logout-btn" @click="handleLogout">退出登录</button>
|
|
|
</view>
|
|
|
@@ -120,24 +135,28 @@ const goBack = () => {
|
|
|
};
|
|
|
|
|
|
const goToOrders = () => {
|
|
|
+ uni.vibrateShort({ type: 'light' });
|
|
|
uni.navigateTo({
|
|
|
url: '/pages/orders/orders'
|
|
|
});
|
|
|
};
|
|
|
|
|
|
const goToCoupons = () => {
|
|
|
+ uni.vibrateShort({ type: 'light' });
|
|
|
uni.navigateTo({
|
|
|
url: '/pages/coupons/coupons'
|
|
|
});
|
|
|
};
|
|
|
|
|
|
const goToCouponCenter = () => {
|
|
|
+ uni.vibrateShort({ type: 'light' });
|
|
|
uni.navigateTo({
|
|
|
url: '/pages/couponCenter/couponCenter'
|
|
|
});
|
|
|
};
|
|
|
|
|
|
const goToMembership = () => {
|
|
|
+ uni.vibrateShort({ type: 'light' });
|
|
|
uni.showToast({
|
|
|
title: '会员卡功能开发中',
|
|
|
icon: 'none'
|
|
|
@@ -145,6 +164,7 @@ const goToMembership = () => {
|
|
|
};
|
|
|
|
|
|
const goToCards = () => {
|
|
|
+ uni.vibrateShort({ type: 'light' });
|
|
|
uni.showToast({
|
|
|
title: '卡片功能开发中',
|
|
|
icon: 'none'
|
|
|
@@ -152,6 +172,7 @@ const goToCards = () => {
|
|
|
};
|
|
|
|
|
|
const goToInvoice = () => {
|
|
|
+ uni.vibrateShort({ type: 'light' });
|
|
|
uni.showToast({
|
|
|
title: '发票管理功能开发中',
|
|
|
icon: 'none'
|
|
|
@@ -159,6 +180,7 @@ const goToInvoice = () => {
|
|
|
};
|
|
|
|
|
|
const goToFAQ = () => {
|
|
|
+ uni.vibrateShort({ type: 'light' });
|
|
|
uni.showToast({
|
|
|
title: '常见问题功能开发中',
|
|
|
icon: 'none'
|
|
|
@@ -166,12 +188,14 @@ const goToFAQ = () => {
|
|
|
};
|
|
|
|
|
|
const callService = () => {
|
|
|
+ uni.vibrateShort({ type: 'light' });
|
|
|
uni.makePhoneCall({
|
|
|
phoneNumber: '400-0755-315'
|
|
|
});
|
|
|
};
|
|
|
|
|
|
const goToOfficialAccount = () => {
|
|
|
+ uni.vibrateShort({ type: 'light' });
|
|
|
uni.showToast({
|
|
|
title: '公众号信息功能开发中',
|
|
|
icon: 'none'
|
|
|
@@ -207,154 +231,182 @@ const handleLogout = () => {
|
|
|
};
|
|
|
</script>
|
|
|
|
|
|
-<style>
|
|
|
+<style lang="scss">
|
|
|
.container {
|
|
|
min-height: 100vh;
|
|
|
- background-color: #ffffff;
|
|
|
+ background: $color-bg-secondary;
|
|
|
display: flex;
|
|
|
flex-direction: column;
|
|
|
+ padding-bottom: $spacing-xl;
|
|
|
}
|
|
|
|
|
|
-/* 用户信息区域 */
|
|
|
-.user-info {
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
- padding: 20rpx 32rpx 40rpx;
|
|
|
- background-color: #FFD700;
|
|
|
- margin-top: 0;
|
|
|
-}
|
|
|
-
|
|
|
-.avatar {
|
|
|
- width: 120rpx;
|
|
|
- height: 120rpx;
|
|
|
- border-radius: 50%;
|
|
|
- background-color: #ffffff;
|
|
|
+/* ========== 用户信息卡片 ========== */
|
|
|
+.user-card {
|
|
|
+ background: linear-gradient(135deg, $color-primary-light 0%, $color-primary 100%);
|
|
|
+ padding: $spacing-xxl $spacing-lg $spacing-xl;
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
- justify-content: center;
|
|
|
- margin-right: 32rpx;
|
|
|
-}
|
|
|
-
|
|
|
-.avatar-icon {
|
|
|
- width: 90rpx;
|
|
|
- height: 90rpx;
|
|
|
-}
|
|
|
-
|
|
|
-.user-details {
|
|
|
- flex: 1;
|
|
|
-}
|
|
|
-
|
|
|
-.user-name {
|
|
|
- font-size: 34rpx;
|
|
|
- font-weight: 600;
|
|
|
- margin-bottom: 8rpx;
|
|
|
- color: #000000;
|
|
|
+ animation: slideDown 0.6s cubic-bezier(0.25, 0.1, 0.25, 1);
|
|
|
+
|
|
|
+ .user-avatar {
|
|
|
+ width: 120rpx;
|
|
|
+ height: 120rpx;
|
|
|
+ border-radius: $radius-circle;
|
|
|
+ background: rgba(255, 255, 255, 0.9);
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ margin-right: $spacing-lg;
|
|
|
+ box-shadow: $shadow-md;
|
|
|
+
|
|
|
+ .avatar-icon {
|
|
|
+ width: 72rpx;
|
|
|
+ height: 72rpx;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .user-details {
|
|
|
+ flex: 1;
|
|
|
+ }
|
|
|
+
|
|
|
+ .user-name {
|
|
|
+ font-size: 36rpx;
|
|
|
+ font-weight: 500;
|
|
|
+ color: $color-text-primary;
|
|
|
+ margin-bottom: $spacing-xs;
|
|
|
+ }
|
|
|
+
|
|
|
+ .user-phone {
|
|
|
+ font-size: 24rpx;
|
|
|
+ color: rgba(44, 44, 44, 0.7);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
-.user-phone {
|
|
|
- font-size: 24rpx;
|
|
|
- color: #333333;
|
|
|
+/* ========== 菜单分组 ========== */
|
|
|
+.menu-section {
|
|
|
+ margin-top: $spacing-lg;
|
|
|
+ animation: slideUp 0.8s cubic-bezier(0.25, 0.1, 0.25, 1);
|
|
|
+
|
|
|
+ .section-title {
|
|
|
+ font-size: 24rpx;
|
|
|
+ color: $color-text-secondary;
|
|
|
+ padding: 0 $spacing-lg $spacing-sm;
|
|
|
+ font-weight: 500;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
-/* 菜单列表 */
|
|
|
-.menu-list {
|
|
|
- background-color: #ffffff;
|
|
|
- margin-top: 0;
|
|
|
- border-top: 1rpx solid #f0f0f0;
|
|
|
- border-bottom: 1rpx solid #f0f0f0;
|
|
|
+.menu-card {
|
|
|
+ background: $color-bg-primary;
|
|
|
+ margin: 0 $spacing-lg;
|
|
|
+ border-radius: $radius-lg;
|
|
|
+ box-shadow: $shadow-sm;
|
|
|
+ overflow: hidden;
|
|
|
}
|
|
|
|
|
|
.menu-item {
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
- padding: 32rpx 32rpx;
|
|
|
- border-bottom: 1rpx solid #f0f0f0;
|
|
|
-}
|
|
|
-
|
|
|
-.menu-item:last-child {
|
|
|
- border-bottom: none;
|
|
|
-}
|
|
|
-
|
|
|
-.menu-item:active {
|
|
|
- background-color: #f9f9f9;
|
|
|
-}
|
|
|
-
|
|
|
-.menu-icon {
|
|
|
- width: 48rpx;
|
|
|
- height: 48rpx;
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
- justify-content: center;
|
|
|
- margin-right: 24rpx;
|
|
|
-}
|
|
|
-
|
|
|
-.menu-svg-icon {
|
|
|
- width: 32rpx;
|
|
|
- height: 32rpx;
|
|
|
-}
|
|
|
-
|
|
|
-.menu-text {
|
|
|
- flex: 1;
|
|
|
- font-size: 28rpx;
|
|
|
- color: #333333;
|
|
|
-}
|
|
|
-
|
|
|
-.menu-arrow {
|
|
|
- width: 16rpx;
|
|
|
- height: 16rpx;
|
|
|
- border-top: 2rpx solid #999999;
|
|
|
- border-right: 2rpx solid #999999;
|
|
|
- transform: rotate(45deg);
|
|
|
-}
|
|
|
-
|
|
|
-.menu-badge {
|
|
|
- background-color: #FF4D4F;
|
|
|
- color: #ffffff;
|
|
|
- font-size: 20rpx;
|
|
|
- min-width: 32rpx;
|
|
|
- height: 32rpx;
|
|
|
- line-height: 32rpx;
|
|
|
- text-align: center;
|
|
|
- border-radius: 16rpx;
|
|
|
- padding: 0 8rpx;
|
|
|
- margin-right: 12rpx;
|
|
|
-}
|
|
|
-
|
|
|
-.service-phone {
|
|
|
- font-size: 24rpx;
|
|
|
- color: #666666;
|
|
|
+ padding: $spacing-md $spacing-lg;
|
|
|
+ border-bottom: 1rpx solid $color-border;
|
|
|
+ transition: all $duration-fast $ease-out;
|
|
|
+ position: relative;
|
|
|
+
|
|
|
+ &:last-child {
|
|
|
+ border-bottom: none;
|
|
|
+ }
|
|
|
+
|
|
|
+ &:active {
|
|
|
+ background: $color-bg-secondary;
|
|
|
+ }
|
|
|
+
|
|
|
+ .menu-icon {
|
|
|
+ width: 40rpx;
|
|
|
+ height: 40rpx;
|
|
|
+ margin-right: $spacing-md;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+
|
|
|
+ .menu-svg-icon {
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .menu-text {
|
|
|
+ flex: 1;
|
|
|
+ font-size: 28rpx;
|
|
|
+ color: $color-text-primary;
|
|
|
+ }
|
|
|
+
|
|
|
+ .menu-arrow {
|
|
|
+ width: 16rpx;
|
|
|
+ height: 16rpx;
|
|
|
+ border-top: 2rpx solid $color-text-tertiary;
|
|
|
+ border-right: 2rpx solid $color-text-tertiary;
|
|
|
+ transform: rotate(45deg);
|
|
|
+ margin-left: $spacing-sm;
|
|
|
+ }
|
|
|
+
|
|
|
+ .menu-badge {
|
|
|
+ background: $color-error;
|
|
|
+ color: #ffffff;
|
|
|
+ font-size: 20rpx;
|
|
|
+ min-width: 32rpx;
|
|
|
+ height: 32rpx;
|
|
|
+ line-height: 32rpx;
|
|
|
+ text-align: center;
|
|
|
+ border-radius: 16rpx;
|
|
|
+ padding: 0 8rpx;
|
|
|
+ margin-right: $spacing-sm;
|
|
|
+ animation: bounce 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
|
|
|
+ }
|
|
|
+
|
|
|
+ .service-phone {
|
|
|
+ font-size: 24rpx;
|
|
|
+ color: $color-text-secondary;
|
|
|
+ margin-left: $spacing-sm;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
-/* 退出登录区域 */
|
|
|
+/* ========== 退出登录 ========== */
|
|
|
.logout-section {
|
|
|
- padding: 60rpx 32rpx 20rpx;
|
|
|
- background-color: #ffffff;
|
|
|
+ padding: $spacing-xxl $spacing-lg $spacing-lg;
|
|
|
display: flex;
|
|
|
justify-content: center;
|
|
|
+ animation: fadeIn 1s cubic-bezier(0.25, 0.1, 0.25, 1);
|
|
|
+
|
|
|
+ .logout-btn {
|
|
|
+ width: 60%;
|
|
|
+ height: 88rpx;
|
|
|
+ background: $color-bg-primary;
|
|
|
+ border: 2rpx solid $color-border;
|
|
|
+ border-radius: $radius-xl;
|
|
|
+ color: $color-text-secondary;
|
|
|
+ font-size: 28rpx;
|
|
|
+ font-weight: 500;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ transition: all $duration-fast $ease-out;
|
|
|
+
|
|
|
+ &::after {
|
|
|
+ border: none;
|
|
|
+ }
|
|
|
+
|
|
|
+ &:active {
|
|
|
+ background: $color-bg-secondary;
|
|
|
+ border-color: $color-text-tertiary;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
-.logout-btn {
|
|
|
- width: 60%;
|
|
|
- height: 80rpx;
|
|
|
- line-height: 80rpx;
|
|
|
- background-color: #FFD700;
|
|
|
- border: none;
|
|
|
- border-radius: 40rpx;
|
|
|
- color: #333333;
|
|
|
- font-size: 28rpx;
|
|
|
- font-weight: 500;
|
|
|
-}
|
|
|
-
|
|
|
-.logout-btn:active {
|
|
|
- background-color: #E6C200;
|
|
|
-}
|
|
|
-
|
|
|
-/* 版本信息 */
|
|
|
+/* ========== 版本信息 ========== */
|
|
|
.version-info {
|
|
|
- padding: 40rpx 0;
|
|
|
text-align: center;
|
|
|
font-size: 22rpx;
|
|
|
- color: #999999;
|
|
|
- background-color: #ffffff;
|
|
|
+ color: $color-text-tertiary;
|
|
|
+ padding: $spacing-lg 0;
|
|
|
+ animation: fadeIn 1.2s cubic-bezier(0.25, 0.1, 0.25, 1);
|
|
|
}
|
|
|
</style>
|