PageSourceSearch

https://www.3people.com.tw/Scripts/LITE.Cloud/Member/MemberVerify.js?v=v202609171555

js 3people.com.tw collected 2026-09-24 17:56:28 UTC 5,040 bytes, 135 lines download raw bytes

1var MemberVerify = (function () {
2
3    var mobiletimer = 60;
4    var mobiletimerInterval;
5    function MemberMobileVerifySendRegister(btnSendElement, txtPhoneInput) {
6        $(btnSendElement).click(function () {
7
8
9            var input = $(txtPhoneInput).val();
10            if (input == "") {
11                alert("請輸入手機");
12                return;
13            }
14
15            var email = new RegExp('^[0-9]{10}$');
16
17            if (!email.test(input)) {
18                alert("請輸入正確手機格式");
19                return;
20            }
21            2
22            if (mobiletimer < 60) {
23                return;
24            }
25
26            $.ajax({
27                url: WEBROOT + '/Member/Member/RegisterMobileVerifySend',
28                method: 'POST',
29                data: JSON.stringify({
30                    Mobile: input,
31                }),
32                contentType: 'application/json',
33                dataType: 'json',
34                beforeSend: function () {
35                    mask.start();
36                },
37                success: function (resp) {
38                    mask.stop();
39                    if (resp.Successful) {
40                        alert("驗證簡訊寄送成功,請至手機收簡訊");
41                        $(btnSendElement).text(mobiletimer + "秒後再試").toggleClass("btn-warning btn-secondary");
42                        mobiletimerInterval = setInterval(function () {
43                            mobiletimer--;
44                            $(btnSendElement).text(mobiletimer + "秒後再試");
45                            if (mobiletimer <= 0) {
46                                clearInterval(mobiletimerInterval);
47                                $(btnSendElement).text("寄送驗證簡訊").toggleClass("btn-warning btn-secondary");
48                                mobiletimer = 60;
49                            }
50                        }, 1000);
51                    } else {
52                        console.error(resp.ErrorMessage);
53                        alert('驗證簡訊失敗:' + resp.ErrorMessage);
54                    }
55                },
56                error: function (jqXHR, textStatus) {
57                    mask.stop();
58                    console.error(jqXHR);
59                    alert('驗證簡訊失敗: 系統錯誤');
60                }
61            });
62        });
63
64    }
65
66
67    var emailtimer = 60;
68    var emailtimerInterval;
69    function MemberMailVerifySendRegister(btnSendElement, txtMailInput) {
70        $(btnSendElement).click(function () {
71
72
73            var input = $(txtMailInput).val();
74            if (input == "") {
75                alert("請輸入信箱");
76                return;
77            }
78
79            var email = /^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}$/;
80
81            if (!email.test(input)) {
82                alert("請輸入正確信箱格式");
83                return;
84            }
85
86            if (emailtimer < 60) {
87                return;
88            }
89
90            $.ajax({
91                url: WEBROOT + '/Member/Member/RegisterEmailVerifySend',
92                method: 'POST',
93                data: JSON.stringify({
94                    Email: input,
95                }),
96                contentType: 'application/json',
97                dataType: 'json',
98                beforeSend: function () {
99                    mask.start();
100                },
101                success: function (resp) {
102                    mask.stop();
103                    if (resp.Successful) {
104                        alert("驗證信寄送成功,請至信箱收信");
105                        $(btnSendElement).text(emailtimer + "秒後再試").toggleClass("btn-warning btn-secondary");
106                        emailtimerInterval = setInterval(function () {
107                            emailtimer--;
108                            $(btnSendElement).text(emailtimer + "秒後再試");
109                            if (emailtimer <= 0) {
110                                clearInterval(emailtimerInterval);
111                                $(btnSendElement).text("寄送驗證信").toggleClass("btn-warning btn-secondary");
112                                emailtimer = 60;
113                            }
114                        }, 1000);
115                    } else {
116                        console.error(resp.ErrorMessage);
117                        alert('驗證信箱失敗:' + resp.ErrorMessage);
118                    }
119                },
120                error: function (jqXHR, textStatus) {
121                    mask.stop();
122                    console.error(jqXHR);
123                    alert('驗證信箱失敗: 系統錯誤');
124                }
125            });
126        });
127    }
128
129    //#region 公開API
130    return {
131        MemberMobileVerifySendRegister: MemberMobileVerifySendRegister,
132        MemberMailVerifySendRegister: MemberMailVerifySendRegister,
133    };
134    //#endregion 公開API
135})(jQuery);

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.