Merge branch 'dev' into hotfix
This commit is contained in:
@@ -129,6 +129,21 @@ export function formatDuration(start: number, end?: number): string {
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 转为匿名数字 number | undefined
|
||||
*/
|
||||
export function toAnonymousNumber(value: string | undefined): number {
|
||||
if (value === undefined || value === null) {
|
||||
return value as unknown as number;
|
||||
}
|
||||
const num = Number.parseInt(value);
|
||||
if (Number.isNaN(num)) {
|
||||
return undefined as unknown as number;
|
||||
} else {
|
||||
return num;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 格式化数字为 ,分割
|
||||
*/
|
||||
|
||||
@@ -12,7 +12,7 @@ export const encrypt = async (data: string | undefined): Promise<string | undefi
|
||||
return data;
|
||||
}
|
||||
// 获取公钥
|
||||
const publicKey = (await useCacheStore().loadSystemSetting()).encrypt?.publicKey;
|
||||
const publicKey = (await useCacheStore().loadSystemSetting()).encrypt_publicKey;
|
||||
const encryptor = new JSEncrypt();
|
||||
encryptor.setPublicKey(publicKey);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user