171 lines
5.5 KiB
Plaintext
171 lines
5.5 KiB
Plaintext
<!-- 我的页 U30-U33(重构:userStore 派生状态 + ui-section-header) -->
|
||
<view class="page">
|
||
<!-- 未登录 -->
|
||
<ui-empty
|
||
wx:if="{{!isLoggedIn}}"
|
||
illustration="default"
|
||
title="未登录"
|
||
description="登录后可管理资料、查看匹配与消息。"
|
||
actions="{{loginActions}}"
|
||
bind:action="onLoginAction"
|
||
/>
|
||
|
||
<!-- 加载中(首次且无缓存资料) -->
|
||
<ui-loading
|
||
wx:elif="{{loadStatus === 'loading' && !profile}}"
|
||
mode="skeleton"
|
||
rows="6"
|
||
/>
|
||
|
||
<!-- 已登录:个人中心 -->
|
||
<block wx:else>
|
||
<!-- 个人资料卡 -->
|
||
<view class="profile-card">
|
||
<ui-avatar
|
||
src="{{profile.avatarUrl || ''}}"
|
||
size="xl"
|
||
default-text="{{profile.displayName || ''}}"
|
||
verified="{{isRealNameVerified}}"
|
||
reviewed="{{isProfileApproved}}"
|
||
/>
|
||
<view class="profile-info">
|
||
<view class="profile-name">{{profile.displayName || '未填写昵称'}}</view>
|
||
<view class="profile-meta">{{profile.regionName || '丹阳'}}</view>
|
||
<view class="profile-badges">
|
||
<ui-status-badge
|
||
wx:if="{{isRealNameVerified}}"
|
||
kind="success"
|
||
label="已实名"
|
||
icon
|
||
/>
|
||
<ui-status-badge
|
||
wx:elif="{{verificationStatus === 'pending'}}"
|
||
kind="warning"
|
||
label="认证中"
|
||
icon
|
||
/>
|
||
<ui-status-badge
|
||
wx:else
|
||
kind="disabled"
|
||
label="未实名"
|
||
icon
|
||
/>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
|
||
<!-- 婚恋状态 -->
|
||
<ui-section-header title="婚恋状态" subtitle="{{relationshipText}}" />
|
||
<view class="action-row">
|
||
<ui-button
|
||
wx:if="{{canPause}}"
|
||
variant="secondary"
|
||
size="md"
|
||
block
|
||
bind:tap="onPause"
|
||
>暂停寻找</ui-button>
|
||
<ui-button
|
||
wx:if="{{canResume}}"
|
||
variant="primary"
|
||
size="md"
|
||
block
|
||
bind:tap="onResume"
|
||
>恢复寻找</ui-button>
|
||
<view wx:if="{{!canPause && !canResume}}" class="action-hint">
|
||
<text>当前状态不支持切换</text>
|
||
</view>
|
||
</view>
|
||
|
||
<!-- 我的资料 -->
|
||
<ui-section-header title="我的资料" subtitle="{{reviewStatusText}}" />
|
||
<view class="list-group">
|
||
<view class="list-row" bindtap="onEditProfile">
|
||
<text class="list-label">编辑基本资料</text>
|
||
<text class="list-arrow">›</text>
|
||
</view>
|
||
<view class="list-row" bindtap="onEditPreference">
|
||
<text class="list-label">择偶条件</text>
|
||
<text class="list-arrow">›</text>
|
||
</view>
|
||
<view class="list-row" bindtap="onEditPhotos">
|
||
<text class="list-label">生活照管理</text>
|
||
<text class="list-arrow">›</text>
|
||
</view>
|
||
<view class="list-row" bindtap="onGoAccountStatus">
|
||
<text class="list-label">审核与账号状态</text>
|
||
<text class="list-arrow">›</text>
|
||
</view>
|
||
</view>
|
||
|
||
<!-- 我的匹配 -->
|
||
<ui-section-header title="我的匹配" />
|
||
<view class="list-group">
|
||
<view class="list-row" bindtap="onGoMessages">
|
||
<text class="list-label">互相喜欢</text>
|
||
<text class="list-arrow">›</text>
|
||
</view>
|
||
<view class="list-row" bindtap="onGoLikers">
|
||
<text class="list-label">喜欢我的人</text>
|
||
<text class="list-value">{{likersCount > 0 ? likersCount + ' 人' : ''}}</text>
|
||
<text class="list-arrow">›</text>
|
||
</view>
|
||
</view>
|
||
|
||
<!-- 账户与安全 -->
|
||
<ui-section-header title="账户与安全" />
|
||
<view class="list-group">
|
||
<view class="list-row" bindtap="onGoVerification">
|
||
<text class="list-label">实名认证</text>
|
||
<text class="list-value">{{isRealNameVerified ? '已认证' : (verificationStatus === 'pending' ? '认证中' : '未认证')}}</text>
|
||
<text class="list-arrow">›</text>
|
||
</view>
|
||
<view class="list-row" bindtap="onGoPrivacy">
|
||
<text class="list-label">隐私设置</text>
|
||
<text class="list-arrow">›</text>
|
||
</view>
|
||
<view class="list-row" bindtap="onGoBlacklist">
|
||
<text class="list-label">黑名单</text>
|
||
<text class="list-arrow">›</text>
|
||
</view>
|
||
</view>
|
||
|
||
<!-- 其他 -->
|
||
<ui-section-header title="其他" />
|
||
<view class="list-group">
|
||
<view class="list-row" bindtap="onGoSettings">
|
||
<text class="list-label">设置</text>
|
||
<text class="list-arrow">›</text>
|
||
</view>
|
||
<view class="list-row" bindtap="onGoHelp">
|
||
<text class="list-label">帮助中心</text>
|
||
<text class="list-arrow">›</text>
|
||
</view>
|
||
<view class="list-row" bindtap="onGoAbout">
|
||
<text class="list-label">关于我们</text>
|
||
<text class="list-arrow">›</text>
|
||
</view>
|
||
</view>
|
||
|
||
<!-- 红娘工作台独立入口按钮 -->
|
||
<view class="workbench-btn" bindtap="onSwitchRole">
|
||
<text class="workbench-icon">👩</text>
|
||
<text class="workbench-text">{{hasOperatorToken ? '进入红娘工作台' : '红娘工作台登录'}}</text>
|
||
</view>
|
||
|
||
<!-- 退出登录 -->
|
||
<view class="list-group" style="margin-top: 24rpx;">
|
||
<view class="list-row danger" bindtap="onLogout">
|
||
<text class="list-label">退出登录</text>
|
||
</view>
|
||
</view>
|
||
|
||
<!-- 退出登录确认 -->
|
||
<ui-danger-action-dialog
|
||
visible="{{showLogoutDialog}}"
|
||
action="{{logoutAction}}"
|
||
bind:confirm="onConfirmLogout"
|
||
bind:cancel="onCancelLogout"
|
||
/>
|
||
</block>
|
||
</view>
|