PageSourceSearch

https://member.fx678.com/js/RegMobile.js?str=20230620

js fx678.com collected 2026-09-24 17:45:18 UTC 11,095 bytes, 299 lines download raw bytes

1$(document).ready(function () {
2
3
4    var imgUrl = "/images/flags/";
5    //切换国家
6    var register_c_code = '0086';
7    var login_c_code = '0086';
8    $(".choose_country li").on("click", function (event) {
9        let _this = $(event.target);
10        $('.choose_country').hide();
11        $('.national_flag > .this_flag').css("background-color", "#fff");
12        let this_img = _this.attr('name-data');
13        let this_code = _this.attr('code-data');
14        _this.parents('.choose_country').prev().find(".areacode").html(this_code);
15        _this.parents('.choose_country').prev().children('img').attr('src', imgUrl + this_img + '.png');
16
17        if (_this.parents('.choose_country').prev().find("span").hasClass('register_code')) {
18            register_c_code = this_code;
19        }
20        else if (_this.parents('.choose_country').prev().find("span").hasClass('login_code')) {
21            login_c_code = this_code
22        }
23    });
24
25    if ($.cookie("pretime") != null) {
26        Countdown(120);
27    }
28
29    //发送手机激活码按钮事件
30    $("#code_send").click(function () {
31        var mobile = $("#phone").val();
32        // var code = $("#mobileCheckCode").val();
33        var number = 120;
34        var reg = /^[1][3456789][0-9]{9}$/;
35        // var tip =$("#phoneTip").html();
36        var img = $("#mobileVerfyCode");
37        var btnStatus = $('#code_send ').attr('isPermit');
38
39        // if (code == "" || code == null) {
40        //     layer.msg('图形验证码不能为空', '', function () {
41        //         img.trigger("click");
42        //     });
43        //     return;
44        // }
45
46        if (captchaPrarm.token == "") {
47            ShowTip($("#captcha"), "请完成验证");
48            return false;
49        }
50
51        if (btnStatus == 'no') {
52            return false;
53        }
54        if (mobile == '') {
55            ShowTip($("#phone"), "手机号码不能为空");
56            return false;
57        }
58        if (register_c_code == '0086') {
59            if (reg.test(mobile) == false) {
60                ShowTip($("#phone"), "您输入的手机号码格式不正确");
61                return false;
62            }
63        }
64        // if(tip == '您注册的手机号码已存在'){return false;}
65
66        $.ajax({
67            type: "post",
68            cache: false,
69            addidvalue: true,
70            url: registerSmsUrl,
71            data: {
72                "mobile": mobile,
73                // "pictureCode": code,
74                "area_code": register_c_code,
75                sessionId: captchaPrarm.sessionid,
76                sig: captchaPrarm.sig,
77                token: captchaPrarm.token,
78                scene: captchaPrarm.scene,
79
80            },
81            success: function (data) {
82                captchaObj.reset();
83                captchaPrarm = {
84                    sessionid: "",
85                    sig: "",
86                    token: "",
87                    scene: 'ic_register'
88                }
89                if (data == '0') {
90                    $('#mobileAction ').removeAttr('disabled');
91                    Countdown(number);   //倒计时
92                } else if (data == '-1') {
93                    layer.msg('您注册的手机号码已存在!', '', function () {
94                        img.trigger("click");
95                    });
96                }
97                // else if (data == '-2') {
98                //     layer.msg('图形验证码不正确', '', function () {
99                //         img.trigger("click");
100                //     });
101                // }
102                else {
103                    layer.msg('请重新获取', '', function () {
104                        img.trigger("click");
105                    });
106                }
107                changeVerifyCode('mobileVerfyCode');
108            }
109        });
110
111    });
112
113    //验证模块
114    $.formValidator.initConfig();
115    $("#mobileAction").click(function () {
116        //点击提交按钮,进行注册
117        $("#mobileAction").attr('disabled', 'true');
118        $("#mobileAction").css('background-color', 'lightgrey');
119        $("#mobileAction").css('border-color', 'lightgrey');
120        $("#mobileAction").html("提交中...");
121        var Psw = $("#mobilePsw").val();
122        var Account = $("#phone").val();
123        var img = $("#mobileVerfyCode");
124        var ActivationCode = $("#ActivationCode").val();
125        // var checkCode = $("#mobileCheckCode").val();
126        var moblieAgreen = $("#moblieAgreen").attr("checked");
127        var clientId = getQueryString('client_id');
128        var phoneReg = /^[1][3456789][0-9]{9}$/;
129        var nickReg = /^[\u4e00-\u9fa5a-zA-Z0-9]{2,20}$/;
130
131        // if (checkCode == "" || checkCode == null) {
132        //     layer.msg('图形验证码不能为空');
133        //     img.trigger("click");
134        //     removeDisable("#mobileAction");
135        //     return;
136        //
137
138        if (Account == '') {
139            ShowTip($("#phone"), "手机号码不能为空");
140            removeDisable("#mobileAction");
141            return;
142        }
143        if (captchaPrarm.token == "") {
144            ShowTip($("#captcha"), "请完成验证");
145            removeDisable("#mobileAction");
146            return false;
147        }
148        if (!HTPsw(Psw)) {
149            ShowTip($("#mobilePsw"), "您输入的密码格式不正确");
150            removeDisable("#mobileAction");
151            return;
152        }
153
154        if (ActivationCode == "") {
155            ShowTip($("#ActivationCode"), "激活码不能为空");
156            removeDisable("#mobileAction");
157            return;
158        }
159        if (moblieAgreen != "checked") {
160            layer.msg("你需要同意本协议");
161            removeDisable("#mobileAction");
162            return;
163        }
164        removeDisable("#mobileAction");
165        $.ajax({
166            type: "POST",
167            url: userRegisterUrl,
168            data: {
169                "Psw": Psw,
170                "Account": Account,
171                "nickname": '',
172                "ActivationCode": ActivationCode,
173                // "checkCode": checkCode,
174                "clientId": clientId,
175                "area_code": register_c_code,
176                "sessionId": captchaPrarm.sessionid,
177                "sig": captchaPrarm.sig,
178                "token": captchaPrarm.token,
179                "scene": captchaPrarm.scene,
180            },
181            cache: false,
182            success: function (result) {
183                removeDisable("#mobileAction");
184                img.trigger("click");
185                if (result.code != '0') {
186                    captchaObj.reset();
187                    captchaPrarm = {
188                        sessionid: "",
189                        sig: "",
190                        token: "",
191                        scene: 'ic_register'
192                    }
193                }
194                if (result.code == '0') {
195                    $.cookie("mobile", null);
196                    location = informationUrl;
197                } else if (result.code == '-1') {
198                    layer.msg("手机激活码过期,请重新获取");
199                } else if (result.code == '-2') {
200                    layer.msg("手机激活码错误,请重新获取");
201                } else if (result.code == '-3') {
202                    layer.msg("昵称格式不正确,请重新输入");
203                } else if (result.code == '-4') {
204                    layer.msg("缺少参数");
205                } else if (result.code == '-5') {
206                    layer.msg("手机号不符合要求,请换其它号码");
207                } else if (result.code == '-6') {
208                    layer.msg("验证错误");
209                } else if (result.code == '-7') {
210                    layer.msg("提交太频繁,请稍后再试");
211                } else if (result.code == '-8') {
212                    layer.msg("您注册的手机号码已存在");
213                } else if (result.code == '-9') {
214                    layer.msg("账号格式错误");
215                } else if (result.code == '-10') {
216                    layer.msg("注册的昵称已存在");
217                } else if (result.code == '-10') {
218                    layer.msg("注册的昵称已存在");
219                } else if (result.code == '500') {
220                    layer.msg("服务器错误,请稍后再试");
221                }
222            },
223            error: function () {
224                removeDisable("#mobileAction");
225            }
226        });
227    });
228
229    //手机号码格式校验,并验证是否存在该手机号码
230    // $("#phone").formValidator({
231    //     tipID: "phoneTip", onShow: "", onFocus: function () {
232    //         ShowTip($("#phone"), "请输入11位手机号码");
233    //         return ''
234    //     }, onCorrect: function () {
235    //         ShowTip($("#phone"), "可用");
236    //         return ''
237    //     }
238    // }).regexValidator({
239    //     regExp: "mobile", dataType: "enum", onError: function () {
240    //         ShowTip($("#phone"), "您输入的手机号码格式不正确");
241    //         return ''
242    //     }
243    // });
244
245    //密码格式校验
246    $("#mobilePsw").formValidator({
247        tipID: "mobilePswTip", onShow: "", onFocus: function () {
248            ShowTip($("#mobilePsw"), "请填写6-16位英文字母、数字或符号的组合");
249            return false;
250        }, onCorrect: ""
251    }).functionValidator({
252        fun: HTPsw, onError: function () {
253            ShowTip($("#mobilePsw"), "您输入的密码格式不正确");
254            return false;
255        }
256    });
257
258    //倒计时
259    function Countdown(number) {
260        var clock = '';
261        var pre_time = $.cookie("pretime");
262
263        if (pre_time == null) {
264            $.cookie("pretime", parseInt(new Date().getTime() / 1000));
265        }
266
267        $("#code_send").attr('isPermit', 'no');
268        // $("#code_send").css('background-color','lightgrey');
269        // $("#code_send").css('border-color','lightgrey');
270        $("#code_send").html(number - (parseInt(new Date().getTime() / 1000) - parseInt($.cookie("pretime"))) + '秒后重新获取');
271
272        clock = setInterval(doLoop, 1000); //一秒执行一次
273
274        function doLoop() {
275            var count = number - (parseInt(new Date().getTime() / 1000) - parseInt($.cookie("pretime")));
276            if (count > 0) {
277                $("#code_send").html(count + '秒后重新获取');
278            } else {
279                clearInterval(clock); //清除js定时器
280                $('#code_send ').attr('isPermit', "");
281                // $("#code_send").css('background-color','#F77910');
282                // $("#code_send").css('border-color','#F77910');
283                $("#code_send").html("点击手机验证码");
284                $.cookie("pretime", null); //清除cookie
285            }
286        }
287    }
288});
289
290function changeVerifyCode(id) {
291    document.getElementById(id).src = verifyUrl + '?r=' + Math.random();
292}
293
294function removeDisable(id) {
295    $(id).removeAttr('disabled');
296    $(id).css('background-color', '#d25e50');
297    $(id).css('border-color', '#d25e50');
298    $(id).html("提交");
299}

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.