feat(auth,mp): 患者登录流程优化 — 智能合并 + 角色冻结 + 页面冻结
- 智能合并:微信注册时用手机号盲索引匹配已有患者档案,避免重复建 档(AuthState 添加 PiiCrypto + ensure_patient_record 增加盲索引查询) - 角色冻结:小程序仅允许患者角色登录,医护角色被拦截 (auth_service.rs 添加反向拦截 + 登录页移除 credential login 表单) - 页面冻结:10 个非核心页面替换为 FrozenPage 占位组件(用药/知情同意 /透析/家属/诊断/事件),移除 profile 导航入口,移除医生端预加载 - 医生端代码保留,仅隐藏入口,后续可零成本恢复 讨论记录:docs/discussions/2026-05-23-account-registration-login-flow.md
This commit is contained in:
48
apps/miniprogram/src/components/FrozenPage/index.scss
Normal file
48
apps/miniprogram/src/components/FrozenPage/index.scss
Normal file
@@ -0,0 +1,48 @@
|
||||
@import '../../styles/variables.scss';
|
||||
@import '../../styles/mixins.scss';
|
||||
|
||||
.frozen-page {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
min-height: 60vh;
|
||||
text-align: center;
|
||||
padding: 40px 20px;
|
||||
}
|
||||
|
||||
.frozen-page-icon {
|
||||
font-size: 48px;
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
|
||||
.frozen-page-title {
|
||||
font-size: var(--tk-font-h3);
|
||||
font-weight: 600;
|
||||
color: $tx;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
.frozen-page-desc {
|
||||
font-size: var(--tk-font-body);
|
||||
color: $tx3;
|
||||
margin-bottom: 32px;
|
||||
}
|
||||
|
||||
.frozen-page-btn {
|
||||
height: 44px;
|
||||
padding: 0 32px;
|
||||
border-radius: $r;
|
||||
background: var(--tk-pri);
|
||||
@include flex-center;
|
||||
|
||||
&:active {
|
||||
opacity: var(--tk-touch-feedback-opacity);
|
||||
}
|
||||
}
|
||||
|
||||
.frozen-page-btn-text {
|
||||
font-size: var(--tk-font-body);
|
||||
font-weight: 500;
|
||||
color: $white;
|
||||
}
|
||||
22
apps/miniprogram/src/components/FrozenPage/index.tsx
Normal file
22
apps/miniprogram/src/components/FrozenPage/index.tsx
Normal file
@@ -0,0 +1,22 @@
|
||||
import { View, Text } from '@tarojs/components';
|
||||
import Taro from '@tarojs/taro';
|
||||
import PageShell from '@/components/ui/PageShell';
|
||||
import './index.scss';
|
||||
|
||||
export default function FrozenPage() {
|
||||
return (
|
||||
<PageShell scroll={false}>
|
||||
<View className="frozen-page">
|
||||
<Text className="frozen-page-icon">🚧</Text>
|
||||
<Text className="frozen-page-title">功能即将上线</Text>
|
||||
<Text className="frozen-page-desc">我们正在努力准备中,敬请期待</Text>
|
||||
<View
|
||||
className="frozen-page-btn"
|
||||
onClick={() => Taro.navigateBack({ delta: 1 }).catch(() => Taro.switchTab({ url: '/pages/index/index' }))}
|
||||
>
|
||||
<Text className="frozen-page-btn-text">返回</Text>
|
||||
</View>
|
||||
</View>
|
||||
</PageShell>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user