手机号隐藏
This commit is contained in:
parent
b075c6adad
commit
a13a2331ee
|
@ -16,8 +16,12 @@ Page({
|
||||||
* 生命周期函数--监听页面加载
|
* 生命周期函数--监听页面加载
|
||||||
*/
|
*/
|
||||||
onLoad: function (options) {
|
onLoad: function (options) {
|
||||||
|
let userinfo = getApp().globalData.userinfo
|
||||||
|
if(userinfo.username){
|
||||||
|
userinfo.username = userinfo.username.replace(/(\d{3})(\d{4})(\d{4})/,"$1****$3")
|
||||||
|
}
|
||||||
this.setData({
|
this.setData({
|
||||||
userinfo: getApp().globalData.userinfo
|
userinfo: userinfo
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue