196 lines
10 KiB
Vue
196 lines
10 KiB
Vue
<!-- 页面编号:A-06;用途:只承接账号冻结、停用与风险限制等阻断登录状态。 -->
|
||
<template>
|
||
<view class="auth-page status-page">
|
||
<view class="page-canvas">
|
||
<image class="page-backdrop" src="/static/assets/modules/auth/opaque/a01-red-hall-ink-backdrop-v1.png" mode="scaleToFill" />
|
||
<image class="brand-seal" src="/static/assets/foundation/transparent/brand-seal.png" mode="aspectFit" />
|
||
|
||
<view class="status-content">
|
||
<view class="page-heading">
|
||
<view class="back-button" hover-class="tap-fade" @click="goBack">
|
||
<image class="back-button__icon" src="/static/assets/foundation/transparent/chevron-right.png" mode="aspectFit" />
|
||
</view>
|
||
<text class="page-title">登录受限</text>
|
||
<text class="page-subtitle">请根据当前账号状态完成恢复</text>
|
||
<image class="status-divider" src="/static/assets/foundation/transparent/auth-divider-knot.png" mode="aspectFit" />
|
||
</view>
|
||
|
||
<view class="status-body">
|
||
<image class="status-icon" src="/static/assets/foundation/transparent/auth-login-outline.png" mode="aspectFit" />
|
||
<text class="status-eyebrow">{{ currentState.eyebrow }}</text>
|
||
<text class="status-title">{{ currentState.title }}</text>
|
||
<text class="status-description">{{ currentState.description }}</text>
|
||
|
||
<view class="status-details">
|
||
<view class="status-detail">
|
||
<text class="status-detail__label">{{ currentState.reasonLabel }}</text>
|
||
<text class="status-detail__value">{{ currentState.reason }}</text>
|
||
</view>
|
||
<view class="status-detail">
|
||
<text class="status-detail__label">{{ currentState.impactLabel }}</text>
|
||
<text class="status-detail__value">{{ currentState.impact }}</text>
|
||
</view>
|
||
<view class="status-detail">
|
||
<text class="status-detail__label">{{ currentState.recoveryLabel }}</text>
|
||
<text class="status-detail__value">{{ currentState.recovery }}</text>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
|
||
<view class="status-primary" hover-class="button-hover" @click="openRecovery">
|
||
<image class="status-primary__skin" src="/static/assets/foundation/opaque/a01-primary-button.png" mode="scaleToFill" />
|
||
<text class="status-primary__copy">查看恢复方式</text>
|
||
</view>
|
||
<view class="status-secondary" hover-class="tap-fade" @click="goLogin">返回登录</view>
|
||
</view>
|
||
</view>
|
||
|
||
<view v-if="recoveryVisible" class="recovery-layer" @click="closeRecovery">
|
||
<view class="recovery-dialog" @click.stop>
|
||
<image class="recovery-dialog__skin" src="/static/assets/modules/auth/opaque/a02-login-panel.png" mode="scaleToFill" />
|
||
<view class="recovery-dialog__content">
|
||
<text class="recovery-title">{{ currentState.recoveryTitle }}</text>
|
||
<text class="recovery-copy">{{ currentState.recoveryDetail }}</text>
|
||
<text class="recovery-note">账号恢复服务将在功能阶段接入,当前仅审核页面样式与状态位置。</text>
|
||
<view class="recovery-action" hover-class="button-hover" @click="closeRecovery">
|
||
<image class="recovery-action__skin" src="/static/assets/foundation/opaque/a01-primary-button.png" mode="scaleToFill" />
|
||
<text class="recovery-action__copy">我知道了</text>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
</template>
|
||
|
||
<script setup>
|
||
import { computed, ref } from 'vue'
|
||
import { onLoad, onShow } from '@dcloudio/uni-app'
|
||
|
||
const status = ref('risk')
|
||
const recoveryVisible = ref(false)
|
||
|
||
// A06 阻断状态的唯一合同;普通登录错误必须留在 A01 就近处理。
|
||
const statusConfig = {
|
||
frozen: {
|
||
eyebrow: '账号冻结',
|
||
title: '账号已被冻结',
|
||
description: '当前账号因安全审核暂时无法登录。',
|
||
reasonLabel: '限制原因',
|
||
reason: '账号进入人工安全审核',
|
||
impactLabel: '影响范围',
|
||
impact: '暂时无法进入家谱及管理资料',
|
||
recoveryLabel: '恢复方式',
|
||
recovery: '提交账号申诉并等待审核结果',
|
||
recoveryTitle: '申请解除冻结',
|
||
recoveryDetail: '请准备注册手机号与身份说明,提交后由平台进行人工核验。'
|
||
},
|
||
disabled: {
|
||
eyebrow: '账号停用',
|
||
title: '账号已被停用',
|
||
description: '当前账号处于停用状态,登录入口已关闭。',
|
||
reasonLabel: '限制原因',
|
||
reason: '账号已执行停用处理',
|
||
impactLabel: '影响范围',
|
||
impact: '无法登录,原有家谱资料不会被删除',
|
||
recoveryLabel: '恢复方式',
|
||
recovery: '联系平台核实停用原因与恢复条件',
|
||
recoveryTitle: '联系平台核实',
|
||
recoveryDetail: '请提供注册手机号和账号归属信息,平台核实后告知是否可以恢复。'
|
||
},
|
||
risk: {
|
||
eyebrow: '风险限制',
|
||
title: '账号存在安全风险',
|
||
description: '系统检测到异常登录,为保护家谱资料已暂停本次登录。',
|
||
reasonLabel: '限制原因',
|
||
reason: '登录环境或操作行为存在异常',
|
||
impactLabel: '影响范围',
|
||
impact: '本次登录被阻断,账号资料保持不变',
|
||
recoveryLabel: '恢复方式',
|
||
recovery: '完成身份核验后重新登录',
|
||
recoveryTitle: '完成身份核验',
|
||
recoveryDetail: '请使用注册手机号完成身份核验;核验通过后可重新尝试登录。'
|
||
}
|
||
}
|
||
|
||
const currentState = computed(() => statusConfig[status.value])
|
||
|
||
const resolveStatus = () => {
|
||
let requestedStatus = 'risk'
|
||
if (typeof location !== 'undefined') {
|
||
const query = new URLSearchParams(location.hash.split('?')[1] || '')
|
||
requestedStatus = query.get('status') || 'risk'
|
||
} else {
|
||
const pages = getCurrentPages()
|
||
requestedStatus = pages[pages.length - 1]?.options?.status || 'risk'
|
||
}
|
||
status.value = Object.prototype.hasOwnProperty.call(statusConfig, requestedStatus) ? requestedStatus : 'risk'
|
||
recoveryVisible.value = false
|
||
}
|
||
|
||
onLoad(resolveStatus)
|
||
onShow(resolveStatus)
|
||
|
||
const goLogin = () => uni.redirectTo({ url: '/pages/auth/a01-entry' })
|
||
const openRecovery = () => { recoveryVisible.value = true }
|
||
const closeRecovery = () => { recoveryVisible.value = false }
|
||
const goBack = () => uni.navigateBack()
|
||
</script>
|
||
|
||
<style scoped lang="scss">
|
||
.auth-page {
|
||
position: relative;
|
||
width: 100%;
|
||
height: 100dvh;
|
||
min-height: 100%;
|
||
overflow-x: hidden;
|
||
overflow-y: auto;
|
||
background: #f7f0e4;
|
||
color: #493323;
|
||
}
|
||
|
||
.page-canvas { position: relative; box-sizing: border-box; width: 100%; min-height: calc(1665rpx + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); }
|
||
.page-backdrop { position: absolute; inset: 0 0 auto; width: 100%; height: 1665rpx; pointer-events: none; }
|
||
.brand-seal { position: absolute; z-index: 1; top: 64rpx; left: 50%; width: 220rpx; height: 264rpx; transform: translateX(-50%); pointer-events: none; }
|
||
.status-content { position: relative; z-index: 2; box-sizing: border-box; padding: 430rpx 64rpx 46rpx; }
|
||
.page-heading { position: relative; display: flex; flex-direction: column; align-items: center; min-height: 154rpx; }
|
||
.back-button { position: absolute; top: 10rpx; left: 0; display: flex; align-items: center; justify-content: center; width: 88rpx; height: 88rpx; }
|
||
.back-button__icon { width: 42rpx; height: 42rpx; transform: scaleX(-1); }
|
||
.page-title { color: #9f170f; font-family: STSong, SimSun, serif; font-size: 66rpx; font-weight: 700; letter-spacing: 7rpx; }
|
||
.page-subtitle { margin-top: 12rpx; color: #806c58; font-size: 25rpx; letter-spacing: 1rpx; }
|
||
.status-divider { width: 154rpx; height: 34rpx; margin-top: 10rpx; }
|
||
|
||
.status-body { display: flex; flex-direction: column; align-items: center; padding-top: 6rpx; text-align: center; }
|
||
.status-icon { width: 94rpx; height: 94rpx; opacity: 0.82; }
|
||
.status-eyebrow { margin-top: 10rpx; color: #a7160c; font-size: 22rpx; letter-spacing: 3rpx; }
|
||
.status-title { margin-top: 10rpx; color: #3f2c1d; font-family: STSong, SimSun, serif; font-size: 40rpx; font-weight: 700; letter-spacing: 3rpx; }
|
||
.status-description { box-sizing: border-box; width: 100%; margin-top: 12rpx; color: #786654; font-size: 24rpx; line-height: 1.65; }
|
||
.status-details { width: 100%; margin-top: 22rpx; border-top: 1rpx solid #cfaa70; }
|
||
.status-detail { display: flex; box-sizing: border-box; min-height: 78rpx; padding: 16rpx 0; border-bottom: 1rpx solid rgba(207, 170, 112, 0.72); text-align: left; }
|
||
.status-detail__label { flex: 0 0 116rpx; color: #9f170f; font-size: 23rpx; }
|
||
.status-detail__value { flex: 1; color: #5f4a38; font-size: 23rpx; line-height: 34rpx; }
|
||
|
||
.status-primary { position: relative; display: flex; align-items: center; justify-content: center; height: 104rpx; margin-top: 28rpx; overflow: hidden; }
|
||
.status-primary__skin,
|
||
.recovery-action__skin { position: absolute; inset: 0; width: 100%; height: 100%; }
|
||
.status-primary__copy { position: relative; z-index: 1; color: #fffaf0; font-family: STSong, SimSun, serif; font-size: 34rpx; letter-spacing: 5rpx; }
|
||
.status-secondary { display: flex; align-items: center; justify-content: center; min-height: 82rpx; color: #a7160c; font-size: 24rpx; }
|
||
|
||
.recovery-layer { position: fixed; z-index: 20; inset: 0; display: flex; align-items: center; justify-content: center; box-sizing: border-box; padding: 42rpx; background: rgba(35, 18, 10, 0.62); }
|
||
.recovery-dialog { position: relative; width: 100%; max-width: 670rpx; min-height: 560rpx; }
|
||
.recovery-dialog__skin { position: absolute; inset: 0; width: 100%; height: 100%; }
|
||
.recovery-dialog__content { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; box-sizing: border-box; min-height: 560rpx; padding: 92rpx 70rpx 64rpx; text-align: center; }
|
||
.recovery-title { color: #8f160f; font-family: STSong, SimSun, serif; font-size: 43rpx; font-weight: 700; letter-spacing: 4rpx; }
|
||
.recovery-copy { margin-top: 32rpx; color: #513a28; font-size: 27rpx; line-height: 43rpx; }
|
||
.recovery-note { margin-top: 18rpx; color: #8d7965; font-size: 21rpx; line-height: 34rpx; }
|
||
.recovery-action { position: relative; display: flex; align-items: center; justify-content: center; width: 100%; height: 92rpx; margin-top: 38rpx; overflow: hidden; }
|
||
.recovery-action__copy { position: relative; z-index: 1; color: #fffaf0; font-family: STSong, SimSun, serif; font-size: 30rpx; letter-spacing: 4rpx; }
|
||
.tap-fade,
|
||
.button-hover { opacity: 0.72; }
|
||
|
||
@media screen and (max-width: 340px) {
|
||
.status-content { padding-right: 48rpx; padding-left: 48rpx; }
|
||
.page-title { font-size: 60rpx; }
|
||
.status-detail__label { flex-basis: 108rpx; }
|
||
}
|
||
</style>
|