119 lines
5.4 KiB
Plaintext
119 lines
5.4 KiB
Plaintext
<view class="profile-page-root" style="{{themeVars}}">
|
|
<navigation-bar title="个人中心" showBack="{{false}}" isTabPage="{{true}}" color="#FDFBF9" background="transparent" safeAreaMode="overlay"></navigation-bar>
|
|
<view class="profile-bg"></view>
|
|
|
|
<view class="profile-scroll">
|
|
<view class="page-shell profile-page">
|
|
<view class="page-content profile-content">
|
|
<view wx:if="{{!isLoggedIn}}" class="page-card guest-card">
|
|
<image class="guest-avatar" src="{{defaultAvatar}}" mode="aspectFill" lazy-load="{{true}}"></image>
|
|
<view class="guest-title">还没有登录账号</view>
|
|
<view class="guest-desc">登录后查看订单、收藏和优惠券。</view>
|
|
<view class="primary-btn" bindtap="handleOpenAuth">去登录</view>
|
|
</view>
|
|
|
|
<block wx:elif="{{userInfo}}">
|
|
<view class="page-card profile-card">
|
|
<view class="profile-top">
|
|
<image class="avatar" src="{{userInfo.avatar || defaultAvatar}}" mode="aspectFill" lazy-load="{{true}}" binderror="handleAvatarError"></image>
|
|
<view class="profile-copy">
|
|
<view class="nickname">{{userInfo.nickname || 'Yumi 用户'}}</view>
|
|
<view class="account">{{userInfo.account}}</view>
|
|
<view wx:if="{{userInfo.signature}}" class="signature">{{userInfo.signature}}</view>
|
|
</view>
|
|
</view>
|
|
|
|
<view class="summary-strip profile-stats">
|
|
<view class="summary-metric" bindtap="handleOpenOrders">
|
|
<text class="summary-label">订单</text>
|
|
<text class="summary-value">{{orderCount}}</text>
|
|
</view>
|
|
<view class="summary-metric" bindtap="handleOpenWishlist">
|
|
<text class="summary-label">收藏</text>
|
|
<text class="summary-value">{{wishlistCount}}</text>
|
|
</view>
|
|
<view class="summary-metric" bindtap="handleOpenCoupons">
|
|
<text class="summary-label">优惠券</text>
|
|
<text class="summary-value">{{couponCount}}</text>
|
|
</view>
|
|
</view>
|
|
<view wx:if="{{pendingReviewCount > 0}}" class="pending-review-card" bindtap="handleOpenPendingReviews">
|
|
<text>待评价 {{pendingReviewCount}}</text>
|
|
<text>给服务过你的美甲师一点反馈</text>
|
|
</view>
|
|
|
|
<view wx:if="{{growthSummary}}" class="growth-card">
|
|
<view class="growth-head">
|
|
<text class="growth-label">成长等级</text>
|
|
<text class="growth-level">{{growthSummary.levelName}}</text>
|
|
</view>
|
|
<view class="growth-metrics">
|
|
<view>
|
|
<text>{{growthSummary.growthValue}}</text>
|
|
<text>成长值</text>
|
|
</view>
|
|
<view>
|
|
<text>{{growthSummary.appointmentCount}}</text>
|
|
<text>预约</text>
|
|
</view>
|
|
<view>
|
|
<text>{{growthSummary.reviewCount}}</text>
|
|
<text>评价</text>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
<view class="shop-box" bindtap="handleSwitchShop">
|
|
<view>
|
|
<view class="shop-label">当前登录门店</view>
|
|
<view class="shop-name">{{userInfo.shopName || '当前暂无可用门店'}}</view>
|
|
</view>
|
|
<view class="shop-link">{{(userInfo.shopIds && userInfo.shopIds.length > 1) ? '切换' : '查看'}}</view>
|
|
</view>
|
|
|
|
<view wx:if="{{needSetPassword}}" class="password-tip">
|
|
建议尽快设置登录密码。
|
|
</view>
|
|
|
|
<view class="secondary-btn edit-btn" bindtap="handleOpenSettings">资料与设置</view>
|
|
</view>
|
|
|
|
<view class="page-card menu-card">
|
|
<view class="section-title">常用入口</view>
|
|
<view class="menu-item" bindtap="handleOpenOrders">
|
|
<text>我的订单</text>
|
|
<text wx:if="{{pendingReviewCount > 0}}" class="menu-badge">待评价 {{pendingReviewCount}}</text>
|
|
<text class="menu-arrow">></text>
|
|
</view>
|
|
<view class="menu-item" bindtap="handleOpenWishlist">
|
|
<text>我的收藏</text>
|
|
<text class="menu-arrow">></text>
|
|
</view>
|
|
<view class="menu-item" bindtap="handleOpenCoupons">
|
|
<text>我的优惠券</text>
|
|
<text class="menu-arrow">></text>
|
|
</view>
|
|
<view class="menu-item" bindtap="handleOpenVipCenter">
|
|
<text>VIP 中心</text>
|
|
<text class="menu-arrow">></text>
|
|
</view>
|
|
<view class="menu-item" bindtap="handleOpenNotifications">
|
|
<text>消息通知</text>
|
|
<text wx:if="{{unreadMessageCount > 0}}" class="menu-badge">{{unreadMessageCount}}</text>
|
|
<text class="menu-arrow">></text>
|
|
</view>
|
|
<view class="menu-item" bindtap="handleOpenSettings">
|
|
<text>设置中心</text>
|
|
<text class="menu-arrow">></text>
|
|
</view>
|
|
<view class="menu-item logout-item" bindtap="handleLogout">
|
|
<text>退出登录</text>
|
|
<text class="menu-arrow">></text>
|
|
</view>
|
|
</view>
|
|
</block>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|