ow
This commit is contained in:
1 parent
28dd3ffebd
commit
1b7ee59d23
14 files changed
+538
-4
No files matched your search
@@ -28,6 +28,9 @@ const loginProfileStore = useLoginProfileStore();
|
||||
const { can } = usePermission();
|
||||
const canSeeLoginAgent = computed(() => can("none", "SecurityUser", "LoginAgent"));
|
||||
|
||||
/* 「已认证」判定:与后端 UpdateSecurityUserIdCard 口径一致——UserType=NORMAL_USERS("N") 即视为已认证(身份验证成功后本地快照同步) */
|
||||
const isVerified = computed(() => loginProfileStore.userType === "N");
|
||||
|
||||
/* 统一风格:主题渐变底 + 主题色变量(与 family-person-enquiry / 族谱首页同一接线口径) */
|
||||
const { themeBackground } = useThemeGradient();
|
||||
const { primary, accentGradient, accentSoft, accentShadow } = useThemeTokens();
|
||||
@@ -63,11 +66,22 @@ function goChangePassword(): void {
|
||||
uni.navigateTo({ url: pageUrl("changePassword") });
|
||||
}
|
||||
|
||||
/** 进入「修改昵称」页(/change-local-name):改用户名,成功后按旧系统约定退出重登刷新快照 */
|
||||
/** 进入「修改昵称」页(/change-local-name):改用户名,成功后按旧系统约定退出重登刷新快照;已认证用户昵称锁定为身份证姓名,单击无效(改由右侧直接展示昵称) */
|
||||
function goChangeLocalName(): void {
|
||||
if (isVerified.value) {
|
||||
return;
|
||||
}
|
||||
uni.navigateTo({ url: pageUrl("changeLocalName") });
|
||||
}
|
||||
|
||||
/** 进入「身份验证」页(/identity-verification):上传身份证 OCR 后把信息写入备注并置认证态;已认证后不再重复认证,单击无效 */
|
||||
function goIdentityVerification(): void {
|
||||
if (isVerified.value) {
|
||||
return;
|
||||
}
|
||||
uni.navigateTo({ url: pageUrl("identityVerification") });
|
||||
}
|
||||
|
||||
/** 退出登录:确认后调后端 Logout、清本地档案,回登录页 */
|
||||
async function handleLogout(): Promise<void> {
|
||||
const confirmed = await new Promise<boolean>((resolve) => {
|
||||
@@ -156,15 +170,32 @@ async function handleLogout(): Promise<void> {
|
||||
<u-icon name="arrow-right" size="32" color="#9aa0a6" />
|
||||
</view>
|
||||
|
||||
<!-- 修改昵称:改用户名,成功后退出重登刷新快照(/change-local-name) -->
|
||||
<!-- 修改昵称:改用户名(/change-local-name);已认证则锁定、改名为「认证昵称」并直接展示昵称 -->
|
||||
<view class="mine-cell" @tap="goChangeLocalName">
|
||||
<view class="mine-cell__icon">
|
||||
<u-icon name="edit-pen-fill" size="30" color="#ffffff" />
|
||||
</view>
|
||||
<text class="mine-cell__title">
|
||||
{{ t("MinePage.changeLocalName") }}
|
||||
{{ isVerified ? t("MinePage.verifiedLocalName") : t("MinePage.changeLocalName") }}
|
||||
</text>
|
||||
<u-icon name="arrow-right" size="32" color="#9aa0a6" />
|
||||
<text v-if="isVerified" class="mine-cell__value">
|
||||
{{ loginProfileStore.userLocalName }}
|
||||
</text>
|
||||
<u-icon v-else name="arrow-right" size="32" color="#9aa0a6" />
|
||||
</view>
|
||||
|
||||
<!-- 身份验证:上传身份证 OCR 后写入备注并置认证态(/identity-verification);已认证则右侧换为徽标 -->
|
||||
<view class="mine-cell" @tap="goIdentityVerification">
|
||||
<view class="mine-cell__icon">
|
||||
<u-icon name="checkmark-circle-fill" size="30" color="#ffffff" />
|
||||
</view>
|
||||
<text class="mine-cell__title">
|
||||
{{ t("MinePage.identityVerification") }}
|
||||
</text>
|
||||
<text v-if="isVerified" class="mine-cell__tag">
|
||||
{{ t("MinePage.verified") }}
|
||||
</text>
|
||||
<u-icon v-else name="arrow-right" size="32" color="#9aa0a6" />
|
||||
</view>
|
||||
|
||||
<!-- 退出登录:确认后清会话回登录页 -->
|
||||
@@ -272,6 +303,26 @@ async function handleLogout(): Promise<void> {
|
||||
color: #1f2329;
|
||||
}
|
||||
|
||||
/* 已认证徽标:替换右箭头,绿色描边胶囊,与主题橙入口区分状态语义 */
|
||||
.mine-cell__tag {
|
||||
padding: 6rpx 20rpx;
|
||||
border: 2rpx solid #52c41a;
|
||||
border-radius: 999rpx;
|
||||
font-size: 24rpx;
|
||||
font-weight: 600;
|
||||
color: #52c41a;
|
||||
}
|
||||
|
||||
/* 已认证锁定的展示值(如昵称):右对齐灰字省略,替代不可点的箭头 */
|
||||
.mine-cell__value {
|
||||
max-width: 60%;
|
||||
overflow: hidden;
|
||||
font-size: 28rpx;
|
||||
color: #8f959e;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
/* 退出登录:降权为描边行,标题居中、危险色,与普通入口区分 */
|
||||
.mine-cell--logout {
|
||||
justify-content: center;
|
||||
|
||||
Reference in new issue
Block a user