PageSourceSearch

https://hass.kr/modules/js?m=members&js=join&v=20260928022845

js hass.kr collected 2026-10-08 13:04:08 UTC 3,890 bytes, 105 lines download raw bytes

1class Join {
2
3    constructor(opt) {
4        this.isSns = opt.isSns
5        this.eventListner();
6    }
7
8    /** 데이터 검증 */
9    validated() {
10        let require_check = true;
11        $("form#join-form").find('input').each(function () {
12            if ($(this).data('required') === true) {
13                if ($(this).attr('type') == 'checkbox' || $(this).attr('type') == 'radio') {
14                    let msg;
15                    if (!$(this).prop('checked')) {
16                        if ($(this).attr('name') === 'chk_member_agree') {
17                            msg = getLang('MJ0082');
18                        } else if ($(this).attr('name') === 'chk_join_agree') {
19                            msg = getLang('MJ0083');
20                        } else {
21                            msg = $(this).next('em').eq(0).text() + "\n" + getLang('MJ0029');
22                            // let msg = $(this).next('em').eq(0).text() + "\n" + window.i18n.all.join.MJ0029.message;
23                            // showMsg($(this), msg, 'warn');
24                            // $(this).trigger('focus');
25                        }
26                        alert(msg);
27                        require_check = false;
28                        return false;
29                    } else {
30                        showMsg($(this), null, 'success');
31                    }
32                } else {
33                    if (!$(this).val()) {
34                        $(this).trigger('blur');
35                        $(this).trigger('focus');
36                        require_check = false;
37                        return false;
38                    } else {
39                        showMsg($(this), null, 'success');
40                    }
41                }
42            }
43        });
44
45        if (!require_check) {
46            return false;
47        }
48        return require_check;
49    }
50
51    /** 이벤트 바인딩 */
52    eventListner() {
53        /** Blur 시 유효성 체크가 필요한 항목들 처리*/
54        $("form#join-form [name='member_pw']").on('blur', function () {
55            chkValidate('member_pw', $(this));
56        });
57        $("form#join-form [name='member_pw_confirm']").on('blur', function () {
58            chkValidate('member_pw_confirm', $(this));
59        });
60
61        /** 가입 이벤트*/
62        $('form#join-form').submit((e) => {
63            e.preventDefault();
64            this.procJoin()
65        });
66    }
67
68    /** 가입 요청*/
69    procJoin() {
70        let requireCheck = this.validated();
71        if (requireCheck === false) {
72            return false;
73        }
74
75        let params = $("form#join-form").serialize();
76        let memberId = $("form#join-form [name='member_id']").val();
77        let actionUrl = '/members/join';
78        if (this.isSns === true) {
79            actionUrl = '/members/social/join';
80        }
81        $.post(actionUrl, params, function (res) {
82            if (res.result) {
83                if (Object.keys(res.datas).includes('sign_up_method')) {
84                    googleAnalyticsEvent('sign_up', { method: res.datas.sign_up_method });
85                    googleAdsAutoTrackingEvent('sign_up');
86                }
87                alert(res.result_msg);
88                location.replace('/members/join/completed?id=' + memberId);
89            } else {
90                if (res.error === 'regit_certified' || res.error === 'need_certified') {
91                    alert(window.i18n.all.common.need_certified.message);
92                    location.reload();
93                } else {
94                    if (res.datas) {
95                        let key = Object.keys(res.datas)[0];
96                        let name = key.replace(/\.(\w+)/g, '[$1]');
97                        $("[name='" + name + "']").focus();
98                    }
99                    alert(res.result_msg);
100                }
101            }
102            return false;
103        });
104    }
105}

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.