Commit 9770ceb3ec0607df82616441cf2a0fd58a2005e0

Authored by xp.Huang
2 parents b3a18800 76ce45e4

Merge branch 'ft-dev' into 'main'

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

See merge request huang/thingskit-app!64
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>
... ...