fix: 订单管理新增查看处方功能,接诊页面优化
This commit is contained in:
@@ -175,7 +175,7 @@ function getRes(obj: any, isDecode = true) {
|
||||
if (arr.has(key)) {
|
||||
let aseFile = '';
|
||||
aseFile = isDecode
|
||||
? customBase64Decode(obj[key])
|
||||
? customBase64Decode(obj[key], key)
|
||||
: customBase64Encode(obj[key]);
|
||||
const isGarbled =
|
||||
// eslint-disable-next-line no-control-regex
|
||||
@@ -232,8 +232,9 @@ function getRes(obj: any, isDecode = true) {
|
||||
/**
|
||||
* 解密
|
||||
* @param data
|
||||
* @param key
|
||||
*/
|
||||
function customBase64Decode(data: string) {
|
||||
function customBase64Decode(data: string, key = '') {
|
||||
// return data
|
||||
try {
|
||||
// 第一次Base64解码
|
||||
@@ -244,7 +245,10 @@ function customBase64Decode(data: string) {
|
||||
const base64 = Base64.decode(subStr);
|
||||
return base64.length > 0 ? base64 : data;
|
||||
} catch (error) {
|
||||
console.error(`解码Base64字符串【${data}】时发生错误`, error);
|
||||
console.error(
|
||||
`解码Base64字符串【${data}】时发生错误,KEY:【${key}】`,
|
||||
error,
|
||||
);
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user