Add maskEmail(), fix Safari bug.

This commit is contained in:
Yang Luo
2021-06-25 21:35:20 +08:00
parent 234a9b9060
commit 2ba44748c2
3 changed files with 33 additions and 7 deletions

View File

@ -298,9 +298,7 @@ class ForgetPage extends React.Component {
{this.state.phone.replace(/(\d{3})\d*(\d{4})/,'$1****$2')}
</Option>
<Option key={2} value={this.state.email}>
{this.state.email.split("@")[0].length>2?
this.state.email.replace(/(?<=.)[^@]+(?=.@)/, "*****"):
this.state.email.replace(/(\w?@)/, "*@")}
{Setting.maskEmail(this.state.email)}
</Option>
</Select>
}