解决人人商城新手机19号码段不支持的问题

来源:网络 文章列表 2020-06-20 8
人人商城前端代码校验手机号码,请填写正确手机号码的解决办法

现在新增了191号码段的手机号码,人人商城会员注册填写资料的时候填写191的号码提示:“请填写正确手机号码”,

人人商城前端js代码都在 /addons/ewei_shopv2/static/下,根据提示查看代码,找到文件,打开一看发现下面一坨

eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('2l([\'z\',\'29.28\',\'2i.2a\'],h(z){o e={M:\'\',1B:1,V:0,14:0,P:0,K:0};e.2c=h(l){e.M=l.M;$(\'#G\').u(h(){7($(\'#G\').F(\'v\')){8}7(!$(\'#i\').15()){b.f.9(\'请输入11位手机号码\');8}7($(\'#A\').19()){b.f.9(\'请输入登录密码\');8}$(\'#G\').t(\'正在登录...\').F(\'v\',1);z.T(\'m/x\',{i:$(\'#i\').j(),A:$(\'#A\').j()},h(g){b.f.9(g.w.E);7(g.C!=1){$(\'#G\').t(\'立即登录\').I(\'v\');8}S{$(\'#G\').t(\'正在跳转...\')}1q(h(){7(e.M){1b.1a=e.M;8}1b.1a=z.1o(\'\')},1Z)},N,H)})};e.k=h(){e.Z--;7(e.Z>0){$(\'#Y\').t(e.Z+\'秒后重发\').X(\'J\').F(\'J\',\'J\');1q(h(){e.k()},1Z)}S{$(\'#Y\').t(\'获取验证码\').Q(\'J\').I(\'J\')}};e.2e=h(l){e.M=l.M;e.1s=l.1s;e.U=l.U;e.q=l.q;7(e.U>0){e.Z=e.U;e.k()}$(\'#Y\').u(h(){7($(\'#Y\').1c(\'J\')){8}7(!$(\'#i\').15()){b.f.9(\'请输入11位手机号码\');8}7(!$.s($(\'#1j\').j())&&e.q==1){b.f.9(\'请输入图形验证码\');8}e.Z=1x;z.T(\'m/k\',{i:$(\'#i\').j(),q:$.s($(\'#1j\').j())||0,1F:!e.1s?"26":"2f"},h(g){b.f.9(g.w.E);7(g.C!=1){$(\'#Y\').t(\'获取验证码\').Q(\'J\').I(\'J\')}7(g.C==-1&&e.q==1){$("#1A").2d(\'u\')}7(g.C==1){e.k()}},N,H)});$("#1A").u(h(){$(1d).1z(\'1H\',\'../1I/1M.1y?c=1E&a=17&r=\'+1C.1w(1t 1K().1L()));8 N});$(\'#G\').u(h(){7($(\'#G\').F(\'v\')){8}7(!$(\'#i\').15()){b.f.9(\'请输入11位手机号码\');8}7(!$(\'#k\').1R()||$(\'#k\').1Q()!=5){b.f.9(\'请输入5位数字验证码\');8}7($(\'#A\').19()){b.f.9(\'请输入登录密码\');8}7($(\'#1n\').19()){b.f.9(\'请重复输入密码\');8}7($(\'#A\').j()!==$(\'#1n\').j()){b.f.9(\'两次密码输入不一致\');8}$(\'#G\').t(\'正在处理...\').F(\'v\',1);o 24=!e.1s?"m/22":"m/2k";z.T(24,{i:$(\'#i\').j(),k:$(\'#k\').j(),A:$(\'#A\').j()},h(g){7(g.C!=1){b.f.9(g.w.E);o y=e.1s?"立即找回":"立即注册";$(\'#G\').t(y).I(\'v\');8}S{b.1J(g.w.E,\'\',h(){7(e.M){1b.1a=z.1o(\'m/x\',{i:$(\'#i\').j(),M:e.M})}S{1b.1a=z.1o(\'m/x\',{i:$(\'#i\').j()})}})}},N,H)})};e.2j=h(l){e.U=l.U;e.M=l.M;e.q=l.q||0;7(e.U>0){e.Z=e.U;e.k()}$(\'#Y\').u(h(){7($(\'#Y\').1c(\'J\')){8}7(!$(\'#i\').15()){b.f.9(\'请输入11位手机号码!\');8}7(!$.s($(\'#1j\').j())&&e.q==1){b.f.9(\'请输入图形验证码\');8}e.Z=1x;z.T(\'m/k\',{i:$(\'#i\').j(),1F:\'25\',q:$.s($(\'#1j\').j())||0},h(g){7(g.C!=1){b.f.9(g.w.E);$(\'#Y\').t(\'获取验证码\').Q(\'J\').I(\'J\')}7(g.C==1){e.k()}},N,H)});$(\'#G\').u(h(){7($(\'#G\').F(\'v\')){8}7(!$(\'#i\').15()){b.f.9(\'请输入11位手机号码\');8}7(!$(\'#k\').1R()||$(\'#k\').1Q()!=5){b.f.9(\'请输入5位数字验证码\');8}7($(\'#A\').19()){b.f.9(\'请输入登录密码\');8}7($(\'#1n\').19()){b.f.9(\'请重复输入密码\');8}7($(\'#A\').j()!==$(\'#1n\').j()){b.f.9(\'两次密码输入不一致\');8}$(\'#G\').t(\'正在绑定...\').F(\'v\',1);z.T(\'16/B\',{i:$(\'#i\').j(),k:$(\'#k\').j(),A:$(\'#A\').j()},h(g){7(g.C==0){b.f.9(g.w.E);$(\'#G\').t(\'立即绑定\').I(\'v\');8}7(g.C<0){b.1D(g.w.E,"注意",h(){z.T(\'16/B\',{i:$(\'#i\').j(),k:$(\'#k\').j(),A:$(\'#A\').j(),1D:1},h(g){7(g.C==1){b.1J(\'绑定成功!\',\'\',h(){1b.1a=l.M?1W(l.M):z.1o(\'16\')});8}b.f.9(g.w.E);$(\'#G\').t(\'立即绑定\').I(\'v\');8},H,H)},h(){$(\'#G\').t(\'立即绑定\').I(\'v\')});8}b.1J(\'绑定成功!\',\'\',h(){1b.1a=l.M?1W(l.M):z.1o(\'16\')})},H,H)});$("#1A").u(h(){$(1d).1z(\'1H\',\'../1I/1M.1y?c=1E&a=17&r=\'+1C.1w(1t 1K().1L()));8 N})};e.2h=h(l){e.U=l.U;e.q=l.q;7(e.U>0){e.Z=e.U;e.k()}$(\'#Y\').u(h(){7($(\'#Y\').1c(\'J\')){8}7(!$(\'#i\').15()){b.f.9(\'请输入11位手机号码\');8}7(!$.s($(\'#1j\').j())&&e.q==1){b.f.9(\'请输入图形验证码\');8}e.Z=1x;z.T(\'m/k\',{i:$(\'#i\').j(),1F:\'2g\',q:$.s($(\'#1j\').j())||0},h(g){7(g.C!=1){b.f.9(g.w.E);$(\'#Y\').t(\'获取验证码\').Q(\'J\').I(\'J\')}7(g.C==1){e.k()}},N,H)});$(\'#G\').u(h(){7($(\'#G\').F(\'v\')){8}7(!$(\'#i\').15()){b.f.9(\'请输入11位手机号码\');8}7(!$(\'#k\').1R()||$(\'#k\').1Q()!=5){b.f.9(\'请输入5位数字验证码\');8}7($(\'#A\').19()){b.f.9(\'请输入登录密码\');8}7($(\'#1n\').19()){b.f.9(\'请重复输入密码\');8}7($(\'#A\').j()!==$(\'#1n\').j()){b.f.9(\'两次密码输入不一致\');8}$(\'#G\').t(\'正在修改...\').F(\'v\',1);z.T(\'16/2b\',{i:$(\'#i\').j(),k:$(\'#k\').j(),A:$(\'#A\').j()},h(g){7(g.C!=1){b.f.9(g.w.E);$(\'#G\').t(\'立即修改\').I(\'v\');8}b.1J(\'修改成功\',\'\',h(){1b.1a=z.1o(\'16\')})},N,H)});$("#1A").u(h(){$(1d).1z(\'1H\',\'../1I/1M.1y?c=1E&a=17&r=\'+1C.1w(1t 1K().1L()));8 N})};e.2m=h(l){o 1l=$(\'#m-W\');o y={x:\'登录\',B:\'为了您能及时接收到物流信息<2r>请绑定手机号后购买\',D:\'注册\',1O:\'填写个人信息\'};o 1e={x:\'请输入密码\',B:\'请设置登录密码\',D:\'请设置登录密码\'};o 3=1t 2A({2w:1l.t(),2z:"2y-e"});$(\'.m-1r\',3.3).1f(\'u\').u(h(){3.1r()});$(\'.m-W\',3.3).X(l.O);o 13=l.O==\'B\'?y.B:y.x;$(\'.m-13\',3.3).t(13);$(\'.n-p\',3.3).F(\'1v\',l.O==\'B\'?1e.B:1e.x);7(l.U>0){e.Z=l.U;e.k()}S{$(\'#Y\').Q(\'J\')}7(l.q==1){$(\'.m-W\',3.3).X(\'q\')}7(l.O==\'B\'){z.T(\'16/B/2x\',{},h(g){e.1B=g.w.1B;e.V=g.w.V;e.14=g.w.14;e.P=g.w.P;e.K=g.w.K;$(\'.n-p\',3.3).9();7(e.1B==1){$(\'.m-10\',3.3).12();$(\'.m-18\',3.3).9();$(\'.m-18\',3.3).y(\'绑定\')}3.9()},N,N)}S{3.9()}$(\'.m-18\',3.3).1f(\'u\').u(h(){o L=$(1d);7(L.F(\'v\')){b.f.9(\'操作中...\');8}o i=$.s($(\'.n-i\',3.3).j());7(!i||i==\'\'){b.f.9(\'请填写手机号\');8}7(!$.15(i)){b.f.9(\'请填写正确手机号\');8}7(l.O==\'x\'){o p=$.s($(\'.n-p\',3.3).j());7(!p||p==\'\'){b.f.9(\'请填写密码\');8}L.y(\'登录中...\').F(\'v\',1);z.T(\'m/x\',{i:i,A:p},h(g){7(g.C!=1){b.f.9(g.w.E);L.y(\'登录\').I(\'v\');8}3.1r();b.1p.9(\'登录成功\',\'1m 1m-1N\');1q(h(){b.1p.12();7(l.1g){l.1g()}},1S)},N,H)}S 7(l.O==\'B\'){o k=$.s($(\'.n-1V\',3.3).j());7(!k||k==\'\'){b.f.9(\'请填写验证码\');8}7(!e.1h(k)){b.f.9(\'请填写5位验证码\');8}o p=$.s($(\'.n-p\',3.3).j());7(!p||p==\'\'){b.f.9(\'请填写密码\');8}7(!e.1G(p)){b.f.9(\'密码至少6位\');8}o V="";o 1k=0;o 1i=0;o R=0;o P="";o K="";7(e.V==1){V=$.s($(\'.n-V\',3.3).j());7(!V||V==\'\'){b.f.9(\'请填写真实姓名\');8}}7(e.14==1){o R=$.s($(\'.n-14\',3.3).j());7(R!=2v&&R!=\'\'){o R=R.2n(\'-\');1k=R[0];1i=R[1];R=R[2]}S{b.f.9(\'请选择出生日期\');8}}7(e.P==1){P=$.s($(\'.n-P\',3.3).j());7(!P||P==\'\'||!$(\'.n-P\',3.3).2t()){b.f.9(\'请填写正确身份证号码\');8}}7(e.K==1){K=$.s($(\'.n-K\',3.3).j());7(!K||K==\'\'){b.f.9(\'请填写微信号\');8}}L.y(\'绑定中...\').F(\'v\',1);z.T(\'16/B\',{i:i,k:k,A:p,1X:V,1k:1k,1i:1i,R:R,27:P,K:K},h(g){7(g.C==0){7(g.w.E==\'验证码错误或已过期\'){$(\'.m-23 21\',3.3).u()}b.f.9(g.w.E);L.t(\'绑定\').I(\'v\');8}S 7(g.C<0){3.3.12();b.1D(g.w.E,"注意",h(){z.T(\'16/B\',{i:i,k:k,A:p,1D:1,1X:V,1k:1k,1i:1i,R:R,27:P,K:K},h(g){7(g.C==1){3.1r();b.1p.9(\'绑定成功\',\'1m 1m-1N\');1q(h(){b.1p.12();7(l.1g){l.1g()}},1S);8}b.f.9(g.w.E);L.t(\'绑定\').I(\'v\');8},H,H)},h(){L.t(\'绑定\').I(\'v\');3.3.9();$(\'.2s-20\').2u();b.20.9()});8}3.1r();b.1p.9(\'绑定成功\',\'1m 1m-1N\');1q(h(){b.1p.12();7(l.1g){l.1g()}},1S)},N,H)}S 7(l.O==\'D\'){o k=$.s($(\'.n-1V\',3.3).j());7(!k||k==\'\'){b.f.9(\'请填写验证码\');8}7(!e.1h(k)){b.f.9(\'请填写5位验证码\');8}o p=$.s($(\'.n-p\',3.3).j());7(!p||p==\'\'){b.f.9(\'请填写密码\');8}7(!e.1G(p)){b.f.9(\'密码至少6位\');8}o 1u=$.s($(\'.n-1u\',3.3).j());7(!1u||1u==\'\'){b.f.9(\'请重复填写密码\');8}7(p!=1u){b.f.9(\'两次输入的密码不一致\');8}L.y(\'注册中...\').F(\'v\',1);z.T(\'m/22\',{i:i,k:k,A:p},h(g){7(g.C!=1){b.f.9(g.w.E);L.y(\'注册\').I(\'v\');7(g.w.E==\'验证码错误或已过期\'){$(\'.m-W\',3.3).Q(\'D-10\').X(\'D\')}8}S{b.f.9(\'注册成功,请登录\');$(\'.m-W\',3.3).Q(\'D-10\').X(\'x\');l.O=\'x\';$(\'.n-p\',3.3).F(\'1v\',1e.x);L.y(\'登录\').I(\'v\')}},N,H)}});$(\'.18-2q\',3.3).1f(\'u\').u(h(){o L=$(1d);7(L.1c(\'J\')){8}o i=$.s($(\'.n-i\',3.3).j());7(!i||i==\'\'){b.f.9(\'请填写手机号\');8}o q=0;7(l.q==1){o q=$.s($(\'.n-1U\',3.3).j());7(!q||q==\'\'){b.f.9(\'请填写图形验证码\');8}7(!e.1h(q,H)){b.f.9(\'请填写4位图形验证码\');8}}e.Z=1x;z.T(\'m/k\',{i:i,1F:l.O==\'B\'?\'25\':\'26\',q:q},h(g){7(g.C!=1){b.f.9(g.w.E);L.t(\'发送验证码\').Q(\'J\');7(g.w.E==\'此手机号已注册,请直接登录\'){$(\'.m-W\',3.3).Q(\'D\').X(\'x\');l.O=\'x\';$(\'.m-18\',3.3).y(\'登录\').I(\'v\');$(\'.m-13\',3.3).t(y.x);$(\'.n-p\',3.3).F(\'1v\',1e.x)}}7(g.C==1){b.f.9(\'发送成功\');e.k()}},N,H)});$(\'.m-10\',3.3).1f(\'u\').u(h(){o L=$(1d);7(L.F(\'v\')){b.f.9(\'操作中...\');8}o i=$.s($(\'.n-i\',3.3).j());7(!i||i==\'\'){b.f.9(\'请填写手机号\');8}7(!$.15(i)){b.f.9(\'请填写正确手机号\');8}o q=0;7(l.q==1){q=$.s($(\'.n-1U\',3.3).j());7(!q||q==\'\'){b.f.9(\'请填写图形验证码\');8}7(!e.1h(q,H)){b.f.9(\'请填写4位图形验证码\');8}}o k=$.s($(\'.n-1V\',3.3).j());7(!k||k==\'\'){b.f.9(\'请填写短信验证码\');8}7(!e.1h(k)){b.f.9(\'请填写5位短信验证码\');8}7(l.O==\'B\'){o p=$.s($(\'.n-p\',3.3).j());7(!p||p==\'\'){b.f.9(\'请填写密码\');8}7(!e.1G(p)){b.f.9(\'密码至少6位\');8}7(e.V==1){$(\'.n-V\',3.3).9()}7(e.14==1){$(\'.n-14\',3.3).9();$(\'.n-14\',3.3).2p()}7(e.P==1){$(\'.n-P\',3.3).9()}7(e.K==1){$(\'.n-K\',3.3).9()}$(\'.n-p\',3.3).12();$(\'.m-W\',3.3).Q(\'B\').X(\'B-10\');$(\'.m-13\',3.3).t(y.1O);$(\'.m-18\',3.3).y(\'绑定\')}S 7(l.O==\'D\'){$(\'.m-W\',3.3).Q(\'D\').X(\'D-10\');$(\'.m-13\',3.3).t(y.1O);$(\'.m-18\',3.3).y(\'注册\')}});$(\'.m-23 21\',3.3).1f(\'u\').u(h(){7(l.O==\'x\'){$(\'.m-13\',3.3).t(y.D);$(\'.m-W\',3.3).Q(\'x\').X(\'D\');$(\'.n-p\',3.3).F(\'1v\',1e.D);l.O=\'D\'}});$(\'.m-2o\',3.3).1f(\'u\').u(h(){o 1l=$(\'.m-W\',3.3);7(1l.1c(\'D-10\')){$(\'.m-W\',3.3).Q(\'D-10\').X(\'D\');$(\'.m-13\',3.3).t(y.D)}S 7(1l.1c(\'D\')){$(\'.m-W\',3.3).Q(\'D\').X(\'x\');$(\'.m-13\',3.3).t(y.x);$(\'.n-p\',3.3).F(\'1v\',1e.x);l.O=\'x\'}S 7(1l.1c(\'B-10\')){$(\'.m-W\',3.3).Q(\'B-10\').X(\'B\');$(\'.m-13\',3.3).t(y.B);$(\'.n-p\',3.3).9();$(\'.n-V\',3.3).12();$(\'.n-14\',3.3).12();$(\'.n-P\',3.3).12();$(\'.n-K\',3.3).12()}});$(\'.18-1U\',3.3).1f(\'u\').u(h(){$(1d).1z(\'1H\',\'../1I/1M.1y?c=1E&a=17&r=\'+1C.1w(1t 1K().1L()));8 N})};e.1h=h(17,1Y){7(1Y){8 $.s(17)!==\'\'&&/^\\d{4}$/.1P($.s(17))}8 $.s(17)!==\'\'&&/^\\d{5}$/.1P($.s(17))};e.1G=h(1T){8 $.s(1T)!==\'\'&&/^.{6,}$/.1P($.s(1T))};8 e});',62,161,'|||container||||if|return|show||FoxUI|||modal|toast|ret|function|mobile|val|verifycode|params|account|input|var|password|imgcode||trim|html|click|stop|result|login|text|core|pwd|bind|status|reg|message|attr|btnSubmit|true|removeAttr|disabled|bindwechat|_this|backurl|false|action|bindidnumber|removeClass|birthday|else|json|endtime|bindrealname|layer|addClass|btnCode|seconds|next||hide|title|bindbirthday|isMobile|member|code|btn|isEmpty|href|location|hasClass|this|passText|unbind|success|codeLen|birthmonth|verifycode2|birthyear|obj|icon|pwd1|getUrl|loader|setTimeout|close|type|new|password2|placeholder|round|60|php|prop|btnCode2|nohasbindinfo|Math|confirm|utility|temp|strLen|src|web|alert|Date|getTime|index|check|pass|test|len|isInt|500|str|image|verify|atob|realname|img|1000|mask|span|register|tip|url|sms_bind|sms_reg|idnumber|picker|foxui|gcjs|changepwd|initLogin|trigger|initRf|sms_forget|sms_changepwd|initChange|jquery|initBind|forget|define|initQuick|split|back|datePicker|send|br|fui|isIDCard|remove|undefined|content|getbindinfo|popup|extraClass|FoxUIModal'.split('|'),0,{}))

顿时间,懵逼了。

 

一开始以为,人人商城里应该有未加密压缩的文件吧,翻来覆去,找了半天也没有找到。

后来最终找到办法,将代码还原了回来

得到如下代码,此时,即可很方便的进行代码修改了

define(['core'], function (core, tpl, picker) {
    var modal = {backurl: ''};
    modal.initLogin = function (params) {
        modal.backurl = params.backurl;
        $('#btnSubmit').click(function () {
            if ($('#btnSubmit').attr('stop')) {
                return
            }
            if ($.trim($('#mobile').val()) !== '' && /^1[3|4|5|7|8][0-9]\d{8}$/.test($.trim($('#mobile').val()))) {
 
            }
            else
            {
                FoxUI.toast.show('请填写正确手机号码');
                return
 
            }
            if ($('#pwd').val()== undefined || $.trim($('#pwd').val()) == '' ) {
                FoxUI.toast.show('请输入登录密码!');
                return
            }
            $('#btnSubmit').html('正在登录...').attr('stop', 1);
            core.json('pc.account.login', {mobile: $('#mobile').val(), pwd: $('#pwd').val()}, function (ret) {
                FoxUI.toast.show(ret.result.message);
                if (ret.status != 1) {
                    $('#btnSubmit').html('立即登录').removeAttr('stop');
                    return
                } else {
                    $('#btnSubmit').html('正在跳转...')
                }
                setTimeout(function () {
                    if (modal.backurl) {
                        location.href = modal.backurl;
                        return
                    }
                    location.href = core.getUrl('pc')
                }, 1000)
            }, false, true)
        })
    };
    modal.verifycode = function () {
        modal.seconds--;
        if (modal.seconds > 0) {
            $('#btnCode').html(modal.seconds + '秒后重发').addClass('disabled').attr('disabled', 'disabled');
            setTimeout(function () {
                modal.verifycode()
            }, 1000)
        } else {
            $('#btnCode').html('获取验证码').removeClass('disabled').removeAttr('disabled')
        }
    };
    modal.initRf = function (params) {
        modal.backurl = params.backurl;
        modal.type = params.type;
        modal.endtime = params.endtime;
        if (modal.endtime > 0) {
            modal.seconds = modal.endtime;
            modal.verifycode()
        }
        $('#btnCode').click(function () {
            if ($('#btnCode').hasClass('disabled')) {
                return
            }
            if ($.trim($('#mobile').val()) !== '' && /^1[3|4|5|7|8][0-9]\d{8}$/.test($.trim($('#mobile').val()))) {
 
            }
            else
            {
                FoxUI.toast.show('请填写正确手机号码');
                return
 
            }
            modal.seconds = 60;
            modal.verifycode();
            core.json('pc.account.verifycode', {
                mobile: $('#mobile').val(),
                temp: !modal.type ? "sms_reg" : "sms_forget"
            }, function (ret) {
                FoxUI.toast.show(ret.result.message);
                if (ret.status != 1) {
                    $('#btnCode').html('获取验证码').removeClass('disabled').removeAttr('disabled')
                }
            }, false, true)
        });
        $('#btnSubmit').click(function () {
            if ($('#btnSubmit').attr('stop')) {
                return
            }
            if ($.trim($('#mobile').val()) !== '' && /^1[3|4|5|7|8][0-9]\d{8}$/.test($.trim($('#mobile').val()))) {
 
            }
            else
            {
                FoxUI.toast.show('请填写正确手机号码');
                return
            }
            var isnum
            if ($('#verifycode').val().length != 5) {
                FoxUI.toast.show('请输入5位数字验证码!');
                return
            }
            if ($('#pwd').val()== undefined || $.trim($('#pwd').val()) == '' ) {
                FoxUI.toast.show('请输入登录密码!');
                return
            }
            if ($('#pwd').val() !== $('#pwd1').val()) {
                FoxUI.toast.show('两次密码输入不一致!');
                return
            }
            $('#btnSubmit').html('正在处理...').attr('stop', 1);
            var url = !modal.type ? "pc.account.register" : "pc.account.forget";
            core.json(url, {
                mobile: $('#mobile').val(),
                verifycode: $('#verifycode').val(),
                pwd: $('#pwd').val()
            }, function (ret) {
                if (ret.status != 1) {
                    FoxUI.toast.show(ret.result.message);
                    var text = modal.type ? "立即找回" : "立即注册";
                    $('#btnSubmit').html(text).removeAttr('stop');
                    return
                } else {
                    FoxUI.alert(ret.result.message, '', function () {
                        if (modal.backurl) {
                            location.href = core.getUrl('pc.account.login', {
                                mobile: $('#mobile').val(),
                                backurl: modal.backurl
                            })
                        } else {
                            location.href = core.getUrl('pc.account.login', {mobile: $('#mobile').val()})
                        }
                    })
                }
            }, false, true)
        })
    };
    modal.initBind = function (params) {
        modal.endtime = params.endtime;
        modal.backurl = params.backurl;
        if (modal.endtime > 0) {
            modal.seconds = modal.endtime;
            modal.verifycode()
        }
        $('#btnCode').click(function () {
            if ($('#btnCode').hasClass('disabled')) {
                return
            }
            if ($.trim($('#mobile').val()) !== '' && /^1[3|4|5|7|8][0-9]\d{8}$/.test($.trim($('#mobile').val()))) {
 
            }
            else
            {
                FoxUI.toast.show('请输入11位手机号码');
                return
 
            }
            modal.seconds = 60;
            modal.verifycode();
            core.json('account/verifycode', {mobile: $('#mobile').val(), temp: 'sms_bind'}, function (ret) {
                if (ret.status != 1) {
                    FoxUI.toast.show(ret.result.message);
                    $('#btnCode').html('获取验证码').removeClass('disabled').removeAttr('disabled')
                }
            }, false, true)
        });
        $('#btnSubmit').click(function () {
            if ($('#btnSubmit').attr('stop')) {
                return
            }
            if ($.trim($('#mobile').val()) !== '' && /^1[3|4|5|7|8][0-9]\d{8}$/.test($.trim($('#mobile').val()))) {
 
            }
            else
            {
                FoxUI.toast.show('请输入11位手机号码');
                return
 
            }
            if ($('#verifycode').val().length != 5) {
                FoxUI.toast.show('请输入5位数字验证码!');
                return
            }
            if ($('#pwd').val()== undefined || $.trim($('#pwd').val()) == '' ) {
                FoxUI.toast.show('请输入登录密码!');
                return
            }
            if ($('#pwd').val() !== $('#pwd1').val()) {
                FoxUI.toast.show('两次密码输入不一致!');
                return
            }
            $('#btnSubmit').html('正在绑定...').attr('stop', 1);
            core.json('member/bind', {
                mobile: $('#mobile').val(),
                verifycode: $('#verifycode').val(),
                pwd: $('#pwd').val()
            }, function (ret) {
                if (ret.status == 0) {
                    FoxUI.toast.show(ret.result.message);
                    $('#btnSubmit').html('立即绑定').removeAttr('stop');
                    return
                }
                if (ret.status < 0) {
                    FoxUI.confirm(ret.result.message, "注意", function () {
                        core.json('pc.member.bind', {
                            mobile: $('#mobile').val(),
                            verifycode: $('#verifycode').val(),
                            pwd: $('#pwd').val(),
                            confirm: 1
                        }, function (ret) {
                            if (ret.status == 1) {
                                FoxUI.alert('绑定成功!', '', function () {
                                    location.href = params.backurl ? atob(params.backurl) : core.getUrl('pc.member')
                                });
                                return
                            }
                            FoxUI.toast.show(ret.result.message);
                            $('#btnSubmit').html('立即绑定').removeAttr('stop');
                            return
                        }, true, true)
                    }, function () {
                        $('#btnSubmit').html('立即绑定').removeAttr('stop')
                    });
                    return
                }
                FoxUI.alert('绑定成功!', '', function () {
                    location.href = params.backurl ? atob(params.backurl) : core.getUrl('pc.member')
                })
            }, true, true)
        })
    };
    modal.initChange = function (params) {
        modal.endtime = params.endtime;
        if (modal.endtime > 0) {
            modal.seconds = modal.endtime;
            modal.verifycode()
        }
        $('#btnCode').click(function () {
            if ($('#btnCode').hasClass('disabled')) {
                return
            }
            if ($.trim($('#mobile').val()) !== '' && /^1[3|4|5|7|8][0-9]\d{8}$/.test($.trim($('#mobile').val()))) {
 
            }
            else
            {
                FoxUI.toast.show('请输入11位手机号码');
                return
 
            }
            modal.seconds = 60;
            modal.verifycode();
            core.json('pc.account.verifycode', {mobile: $('#mobile').val(), temp: 'sms_changepwd'}, function (ret) {
                if (ret.status != 1) {
                    FoxUI.toast.show(ret.result.message);
                    $('#btnCode').html('获取验证码').removeClass('disabled').removeAttr('disabled')
                }
            }, false, true)
        });
        $('#btnSubmit').click(function () {
            if ($('#btnSubmit').attr('stop')) {
                return
            }
            if ($.trim($('#mobile').val()) !== '' && /^1[3|4|5|7|8][0-9]\d{8}$/.test($.trim($('#mobile').val()))) {
 
            }
            else
            {
                FoxUI.toast.show('请输入11位手机号码');
                return
 
            }
            if ( $('#verifycode').val().length != 5) {
                FoxUI.toast.show('请输入5位数字验证码!');
                return
            }
            if ($('#pwd').val()== undefined || $.trim($('#pwd').val()) == '' ) {
                FoxUI.toast.show('请输入登录密码!');
                return
            }
            if ($('#pwd').val() !== $('#pwd1').val()) {
                FoxUI.toast.show('两次密码输入不一致!');
                return
            }
            $('#btnSubmit').html('正在修改...').attr('stop', 1);
            core.json('pc.member.changepwd', {
                mobile: $('#mobile').val(),
                verifycode: $('#verifycode').val(),
                pwd: $('#pwd').val()
            }, function (ret) {
                if (ret.status != 1) {
                    FoxUI.toast.show(ret.result.message);
                    $('#btnSubmit').html('立即修改').removeAttr('stop');
                    return
                }
                FoxUI.alert('修改成功!', '', function () {
                    location.href = core.getUrl('pc.member')
                })
            }, false, true)
        })
    };
    return modal
});

 

只需要将正则表达式 /^1[3|4|5|7|8][0-9]\d{8}$/  改为  ^1[3|4|5|7|8|9][0-9]\d{8}$   

如果您遇到同样的问题,可以联系我协助解决  wx: juzilo123

腾讯云限量秒杀

1核2G 5M 50元/年 2核4G 8M 74元/年 4核8G 5M 818元/年 CDN流量包 100GB 9元

版权声明

本站部分原创文章,部分文章整理自网络。如有转载的文章侵犯了您的版权,请联系站长删除处理。如果您有优质文章,欢迎发稿给我们!联系站长:
愿本站的内容能为您的学习、工作带来绵薄之力。

评论

  • 随机获取
点击刷新
精彩评论

友情链接