|
楼主 |
发表于 2016-4-15 10:36:56
|
显示全部楼层
- Model.prototype.sendsmsButton = function(event){
- //获取手机号
- var mobile = this.comp("mobile").val()
- var reg = /^0?1[3|4|5|7|8][0-9]\d{8}$/;
- if(reg.test(mobile)){
- if(num>0){
- justep.Util.hint("该手机号已注册,请直接登陆");
- }else{
- var me =this;
- this.comp("sendsmsbutton").mytimer();
- //把手机号发往后台
- var params = {
- "mobile":this.comp("userData").getValue("mobile")
- };
- // 向后台发送请求
- Baas.sendRequest({
- "url" : "/hy/recycle",
- "action" : "checkCodeAction", // action
- "params" : params,
- // 请求成功后的回调方法
- "success" : function(data) {
- var codes = data.CheckCode;
- localStorage.value = codes;
- }
- });
- }
- }
- else{
- justep.Util.hint("手机号码不正确!")
- }
- };
-
复制代码 |
|