var myreg = /^(((13[0-9]{1})|(15[0-9]{1})|(18[0-9]{1})|(17[0-9]{1}))+d{8})$/;if(phoneMobile.length===0){    wx.showToast({        title: '输入的手机号为空',        icon: 'none',        duration: 1500    });    return false;}else if (phoneMobile.length 11) {    wx.showToast({        title: '手机号长度有误!',        icon: 'none',        duration: 1500    });    return false;} else if (!myreg.test(phoneMobile)) {    wx.showToast({        title: '手机号有误!',        icon: 'none',        duration: 1500    });    return false;}

TAG标签: 微信小程序手机设备号

http://www.xiaochengxub.com/read-103966.html