javascript积累
1.把手机号码中间四位替换成* var ciphertext = mobile.substr(0, 3) + '****' + mobile.substr(7);
2.常用的手机号码验证 checkPhone: function(phoneNumber) { let str = /^1\d{10}$/; if (str.test(phoneNumber)) { return true; } else { wx.showModal({ content: '手机号码不正确', showCancel: false }); return false; } },