Commit c364e25c1679623d5b8069386e051c1624ae4542

Authored by fengtao
1 parent c1d9485f

fix:修改我的页面,手机号加密显示问题

Showing 1 changed file with 4 additions and 3 deletions
... ... @@ -173,8 +173,9 @@ export default {
173 173 },
174 174 methods: {
175 175 handlePhoneFunc(e) {
176   - //前三后四位*号
177   - const y = e.replace(/(\d{3})\d{4}(\d{4})/, '***$2****');
  176 + //前三后四位显示
  177 + const result = /^(\d{3})\d{4}(\d{4})$/;
  178 + const y = e.toString().replace(result, '$1****$2');
178 179 return y;
179 180 },
180 181 ...mapMutations(['emptyUserInfo', 'setUserInfo']),
... ... @@ -428,4 +429,4 @@ export default {
428 429
429 430 <style lang="scss" scoped>
430 431 @import './static/personal.scss';
431   -</style>
  432 +</style>
... ...