<view class="number">{{userinfo.mobile ? phone.toHide(userinfo.mobile):""}}</view>
<!-- 使用wxs 手机号码中间四位显示为*号 -->
<wxs module="phone">
var toHide = function (array) {
var mphone = array.substring(0, 3) + '****' + array.substring(7);
return mphone;
}
module.exports.toHide = toHide;
</wxs>
09-23
667
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
11-20