1. 优化医生、诊所的设置
Some checks failed
CI / Test (ubuntu-latest) (push) Has been cancelled
CI / Test (windows-latest) (push) Has been cancelled
CI / Lint (ubuntu-latest) (push) Has been cancelled
CI / Lint (windows-latest) (push) Has been cancelled
CI / Check (ubuntu-latest) (push) Has been cancelled
CI / Check (windows-latest) (push) Has been cancelled
CI / CI OK (push) Has been cancelled
CodeQL / Analyze (javascript-typescript) (push) Has been cancelled
Deploy Website on push / Deploy Push Playground Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Docs Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Antd Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Element Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Naive Ftp (push) Has been cancelled
Release Drafter / update_release_draft (push) Has been cancelled
Lock Threads / action (push) Has been cancelled
Issue Close Require / close-issues (push) Has been cancelled
Close stale issues / stale (push) Has been cancelled
Some checks failed
CI / Test (ubuntu-latest) (push) Has been cancelled
CI / Test (windows-latest) (push) Has been cancelled
CI / Lint (ubuntu-latest) (push) Has been cancelled
CI / Lint (windows-latest) (push) Has been cancelled
CI / Check (ubuntu-latest) (push) Has been cancelled
CI / Check (windows-latest) (push) Has been cancelled
CI / CI OK (push) Has been cancelled
CodeQL / Analyze (javascript-typescript) (push) Has been cancelled
Deploy Website on push / Deploy Push Playground Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Docs Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Antd Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Element Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Naive Ftp (push) Has been cancelled
Release Drafter / update_release_draft (push) Has been cancelled
Lock Threads / action (push) Has been cancelled
Issue Close Require / close-issues (push) Has been cancelled
Close stale issues / stale (push) Has been cancelled
This commit is contained in:
@@ -24,6 +24,7 @@ import {downloadByData} from "#/util/tool";
|
||||
const { apiURL } = useAppConfig(import.meta.env, import.meta.env.PROD);
|
||||
|
||||
const arr = new Set([
|
||||
'account',
|
||||
'accept_tel',
|
||||
'doctor',
|
||||
'express_mobile',
|
||||
@@ -36,7 +37,18 @@ const arr = new Set([
|
||||
]);
|
||||
|
||||
// 敏感数据
|
||||
const sensitiveData = new Set(['id_card', 'idcard']);
|
||||
const sensitiveData = new Set([
|
||||
'account',
|
||||
'accept_tel',
|
||||
'doctor',
|
||||
'express_mobile',
|
||||
'id_card',
|
||||
'idcard',
|
||||
'mobile',
|
||||
'password',
|
||||
'patient_mobile',
|
||||
'phone',
|
||||
]);
|
||||
|
||||
function createRequestClient(baseURL: string) {
|
||||
const client = new RequestClient({
|
||||
@@ -199,36 +211,37 @@ function getRes(obj: any, isDecode = true) {
|
||||
}
|
||||
if (isDecode && sensitiveData.has(key)) {
|
||||
// 数据脱敏,自动匹配姓名、手机号、身份证
|
||||
switch (key) {
|
||||
// case 'accept_name':
|
||||
// case 'express_name':
|
||||
// case 'express_region':
|
||||
// case 'patient': {
|
||||
// // 保留前两个字符,其余用星号代替
|
||||
// aseFile = aseFile.slice(0, 1).padEnd(aseFile.length, '*');
|
||||
// break;
|
||||
// }
|
||||
// case 'express_mobile':
|
||||
// case 'mobile': {
|
||||
// // 保留前三位和后四位,中间用星号代替
|
||||
// aseFile =
|
||||
// aseFile.slice(0, 3).padEnd(aseFile.length - 4, '*') +
|
||||
// aseFile.slice(-4);
|
||||
// break;
|
||||
// }
|
||||
case 'id_card':
|
||||
case 'idcard': {
|
||||
// 保留前六位和后四位,中间用星号代替
|
||||
aseFile =
|
||||
aseFile.slice(0, 6).padEnd(aseFile.length - 4, '*') +
|
||||
aseFile.slice(-4);
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
// 默认情况下,全部用星号代替
|
||||
break;
|
||||
}
|
||||
}
|
||||
// switch (key) {
|
||||
// case 'accept_name':
|
||||
// case 'express_name':
|
||||
// case 'express_region':
|
||||
// case 'patient': {
|
||||
// // 保留前两个字符,其余用星号代替
|
||||
// aseFile = aseFile.slice(0, 1).padEnd(aseFile.length, '*');
|
||||
// break;
|
||||
// }
|
||||
// case 'express_mobile':
|
||||
// case 'mobile':
|
||||
// case 'phone': {
|
||||
// // 保留前三位和后四位,中间用星号代替
|
||||
// aseFile =
|
||||
// aseFile.slice(0, 3).padEnd(aseFile.length - 4, '*') +
|
||||
// aseFile.slice(-4);
|
||||
// break;
|
||||
// }
|
||||
// case 'id_card':
|
||||
// case 'idcard': {
|
||||
// // 保留前六位和后四位,中间用星号代替
|
||||
// aseFile =
|
||||
// aseFile.slice(0, 6).padEnd(aseFile.length - 4, '*') +
|
||||
// aseFile.slice(-4);
|
||||
// break;
|
||||
// }
|
||||
// default: {
|
||||
// // 默认情况下,全部用星号代替
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
}
|
||||
obj[key] = aseFile;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user