catchEvent:function(){ //验证码倒计时 var that = this; var user_name = this.data.user_name; that.setData({ yzmstatus:1 }) console.log(user_name) var pattern = /^(((13[0-9]{1})|(17[0-9]{1})|(15[0-9]{1})|(18[0-9]{1}))+\d{8})$/; if (!pattern.test(user_name)) { wx.showModal({ title: ‘提示’, showCancel:false, content: ‘请输入合法的手机号’, success: function(res) { } }) return; }else{ wx.request({ url: snsUrl+’/?/account/ajax/check_username/username-’+user_name, data: {}, method: ‘GET’, // OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, CONNECT // header: {}, // 设置请求的 header success: function(res){ that.setData({ yzmstatus:1 }) // success console.log(res) if(res.data.errno == 1){ that.setData({ yzmstatus:0 }) wx.showModal({ title: ‘提示’, showCancel:false, content: ‘您还没有注册账号!请先注册!’, success: function(res) { } }) return; }else{ wx.request({ url: snsUrl+’/?/account/ajax/get_message_code/’, data: { phone:user_name },例如:在电脑端输入 18518966393 提示:您还没有注册账号!请先注册 在手机端输入 18518966393 提示:请输入合法的手机号
开发者端和手机端显示不一致问题