zhengyiming
5 天以前 40ef0e230f91d5ff0cb196fad95d1f9c2bdcec10
packages/utils/common.ts
@@ -136,6 +136,11 @@
  return realIDNumber.replace(/^(\d+)(.{6})$/, '$1******');
};
export const showBankCodeForEnd4 = (bankCode: string) => {
  if (!bankCode) return '';
  return '*'.repeat(Math.max(0, bankCode.length - 4)) + bankCode.slice(-4);
};
export const hiddenPhone = (phone: string) => {
  if (!phone) return '';
  return phone.replace(/(\d{3})\d{4}(\d{4})/, '$1****$2');