<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>
微信小程序用户信息手机号码中间显示*号
最新推荐文章于 2024-07-03 21:09:44 发布