{"id":2557,"date":"2023-08-01T15:04:47","date_gmt":"2023-08-01T07:04:47","guid":{"rendered":"https:\/\/demo2.gcreate.com.tw\/gc_energy_saving\/?page_id=2557"},"modified":"2023-08-04T16:46:33","modified_gmt":"2023-08-04T08:46:33","slug":"login","status":"publish","type":"page","link":"https:\/\/demo2.gcreate.com.tw\/gc_energy_saving\/login\/","title":{"rendered":"\u767b\u5165"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-page\" data-elementor-id=\"2557\" class=\"elementor elementor-2557\" data-elementor-settings=\"{&quot;element_pack_global_tooltip_width&quot;:{&quot;unit&quot;:&quot;px&quot;,&quot;size&quot;:&quot;&quot;,&quot;sizes&quot;:[]},&quot;element_pack_global_tooltip_width_laptop&quot;:{&quot;unit&quot;:&quot;px&quot;,&quot;size&quot;:&quot;&quot;,&quot;sizes&quot;:[]},&quot;element_pack_global_tooltip_width_tablet_extra&quot;:{&quot;unit&quot;:&quot;px&quot;,&quot;size&quot;:&quot;&quot;,&quot;sizes&quot;:[]},&quot;element_pack_global_tooltip_width_tablet&quot;:{&quot;unit&quot;:&quot;px&quot;,&quot;size&quot;:&quot;&quot;,&quot;sizes&quot;:[]},&quot;element_pack_global_tooltip_width_mobile_extra&quot;:{&quot;unit&quot;:&quot;px&quot;,&quot;size&quot;:&quot;&quot;,&quot;sizes&quot;:[]},&quot;element_pack_global_tooltip_width_mobile&quot;:{&quot;unit&quot;:&quot;px&quot;,&quot;size&quot;:&quot;&quot;,&quot;sizes&quot;:[]},&quot;element_pack_global_tooltip_padding&quot;:{&quot;unit&quot;:&quot;px&quot;,&quot;top&quot;:&quot;&quot;,&quot;right&quot;:&quot;&quot;,&quot;bottom&quot;:&quot;&quot;,&quot;left&quot;:&quot;&quot;,&quot;isLinked&quot;:true},&quot;element_pack_global_tooltip_padding_laptop&quot;:{&quot;unit&quot;:&quot;px&quot;,&quot;top&quot;:&quot;&quot;,&quot;right&quot;:&quot;&quot;,&quot;bottom&quot;:&quot;&quot;,&quot;left&quot;:&quot;&quot;,&quot;isLinked&quot;:true},&quot;element_pack_global_tooltip_padding_tablet_extra&quot;:{&quot;unit&quot;:&quot;px&quot;,&quot;top&quot;:&quot;&quot;,&quot;right&quot;:&quot;&quot;,&quot;bottom&quot;:&quot;&quot;,&quot;left&quot;:&quot;&quot;,&quot;isLinked&quot;:true},&quot;element_pack_global_tooltip_padding_tablet&quot;:{&quot;unit&quot;:&quot;px&quot;,&quot;top&quot;:&quot;&quot;,&quot;right&quot;:&quot;&quot;,&quot;bottom&quot;:&quot;&quot;,&quot;left&quot;:&quot;&quot;,&quot;isLinked&quot;:true},&quot;element_pack_global_tooltip_padding_mobile_extra&quot;:{&quot;unit&quot;:&quot;px&quot;,&quot;top&quot;:&quot;&quot;,&quot;right&quot;:&quot;&quot;,&quot;bottom&quot;:&quot;&quot;,&quot;left&quot;:&quot;&quot;,&quot;isLinked&quot;:true},&quot;element_pack_global_tooltip_padding_mobile&quot;:{&quot;unit&quot;:&quot;px&quot;,&quot;top&quot;:&quot;&quot;,&quot;right&quot;:&quot;&quot;,&quot;bottom&quot;:&quot;&quot;,&quot;left&quot;:&quot;&quot;,&quot;isLinked&quot;:true},&quot;element_pack_global_tooltip_border_radius&quot;:{&quot;unit&quot;:&quot;px&quot;,&quot;top&quot;:&quot;&quot;,&quot;right&quot;:&quot;&quot;,&quot;bottom&quot;:&quot;&quot;,&quot;left&quot;:&quot;&quot;,&quot;isLinked&quot;:true},&quot;element_pack_global_tooltip_border_radius_laptop&quot;:{&quot;unit&quot;:&quot;px&quot;,&quot;top&quot;:&quot;&quot;,&quot;right&quot;:&quot;&quot;,&quot;bottom&quot;:&quot;&quot;,&quot;left&quot;:&quot;&quot;,&quot;isLinked&quot;:true},&quot;element_pack_global_tooltip_border_radius_tablet_extra&quot;:{&quot;unit&quot;:&quot;px&quot;,&quot;top&quot;:&quot;&quot;,&quot;right&quot;:&quot;&quot;,&quot;bottom&quot;:&quot;&quot;,&quot;left&quot;:&quot;&quot;,&quot;isLinked&quot;:true},&quot;element_pack_global_tooltip_border_radius_tablet&quot;:{&quot;unit&quot;:&quot;px&quot;,&quot;top&quot;:&quot;&quot;,&quot;right&quot;:&quot;&quot;,&quot;bottom&quot;:&quot;&quot;,&quot;left&quot;:&quot;&quot;,&quot;isLinked&quot;:true},&quot;element_pack_global_tooltip_border_radius_mobile_extra&quot;:{&quot;unit&quot;:&quot;px&quot;,&quot;top&quot;:&quot;&quot;,&quot;right&quot;:&quot;&quot;,&quot;bottom&quot;:&quot;&quot;,&quot;left&quot;:&quot;&quot;,&quot;isLinked&quot;:true},&quot;element_pack_global_tooltip_border_radius_mobile&quot;:{&quot;unit&quot;:&quot;px&quot;,&quot;top&quot;:&quot;&quot;,&quot;right&quot;:&quot;&quot;,&quot;bottom&quot;:&quot;&quot;,&quot;left&quot;:&quot;&quot;,&quot;isLinked&quot;:true}}\" data-elementor-post-type=\"page\">\n\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-286d5439 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"286d5439\" data-element_type=\"section\" data-settings=\"{&quot;jet_parallax_layout_list&quot;:[],&quot;background_background&quot;:&quot;classic&quot;,&quot;shape_divider_bottom&quot;:&quot;curve&quot;,&quot;shape_divider_bottom_negative&quot;:&quot;yes&quot;}\">\n\t\t\t\t\t\t\t<div class=\"elementor-background-overlay\"><\/div>\n\t\t\t\t\t\t<div class=\"elementor-shape elementor-shape-bottom\" aria-hidden=\"true\" data-negative=\"true\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 1000 100\" preserveAspectRatio=\"none\">\n\t<path class=\"elementor-shape-fill\" d=\"M500,97C126.7,96.3,0.8,19.8,0,0v100l1000,0V1C1000,19.4,873.3,97.8,500,97z\"\/>\n<\/svg>\t\t<\/div>\n\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-3514b70e\" data-id=\"3514b70e\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-3af418a2 elementor-invisible elementor-widget elementor-widget-heading\" data-id=\"3af418a2\" data-element_type=\"widget\" data-settings=\"{&quot;_animation&quot;:&quot;fadeInUp&quot;}\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h1 class=\"elementor-heading-title elementor-size-default\">\u6703\u54e1\u4e2d\u5fc3<\/h1>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-6b5f73ec elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"6b5f73ec\" data-element_type=\"section\" data-settings=\"{&quot;jet_parallax_layout_list&quot;:[]}\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-71332700\" data-id=\"71332700\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-1c22c7ed elementor-widget elementor-widget-spacer\" data-id=\"1c22c7ed\" data-element_type=\"widget\" data-widget_type=\"spacer.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-spacer\">\n\t\t\t<div class=\"elementor-spacer-inner\"><\/div>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-0429355 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"0429355\" data-element_type=\"section\" data-settings=\"{&quot;jet_parallax_layout_list&quot;:[]}\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-17bb91b\" data-id=\"17bb91b\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-f415502 elementor-widget elementor-widget-shortcode\" data-id=\"f415502\" data-element_type=\"widget\" data-widget_type=\"shortcode.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-shortcode\"><style>\n\t.required{\n\t\tcolor:red;\n\t}\n\n\t.gc_login_registration_section{\n\t\tdisplay: flex;\n\t\tjustify-content: center;\n\t}\n\n\t.gc_login_registration_content{\n\t\twidth:100%;\n\t}\n\n\t.gc_login_registration_content .gc_login_tabs{\n\t\tdisplay: flex;\n\t\tflex-direction: row;\n\t\tmargin-bottom:2em;\n\t}\n\n\t.gc_login_registration_content .gc_login_tabs .gc_tab{\n\t\twidth: 100%;\n\t\ttext-align: center;\n\t\tuser-select: none;\n\t\tcursor: pointer;\n\t\tfont-size: 28px;\n\t\tline-height: 40px;\n\t\tborder-bottom: 4px solid;\n\t\tcolor: #AAAAAA;\n\t\tborder-color: #AAAAAA;\n\t\tpadding: 0.5em 0;\n\t}\n\n\t.gc_login_registration_content .gc_login_tabs .tab-active{\n\t\tcolor: #55A630;\n\t\tborder-color: #55A630;\n\t}\n\n\t.gc_login_registration_content .gc_login_tab_content form{\n\t\tpadding: 0 1.5em;\n\t}\n\n\t.gc_login_registration_content .gc_login_tab_content .gc-label{\n\t\tmargin-bottom:.5em;\n\t\tfont-size:18px;\n\t\tline-height:26px;\n\t}\n\n\t.gc_login_registration_content .gc_login_tab_content input:not([type=\"checkbox\"]){\n\t\tborder-radius:4px;\n\t\tfont-size:16px;\n\t\tline-height:24px;\n\t\tmargin:0;\n\t\twidth: 100%;\n\t\tpadding: 8px 12px;\n\t\tborder: 1px solid #ddd;\n\t}\n\n\t.gc_login_registration_content .gc_login_tab_content .gc-login-registration-btn{\n\t\twidth:100%;\n\t\tbackground: #AACC00 0% 0% no-repeat padding-box;\n\t\tborder-radius: 10px;\n\t\tpadding:12px 0;\n\t\tcolor: #FFFFFF;\n\t\tletter-spacing: 2.4px;\n\t\tfont-size:21px;\n\t\tline-height:35px;\n\t\tborder: none;\n\t\tcursor: pointer;\n\t}\n\n\t.gc_login_registration_content .gc_login_tab_content .gc-login-registration-btn:hover{\n\t\tbackground: #55A630;\n\t}\n\n\t.gc_login_registration_content .gc_login_tab_content .gc-login-registration-btn:disabled{\n\t\tbackground: #CCCCCC;\n\t\tcursor: not-allowed;\n\t}\n\n\t.gc_login_registration_content .gc_login_tab_content .gc-resend-btn{\n\t\twidth:100%;\n\t\tbackground: #CCCCCC 0% 0% no-repeat padding-box;\n\t\tborder-radius: 10px;\n\t\tpadding:12px 0;\n\t\tcolor: #FFFFFF;\n\t\tletter-spacing: 2.4px;\n\t\tfont-size:21px;\n\t\tline-height:35px;\n\t\tborder: none;\n\t\tcursor: pointer;\n\t}\n\n\t.gc_login_registration_content .gc_login_tab_content .gc-resend-btn:hover{\n\t\tbackground: #AAAAAA;\n\t}\n\n\t.gc_login_registration_content .gc_login_tab_content .gc-resend-btn:disabled{\n\t\tbackground: #CCCCCC;\n\t\tcursor: not-allowed;\n\t}\n\n\t.gc_login_registration_content .gc_login_tab_content .gc_field{\n\t\tmargin-bottom:20px;\n\t}\n\n\t.gc_login_registration_content .gc_login_tab_content .gc_field.gc_resend_field{\n\t\tmargin-bottom:10px;\n\t\tmargin-top:-30px;\n\t}\n\n\t.gc_login_registration_content .gc_login_tab_content .gc-forget_password {\n\t\tdisplay: flex;\n\t\tjustify-content: center;\n\t}\n\n\t.gc_login_registration_content .gc_login_tab_content .gc-forget_password a{\n\t\tcolor: #AAAAAA;\n\t}\n\n\t.error-message{\n\t\tcolor: #e74c3c;\n\t\tfont-size: 14px;\n\t\tmargin-top: 5px;\n\t}\n\n\t.success-message{\n\t\tcolor: #27ae60;\n\t\tfont-size: 14px;\n\t\tmargin-top: 5px;\n\t}\n\n\t.otp-input{\n\t\tfont-size: 24px;\n\t\tletter-spacing: 0.2em;\n\t\tfont-variant-numeric: tabular-nums;\n\t}\n\n\t.resend-info{\n\t\ttext-align: center;\n\t\tcolor: #666;\n\t\tfont-size: 14px;\n\t\tmargin-top: 10px;\n\t}\n\n\t.resend-link{\n\t\tcolor: #55A630;\n\t\tcursor: pointer;\n\t\ttext-decoration: underline;\n\t}\n\n\t.resend-link.disabled{\n\t\tcolor: #CCCCCC;\n\t\tcursor: not-allowed;\n\t\ttext-decoration: none;\n\t}\n\n\t[v-cloak] {\n\t\tdisplay: none;\n\t}\n\n\t\/* SweetAlert \u6309\u9215\u6a23\u5f0f *\/\n\t.swal2-confirm {\n\t\tborder-radius: 4px !important;\n\t\tpadding: 8px 24px !important;\n\t\tfont-size: 16px !important;\n\t\tbox-shadow: none !important;\n\t\tline-height: normal !important;\n\t}\n\n\t\/* OTP \u9a57\u8b49\u8868\u55ae RWD \u6a23\u5f0f *\/\n\t@media (min-width: 768px) {\n\t\t.gc_login_registration_content[data-view=\"verify\"] .gc_login_tab_content form {\n\t\t\twidth: 90%;\n\t\t\tmargin: 0 auto;\n\t\t}\n\t}\n<\/style>\n\n\n<div id=\"gc-login-app\" v-cloak class=\"gc_login_registration_section\">\n\t<div class=\"gc_login_registration_content\" :data-view=\"currentView\">\n\t\t<!-- Tabs -->\n\t\t<div class=\"gc_login_tabs\">\n\t\t\t<div class=\"gc_tab gc_login_tab\" :class=\"{ 'tab-active': currentView === 'login' || currentView === 'verify' }\" @click=\"switchView('login')\">\n\t\t\t\t{{ i18n.loginTab }}\n\t\t\t<\/div>\n\t\t\t<div class=\"gc_tab gc_register_tab\"  v-if=\"currentView !== 'verify'\" :class=\"{ 'tab-active': currentView === 'register' }\" @click=\"switchView('register')\">\n\t\t\t\t{{ i18n.registerTab }}\n\t\t\t<\/div>\n\t\t<\/div>\n\n\t\t<!-- \u767b\u5165\u9801\u9762 -->\n\t\t<div class=\"gc_login_tab_content\" v-if=\"currentView === 'login'\">\n\t\t\t<form @submit.prevent=\"handleLogin\">\n\t\t\t\t<div class=\"gc_field\">\n\t\t\t\t\t<div class=\"gc-label\">\n\t\t\t\t\t\t<span class=\"required\">*<\/span>\n\t\t\t\t\t\t{{ i18n.emailLabel }}\n\t\t\t\t\t<\/div>\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<input\n\t\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\t\tv-model=\"loginForm.email\"\n\t\t\t\t\t\t\t:placeholder=\"i18n.emailPlaceholder\"\n\t\t\t\t\t\t\t:disabled=\"loading\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t<div v-if=\"errors.email\" class=\"error-message\">{{ errors.email }}<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"gc_field\">\n\t\t\t\t\t<button type=\"submit\" class=\"gc-login-registration-btn\" :disabled=\"loading\">\n\t\t\t\t\t\t{{ loading ? i18n.processing : i18n.confirmButton }}\n\t\t\t\t\t<\/button>\n\t\t\t\t<\/div>\n\t\t\t<\/form>\n\t\t<\/div>\n\n\t\t<!-- OTP \u9a57\u8b49\u9801\u9762 -->\n\t\t<div class=\"gc_login_tab_content\" v-if=\"currentView === 'verify'\">\n\t\t\t<div style=\"text-align: center; margin-bottom: 30px;\">\n\t\t\t\t<h3 style=\"color: #333; font-size: 20px; margin-bottom: 20px;\">{{ i18n.otpSentTitle }}<\/h3>\n\t\t\t\t<p style=\"color: #333; font-size: 14px; margin-bottom: 10px;\">\n\t\t\t\t\t{{ i18n.otpSentToEmail }} <span style=\"color: #55A630; font-weight: bold;\">{{ verifyEmail }}<\/span>\n\t\t\t\t<\/p>\n\t\t\t\t<p style=\"color: #333; font-size: 14px; line-height: 1.6; margin-bottom: 5px;\">\n\t\t\t\t\t{{ i18n.otpInstruction }}\n\t\t\t\t<\/p>\n\t\t\t\t<p style=\"color: #333; font-size: 14px; line-height: 1.6; font-weight: bold;\">\n\t\t\t\t\t{{ i18n.otpExpiry }}\n\t\t\t\t<\/p>\n\t\t\t<\/div>\n\t\t\t<form @submit.prevent=\"handleVerifyOTP\">\n\t\t\t\t<div class=\"gc_field\">\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<input\n\t\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\t\tinputmode=\"numeric\"\n\t\t\t\t\t\t\tautocomplete=\"one-time-code\"\n\t\t\t\t\t\t\tpattern=\"[0-9]*\"\n\t\t\t\t\t\t\tv-model=\"otpForm.code\"\n\t\t\t\t\t\t\t:placeholder=\"i18n.otpPlaceholder\"\n\t\t\t\t\t\t\tclass=\"otp-input\"\n\t\t\t\t\t\t\tmaxlength=\"6\"\n\t\t\t\t\t\t\t:disabled=\"loading\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t<div v-if=\"errors.otp_code\" class=\"error-message\">{{ errors.otp_code }}<\/div>\n\t\t\t\t\t\t<div v-if=\"sending\" style=\"text-align: left; color: #999; font-size: 14px; margin-top: 8px;\">\n\t\t\t\t\t\t\t{{ i18n.otpSentToInbox }}\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"gc_field\">\n\t\t\t\t\t<button type=\"submit\" class=\"gc-login-registration-btn\" :disabled=\"loading\">\n\t\t\t\t\t\t{{ i18n.verifyAndLogin }}\n\t\t\t\t\t<\/button>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"gc_field gc_resend_field\" v-if=\"resendCountdown === 0\">\n\t\t\t\t\t<button type=\"button\" @click=\"handleResendOTP\" class=\"gc-resend-btn\" :disabled=\"loading\">\n\t\t\t\t\t\t{{ i18n.resendOtp }}\n\t\t\t\t\t<\/button>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"resend-info\" v-if=\"resendCountdown > 0\">\n\t\t\t\t\t<span>\n\t\t\t\t\t\t{{ resendCountdown }} {{ i18n.secondsUntilResend }}\n\t\t\t\t\t<\/span>\n\t\t\t\t<\/div>\n\t\t\t\t<div style=\"text-align: center; margin-top: 20px;\">\n\t\t\t\t\t<span style=\"color: #666;\">\u4f7f\u7528\u5176\u4ed6\u5e33\u865f <\/span>\n\t\t\t\t\t<a @click=\"switchView('login')\" style=\"color: #55A630; cursor: pointer;\">\u767b\u5165<\/a>\n\t\t\t\t\t<span style=\"color: #AAAAAA; margin: 0 10px;\">|<\/span>\n\t\t\t\t\t<span style=\"color: #666;\">\u6c92\u6709\u5e33\u6236\uff1f<\/span>\n\t\t\t\t\t<a @click=\"switchView('register')\" style=\"color: #55A630; cursor: pointer;\">\u8a3b\u518a<\/a>\n\t\t\t\t\t<span style=\"color: #AAAAAA; margin: 0 10px;\">|<\/span>\n\t\t\t\t\t<a :href=\"contactUsUrl\" style=\"color: #55A630; cursor: pointer;\">\u806f\u7d61\u6211\u5011<\/a>\n\t\t\t\t<\/div>\n\t\t\t<\/form>\n\t\t<\/div>\n\n\t\t<!-- \u8a3b\u518a\u9801\u9762 -->\n\t\t<div class=\"gc_login_tab_content\" v-if=\"currentView === 'register'\">\n\t\t\t<form @submit.prevent=\"handleRegister\">\n\t\t\t\t<div class=\"gc_field\">\n\t\t\t\t\t<div class=\"gc-label\">\n\t\t\t\t\t\t<span class=\"required\">*<\/span>\n\t\t\t\t\t\t{{ i18n.emailLabelRegister }}\n\t\t\t\t\t<\/div>\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<input\n\t\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\t\tv-model=\"registerForm.email\"\n\t\t\t\t\t\t\t:placeholder=\"i18n.emailPlaceholder\"\n\t\t\t\t\t\t\t:disabled=\"loading\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t<div v-if=\"errors.email\" class=\"error-message\">{{ errors.email }}<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"gc_field\">\n\t\t\t\t\t<div class=\"gc-label\">\n\t\t\t\t\t\t<span class=\"required\">*<\/span>\n\t\t\t\t\t\t{{ i18n.companyLabel }}\n\t\t\t\t\t<\/div>\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<input\n\t\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\t\tv-model=\"registerForm.company\"\n\t\t\t\t\t\t\t:placeholder=\"i18n.companyPlaceholder\"\n\t\t\t\t\t\t\t:disabled=\"loading\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t<div v-if=\"errors.company\" class=\"error-message\">{{ errors.company }}<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"gc_field\">\n\t\t\t\t\t<div class=\"gc-label\">\n\t\t\t\t\t\t<span class=\"required\">*<\/span>\n\t\t\t\t\t\t{{ i18n.taxIdLabel }}\n\t\t\t\t\t<\/div>\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<input\n\t\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\t\tv-model=\"registerForm.GUI_number\"\n\t\t\t\t\t\t\t:placeholder=\"i18n.taxIdPlaceholder\"\n\t\t\t\t\t\t\t:disabled=\"loading\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t<div v-if=\"errors.GUI_number\" class=\"error-message\">{{ errors.GUI_number }}<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"gc_field\">\n\t\t\t\t\t<button type=\"submit\" class=\"gc-login-registration-btn\" :disabled=\"loading\">\n\t\t\t\t\t\t{{ loading ? i18n.registering : i18n.register }}\n\t\t\t\t\t<\/button>\n\t\t\t\t<\/div>\n\t\t\t<\/form>\n\t\t<\/div>\n\t<\/div>\n<\/div>\n\n<!-- Vue 3 CDN -->\n<script src=\"https:\/\/unpkg.com\/vue@3\/dist\/vue.global.js\"><\/script>\n\n<!-- reCAPTCHA v3 -->\n<script src=\"https:\/\/www.google.com\/recaptcha\/api.js?render=6LeZpcwsAAAAAKl2L7bFOscxkEGsPIqYwieIra6G\"><\/script>\n\n<script>\nconst { createApp } = Vue;\n\ncreateApp({\n\tdata() {\n\t\treturn {\n\t\t\tcurrentView: 'login', \/\/ login, verify, register\n\t\t\tloading: false,\n\t\t\tsending: false,\n\t\t\tformChanged: false, \/\/ \u8ffd\u8e64\u8868\u55ae\u662f\u5426\u6709\u8b8a\u66f4\n\t\t\tcontactUsUrl: 'https:\/\/demo2.gcreate.com.tw\/gc_energy_saving\/%e8%81%af%e7%b5%a1%e6%88%91%e5%80%91\/',\n\t\t\tloginForm: {\n\t\t\t\temail: ''\n\t\t\t},\n\t\t\totpForm: {\n\t\t\t\tcode: ''\n\t\t\t},\n\t\t\tregisterForm: {\n\t\t\t\temail: '',\n\t\t\t\tcompany: '',\n\t\t\t\tGUI_number: ''\n\t\t\t},\n\t\t\terrors: {},\n\t\t\tverifyEmail: '',\n\t\t\tresendCountdown: 0,\n\t\t\tresendTimer: null,\n\t\t\tnonce: 'de416f9879',\n\t\t\tredirect: '',\n\t\t\trecaptcha: {\n\t\t\t\tenabled: true,\n\t\t\t\tsiteKey: '6LeZpcwsAAAAAKl2L7bFOscxkEGsPIqYwieIra6G'\n\t\t\t},\n\t\t\ti18n: {\n\t\t\t\t\/\/ Tab \u6a19\u984c\n\t\t\t\tloginTab: '\u767b\u5165',\n\t\t\t\tregisterTab: '\u8a3b\u518a',\n\n\t\t\t\t\/\/ \u6309\u9215\u6587\u5b57\n\t\t\t\tprocessing: '\u8655\u7406\u4e2d...',\n\t\t\t\tsendOtp: '\u767c\u9001\u9a57\u8b49\u78bc',\n\t\t\t\tverifyAndLogin: '\u9a57\u8b49\u4e26\u767b\u5165',\n\t\t\t\tresendOtp: '\u91cd\u65b0\u50b3\u9001\u9a57\u8b49\u78bc',\n\t\t\t\tregistering: '\u8a3b\u518a\u4e2d...',\n\t\t\t\tregister: '\u8a3b\u518a',\n\t\t\t\tconfirmButton: '\u78ba\u8a8d',\n\n\t\t\t\t\/\/ \u8868\u55ae\u6a19\u7c64\n\t\t\t\temailLabel: '\u8acb\u8f38\u5165\u96fb\u5b50\u90f5\u4ef6\u5730\u5740',\n\t\t\t\temailLabelRegister: '\u96fb\u5b50\u90f5\u4ef6',\n\t\t\t\tcompanyLabel: '\u516c\u53f8\u540d\u7a31',\n\t\t\t\ttaxIdLabel: '\u7d71\u7de8',\n\n\t\t\t\t\/\/ Placeholder\n\t\t\t\temailPlaceholder: '\u8acb\u8f38\u5165 Email',\n\t\t\t\totpPlaceholder: '\u8acb\u8f38\u5165 6 \u78bc\u6578\u5b57\u9a57\u8b49\u78bc',\n\t\t\t\tcompanyPlaceholder: '\u8acb\u8f38\u5165\u516c\u53f8\u540d\u7a31',\n\t\t\t\ttaxIdPlaceholder: '\u8acb\u8f38\u5165\u7d71\u7de8',\n\n\t\t\t\t\/\/ OTP \u9801\u9762\u8a0a\u606f\n\t\t\t\totpSentTitle: '\u5df2\u900f\u904e\u96fb\u5b50\u90f5\u4ef6\u50b3\u9001\u9a57\u8b49\u78bc\u7d66\u60a8',\n\t\t\t\totpSentToEmail: '\u9a57\u8b49\u78bc\u5df2\u767c\u9001\u81f3\u60a8\u7684\u4fe1\u7bb1',\n\t\t\t\totpInstruction: '\u8acb\u5728\u4e0b\u65b9\u8f38\u5165\u9a57\u8b49\u78bc\u7e7c\u7e8c\u64cd\u4f5c\u3002',\n\t\t\t\totpExpiry: '\u9a57\u8b49\u78bc\u6709\u6548\u6642\u9593\u70ba5\u5206\u9418\uff0c\u5982\u672a\u6536\u5230\u8acb\u6aa2\u67e5\u5783\u573e\u90f5\u4ef6\u6216\u9ede\u64ca\u518d\u6b21\u9001\u9a57\u8b49\u78bc\u3002',\n\t\t\t\totpSentToInbox: '\u9a57\u8b49\u78bc\u5df2\u767c\u9001\u5230\u4f60\u7684\u6536\u4ef6\u5323',\n\t\t\t\tsecondsUntilResend: '\u79d2\u5f8c\u53ef\u91cd\u65b0\u767c\u9001',\n\n\t\t\t\t\/\/ \u6210\u529f\u8a0a\u606f\n\t\t\t\tloginSuccess: '\u767b\u5165\u6210\u529f\uff01',\n\t\t\t\tredirecting: '\u5373\u5c07\u70ba\u60a8\u5c0e\u5411\u9801\u9762',\n\n\t\t\t\t\/\/ \u932f\u8aa4\u8a0a\u606f\n\t\t\t\trecaptchaLoadFailed: 'reCAPTCHA: \u8173\u672c\u8f09\u5165\u5931\u6557\u3002\u8acb\u78ba\u8a8d\u5df2\u5728 WordPress \u5f8c\u53f0\u8a2d\u5b9a reCAPTCHA Site Key\u3002',\n\t\t\t\trecaptchaVerifyError: 'reCAPTCHA \u9a57\u8b49\u932f\u8aa4',\n\t\t\t\terrorOccurred: '\u767c\u751f\u932f\u8aa4\uff0c\u8acb\u7a0d\u5f8c\u518d\u8a66',\n\n\t\t\t\t\/\/ \u901f\u7387\u9650\u5236\u8a0a\u606f\n\t\t\t\trateLimitTitle: '\u5f88\u62b1\u6b49\uff0c\u5df2\u767c\u9001\u592a\u591a\u6b21\u9a57\u8b49\u78bc\uff0c',\n\t\t\t\trateLimitSubtitle: '\u8acb5\u5206\u9418\u5f8c\u518d\u5617\u8a66\uff0c\u53ef\u80fd\u7684\u539f\u56e0\u6709\uff1a',\n\t\t\t\trateLimitReason1: 'Email\u8f38\u5165\u932f\u8aa4',\n\t\t\t\trateLimitReason2: '\u9a57\u8b49\u78bc\u50b3\u81f3\u5783\u573e\u4fe1\u7bb1',\n\t\t\t\trateLimitContact: '\u6216\u8acb\u8207\u5ba2\u670d\u4eba\u54e1\u806f\u7e6b\u3002',\n\t\t\t\tverifyRateLimitTitle: '\u5f88\u62b1\u6b49\uff0c\u9a57\u8b49\u5931\u6557\u6b21\u6578\u904e\u591a\uff0c',\n\t\t\t\tverifyRateLimitReason1: '\u9a57\u8b49\u78bc\u8f38\u5165\u932f\u8aa4',\n\t\t\t\tverifyRateLimitReason2: '\u9a57\u8b49\u78bc\u5df2\u904e\u671f'\n\t\t\t}\n\t\t};\n\t},\n\tmethods: {\n\t\t\/**\n\t\t * \u7b49\u5f85 reCAPTCHA \u8f09\u5165\n\t\t *\/\n\t\tasync waitForRecaptcha(maxAttempts = 10) {\n\t\t\tfor (let i = 0; i < maxAttempts; i++) {\n\t\t\t\tif (typeof grecaptcha !== 'undefined' && grecaptcha.execute) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\tawait new Promise(resolve => setTimeout(resolve, 100));\n\t\t\t}\n\t\t\treturn false;\n\t\t},\n\t\t\/**\n\t\t * \u57f7\u884c reCAPTCHA v3 \u9a57\u8b49\n\t\t *\/\n\t\tasync executeRecaptcha(action) {\n\t\t\t\/\/ \u6aa2\u67e5\u662f\u5426\u555f\u7528 reCAPTCHA\n\t\t\tif (!this.recaptcha.enabled || !this.recaptcha.siteKey) {\n\t\t\t\t\/\/ reCAPTCHA \u672a\u555f\u7528\u6216\u672a\u8a2d\u5b9a\uff0c\u5141\u8a31\u7e7c\u7e8c\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\t\/\/ \u7b49\u5f85 grecaptcha \u8f09\u5165\uff08\u6700\u591a\u7b49\u5f85 1 \u79d2\uff09\n\t\t\tconst loaded = await this.waitForRecaptcha();\n\t\t\tif (!loaded) {\n\t\t\t\tconsole.warn(this.i18n.recaptchaLoadFailed);\n\t\t\t\t\/\/ \u5373\u4f7f\u8f09\u5165\u5931\u6557\u4e5f\u5141\u8a31\u7e7c\u7e8c\uff0c\u8b93\u5f8c\u7aef\u6c7a\u5b9a\u662f\u5426\u62d2\u7d55\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\tconst token = await grecaptcha.execute(this.recaptcha.siteKey, { action: action });\n\t\t\t\treturn token;\n\t\t\t} catch (error) {\n\t\t\t\tconsole.error(this.i18n.recaptchaVerifyError + ':', error);\n\t\t\t\treturn null;\n\t\t\t}\n\t\t},\n\t\tswitchView(view) {\n\t\t\tthis.currentView = view;\n\t\t\tthis.errors = {};\n\t\t},\n\t\t\/**\n\t\t * \u986f\u793a REST API \u56de\u50b3\u7684\u8a0a\u606f\uff08\u4f8b\u5982 reCAPTCHA \/ nonce 403 \u50c5\u6709 message\u3001\u7121\u6b04\u4f4d\u932f\u8aa4\u6642\uff09\n\t\t *\/\n\t\tshowRestMessage(data) {\n\t\t\tconst msg = data && typeof data.message === 'string' ? data.message.trim() : '';\n\t\t\tif (!msg) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (typeof Swal !== 'undefined') {\n\t\t\t\tSwal.fire({\n\t\t\t\t\ttext: msg,\n\t\t\t\t\ticon: 'warning',\n\t\t\t\t\tconfirmButtonText: this.i18n.confirmButton,\n\t\t\t\t\tconfirmButtonColor: '#55A630',\n\t\t\t\t\tallowOutsideClick: true,\n\t\t\t\t\tallowEscapeKey: true\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\talert(msg);\n\t\t\t}\n\t\t},\n\t\t\/**\n\t\t * \u662f\u5426\u70ba\u5f8c\u7aef\u56de\u50b3\u7684\u300c\u6b04\u4f4d\u540d \u2192 \u932f\u8aa4\u8a0a\u606f\u300d\u7269\u4ef6\uff08\u6392\u9664\u7a7a\u9663\u5217 []\uff09\n\t\t *\/\n\t\thasFieldErrorsPayload(errors) {\n\t\t\treturn (\n\t\t\t\terrors &&\n\t\t\t\ttypeof errors === 'object' &&\n\t\t\t\t!Array.isArray(errors) &&\n\t\t\t\tObject.keys(errors).length > 0\n\t\t\t);\n\t\t},\n\t\tasync handleLogin() {\n\t\t\tthis.errors = {};\n\t\t\tthis.loading = true;\n\n\t\t\ttry {\n\t\t\t\t\/\/ \u57f7\u884c reCAPTCHA \u9a57\u8b49\n\t\t\t\tconst recaptchaToken = await this.executeRecaptcha('send_otp');\n\n\t\t\t\tconst response = await fetch('https:\/\/demo2.gcreate.com.tw\/gc_energy_saving\/wp-json\/gc\/v1\/send-otp', {\n\t\t\t\t\tmethod: 'POST',\n\t\t\t\t\theaders: {\n\t\t\t\t\t\t'Content-Type': 'application\/json',\n\t\t\t\t\t},\n\t\t\t\t\tbody: JSON.stringify({\n\t\t\t\t\t\temail: this.loginForm.email,\n\t\t\t\t\t\tnonce: this.nonce,\n\t\t\t\t\t\tredirect: this.redirect,\n\t\t\t\t\t\trecaptcha_token: recaptchaToken\n\t\t\t\t\t})\n\t\t\t\t});\n\n\t\t\t\tconst data = await response.json();\n\n\t\t\t\tif (response.ok && data.success) {\n\t\t\t\t\tthis.otpForm.code = '';\n\t\t\t\t\tthis.verifyEmail = this.loginForm.email;\n\t\t\t\t\tthis.switchView('verify');\n\t\t\t\t\tthis.startResendCountdown(30);\n\t\t\t\t\tthis.sending = true;\n\t\t\t\t\tthis.formChanged = false; \/\/ \u91cd\u7f6e\u8868\u55ae\u8b8a\u66f4\u72c0\u614b\n\t\t\t\t} else {\n\t\t\t\t\t\/\/ \u8655\u7406 429 \u932f\u8aa4\uff08\u901f\u7387\u9650\u5236\uff09\n\t\t\t\t\tif (response.status === 429) {\n\t\t\t\t\t\tSwal.fire({\n\t\t\t\t\t\t\thtml: `\n\t\t\t\t\t\t\t\t<div style=\"display: flex; justify-content: center; margin-top:10px;\">\n\t\t\t\t\t\t\t\t\t<div style=\"text-align: left;\">\n\t\t\t\t\t\t\t\t\t<p style=\"font-size: 18px; margin-bottom: 15px;\">${this.i18n.rateLimitTitle}<\/p>\n\t\t\t\t\t\t\t\t\t<p style=\"font-size: 18px; margin-bottom: 15px;\">${this.i18n.rateLimitSubtitle}<\/p>\n\t\t\t\t\t\t\t\t\t\t<ul style=\"list-style: none; margin-bottom: 15px;\">\n\t\t\t\t\t\t\t\t\t\t<li style=\"color: #55A630; margin-bottom: 8px;\">&bull; ${this.i18n.rateLimitReason1}<\/li>\n\t\t\t\t\t\t\t\t\t\t<li style=\"color: #55A630; margin-bottom: 8px;\">&bull; ${this.i18n.rateLimitReason2}<\/li>\n\t\t\t\t\t\t\t\t\t\t<\/ul>\n\t\t\t\t\t\t\t\t\t<p style=\"font-size: 18px; margin-bottom:0px;\">${this.i18n.rateLimitContact}<\/p>\n\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t`,\n\t\t\t\t\t\t\tconfirmButtonText: this.i18n.confirmButton,\n\t\t\t\t\t\t\tconfirmButtonColor: '#AACC00',\n\t\t\t\t\t\t\tallowOutsideClick: true,\n\t\t\t\t\t\t\tallowEscapeKey: true\n\t\t\t\t\t\t});\n\t\t\t\t\t} else if (data.field && data.message) {\n\t\t\t\t\t\tthis.errors[data.field] = data.message;\n\t\t\t\t\t} else if (data.message) {\n\t\t\t\t\t\tthis.showRestMessage(data);\n\t\t\t\t\t} else {\n\t\t\t\t\t\talert(this.i18n.errorOccurred);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (error) {\n\t\t\t\talert(this.i18n.errorOccurred);\n\t\t\t\tconsole.error(error);\n\t\t\t} finally {\n\t\t\t\tthis.loading = false;\n\t\t\t}\n\t\t},\n\t\tasync handleVerifyOTP() {\n\t\t\tthis.errors = {};\n\t\t\tthis.loading = true;\n\t\t\tthis.sending = false;\n\n\t\t\ttry {\n\t\t\t\t\/\/ \u57f7\u884c reCAPTCHA \u9a57\u8b49\n\t\t\t\tconst recaptchaToken = await this.executeRecaptcha('verify_otp');\n\n\t\t\t\tconst response = await fetch('https:\/\/demo2.gcreate.com.tw\/gc_energy_saving\/wp-json\/gc\/v1\/verify-otp', {\n\t\t\t\t\tmethod: 'POST',\n\t\t\t\t\theaders: {\n\t\t\t\t\t\t'Content-Type': 'application\/json',\n\t\t\t\t\t},\n\t\t\t\t\tbody: JSON.stringify({\n\t\t\t\t\t\temail: this.verifyEmail,\n\t\t\t\t\t\totp_code: this.otpForm.code,\n\t\t\t\t\t\tnonce: this.nonce,\n\t\t\t\t\t\tredirect: this.redirect,\n\t\t\t\t\t\trecaptcha_token: recaptchaToken\n\t\t\t\t\t})\n\t\t\t\t});\n\n\t\t\t\tconst data = await response.json();\n\n\t\t\t\tif (response.ok && data.success) {\n\t\t\t\t\t\/\/ \u767b\u5165\u6210\u529f\uff0c\u91cd\u7f6e\u8868\u55ae\u8b8a\u66f4\u72c0\u614b\uff08\u907f\u514d\u96e2\u958b\u9801\u9762\u6642\u51fa\u73fe\u8b66\u544a\uff09\n\t\t\t\t\tthis.formChanged = false;\n\n\t\t\t\t\t\/\/ \u986f\u793a SweetAlert \u5f48\u7a97\n\t\t\t\t\tSwal.fire({\n\t\t\t\t\t\ttitle: this.i18n.loginSuccess,\n\t\t\t\t\t\ttext: this.i18n.redirecting,\n\t\t\t\t\t\t\/\/ icon: 'success',\n\t\t\t\t\t\tconfirmButtonText: this.i18n.confirmButton,\n\t\t\t\t\t\tconfirmButtonColor: '#55A630',\n\t\t\t\t\t\tallowOutsideClick: false,\n\t\t\t\t\t\tallowEscapeKey: false\n\t\t\t\t\t}).then((result) => {\n\t\t\t\t\t\tif (result.isConfirmed) {\n\t\t\t\t\t\t\twindow.location.href = data.redirect;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\t\/\/ \u8655\u7406 429 \u932f\u8aa4\uff08\u901f\u7387\u9650\u5236\uff09\n\t\t\t\t\tif (response.status === 429) {\n\t\t\t\t\t\tSwal.fire({\n\t\t\t\t\t\t\thtml: `\n\t\t\t\t\t\t\t\t<div style=\"display: flex; justify-content: center; margin-top:10px;\">\n\t\t\t\t\t\t\t\t\t<div style=\"text-align: left;\">\n\t\t\t\t\t\t\t\t\t<p style=\"font-size: 18px; margin-bottom: 15px;\">${this.i18n.verifyRateLimitTitle}<\/p>\n\t\t\t\t\t\t\t\t\t<p style=\"font-size: 18px; margin-bottom: 15px;\">${this.i18n.rateLimitSubtitle}<\/p>\n\t\t\t\t\t\t\t\t\t\t<ul style=\"list-style: none; margin-bottom: 15px;\">\n\t\t\t\t\t\t\t\t\t\t<li style=\"color: #55A630; margin-bottom: 8px;\">&bull; ${this.i18n.verifyRateLimitReason1}<\/li>\n\t\t\t\t\t\t\t\t\t\t<li style=\"color: #55A630; margin-bottom: 8px;\">&bull; ${this.i18n.verifyRateLimitReason2}<\/li>\n\t\t\t\t\t\t\t\t\t\t<\/ul>\n\t\t\t\t\t\t\t\t\t<p style=\"font-size: 18px; margin-bottom:0px;\">${this.i18n.rateLimitContact}<\/p>\n\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t`,\n\t\t\t\t\t\t\tconfirmButtonText: this.i18n.confirmButton,\n\t\t\t\t\t\t\tconfirmButtonColor: '#AACC00',\n\t\t\t\t\t\t\tallowOutsideClick: true,\n\t\t\t\t\t\t\tallowEscapeKey: true\n\t\t\t\t\t\t});\n\t\t\t\t\t} else if (data.field && data.message) {\n\t\t\t\t\t\tthis.errors[data.field] = data.message;\n\t\t\t\t\t} else if (data.message) {\n\t\t\t\t\t\tthis.showRestMessage(data);\n\t\t\t\t\t} else {\n\t\t\t\t\t\talert(this.i18n.errorOccurred);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (error) {\n\t\t\t\talert(this.i18n.errorOccurred);\n\t\t\t\tconsole.error(error);\n\t\t\t} finally {\n\t\t\t\tthis.loading = false;\n\t\t\t}\n\t\t},\n\t\tasync handleResendOTP() {\n\t\t\tif (this.loading || this.resendCountdown > 0) return;\n\n\t\t\tthis.errors = {};\n\t\t\tthis.loading = true;\n\n\t\t\ttry {\n\t\t\t\t\/\/ \u57f7\u884c reCAPTCHA \u9a57\u8b49\n\t\t\t\tconst recaptchaToken = await this.executeRecaptcha('send_otp');\n\n\t\t\t\tconst response = await fetch('https:\/\/demo2.gcreate.com.tw\/gc_energy_saving\/wp-json\/gc\/v1\/send-otp', {\n\t\t\t\t\tmethod: 'POST',\n\t\t\t\t\theaders: {\n\t\t\t\t\t\t'Content-Type': 'application\/json',\n\t\t\t\t\t},\n\t\t\t\t\tbody: JSON.stringify({\n\t\t\t\t\t\temail: this.verifyEmail,\n\t\t\t\t\t\tnonce: this.nonce,\n\t\t\t\t\t\tredirect: this.redirect,\n\t\t\t\t\t\trecaptcha_token: recaptchaToken\n\t\t\t\t\t})\n\t\t\t\t});\n\n\t\t\t\tconst data = await response.json();\n\n\t\t\t\tif (response.ok && data.success) {\n\t\t\t\t\tthis.otpForm.code = '';\n\t\t\t\t\tthis.startResendCountdown(30);\n\t\t\t\t\t\/\/ alert('\u9a57\u8b49\u78bc\u5df2\u91cd\u65b0\u767c\u9001');\n\t\t\t\t\tthis.sending = true;\n\t\t\t\t\tthis.formChanged = false; \/\/ \u91cd\u7f6e\u8868\u55ae\u8b8a\u66f4\u72c0\u614b\n\t\t\t\t} else {\n\t\t\t\t\t\/\/ \u8655\u7406 429 \u932f\u8aa4\uff08\u901f\u7387\u9650\u5236\uff09\n\t\t\t\t\tif (response.status === 429) {\n\t\t\t\t\t\tSwal.fire({\n\t\t\t\t\t\t\thtml: `\n\t\t\t\t\t\t\t\t<div style=\"display: flex; justify-content: center; margin-top:10px;\">\n\t\t\t\t\t\t\t\t\t<div style=\"text-align: left;\">\n\t\t\t\t\t\t\t\t\t<p style=\"font-size: 18px; margin-bottom: 15px;\">${this.i18n.rateLimitTitle}<\/p>\n\t\t\t\t\t\t\t\t\t<p style=\"font-size: 18px; margin-bottom: 15px;\">${this.i18n.rateLimitSubtitle}<\/p>\n\t\t\t\t\t\t\t\t\t\t<ul style=\"list-style: none; margin-bottom: 15px;\">\n\t\t\t\t\t\t\t\t\t\t<li style=\"color: #55A630; margin-bottom: 8px;\">&bull; ${this.i18n.rateLimitReason1}<\/li>\n\t\t\t\t\t\t\t\t\t\t<li style=\"color: #55A630; margin-bottom: 8px;\">&bull; ${this.i18n.rateLimitReason2}<\/li>\n\t\t\t\t\t\t\t\t\t\t<\/ul>\n\t\t\t\t\t\t\t\t\t<p style=\"font-size: 18px; margin-bottom:0px;\">${this.i18n.rateLimitContact}<\/p>\n\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t`,\n\t\t\t\t\t\t\tconfirmButtonText: this.i18n.confirmButton,\n\t\t\t\t\t\t\tconfirmButtonColor: '#AACC00',\n\t\t\t\t\t\t\tallowOutsideClick: true,\n\t\t\t\t\t\t\tallowEscapeKey: true\n\t\t\t\t\t\t});\n\t\t\t\t\t} else if (data.field && data.message) {\n\t\t\t\t\t\tthis.errors[data.field] = data.message;\n\t\t\t\t\t} else if (data.message) {\n\t\t\t\t\t\tthis.showRestMessage(data);\n\t\t\t\t\t} else {\n\t\t\t\t\t\talert(this.i18n.errorOccurred);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (error) {\n\t\t\t\talert(this.i18n.errorOccurred);\n\t\t\t\tconsole.error(error);\n\t\t\t} finally {\n\t\t\t\tthis.loading = false;\n\t\t\t}\n\t\t},\n\t\tasync handleRegister() {\n\t\t\tthis.errors = {};\n\t\t\tthis.loading = true;\n\n\t\t\ttry {\n\t\t\t\t\/\/ \u57f7\u884c reCAPTCHA \u9a57\u8b49\n\t\t\t\tconst recaptchaToken = await this.executeRecaptcha('register');\n\n\t\t\t\tconst response = await fetch('https:\/\/demo2.gcreate.com.tw\/gc_energy_saving\/wp-json\/gc\/v1\/register', {\n\t\t\t\t\tmethod: 'POST',\n\t\t\t\t\theaders: {\n\t\t\t\t\t\t'Content-Type': 'application\/json',\n\t\t\t\t\t},\n\t\t\t\t\tbody: JSON.stringify({\n\t\t\t\t\t\temail: this.registerForm.email,\n\t\t\t\t\t\tcompany: this.registerForm.company,\n\t\t\t\t\t\tGUI_number: this.registerForm.GUI_number,\n\t\t\t\t\t\tnonce: this.nonce,\n\t\t\t\t\t\trecaptcha_token: recaptchaToken\n\t\t\t\t\t})\n\t\t\t\t});\n\n\t\t\t\tconst data = await response.json();\n\n\t\t\t\tif (response.ok && data.success) {\n\t\t\t\t\t\/\/ \u8a3b\u518a\u6210\u529f\u5f8c\u76f4\u63a5\u5207\u63db\u5230\u9a57\u8b49\u9801\u9762\n\t\t\t\t\tthis.otpForm.code = '';\n\t\t\t\t\tthis.verifyEmail = this.registerForm.email;\n\t\t\t\t\tthis.registerForm = {\n\t\t\t\t\t\temail: '',\n\t\t\t\t\t\tcompany: '',\n\t\t\t\t\t\tGUI_number: ''\n\t\t\t\t\t};\n\t\t\t\t\tthis.switchView('verify');\n\t\t\t\t\tthis.startResendCountdown(30);\n\t\t\t\t\tthis.sending = true;\n\t\t\t\t\tthis.formChanged = false; \/\/ \u91cd\u7f6e\u8868\u55ae\u8b8a\u66f4\u72c0\u614b\n\t\t\t\t} else {\n\t\t\t\t\t\/\/ \u5f8c\u7aef\u53ef\u80fd\u56de\u50b3 errors: []\uff08\u9663\u5217\uff09\uff0c\u4e0d\u53ef\u7576\u6210\u300c\u6b04\u4f4d\u932f\u8aa4\u7269\u4ef6\u300d\u5426\u5247\u6703\u5403\u6389 message\uff08\u4f8b\u5982 reCAPTCHA 403\uff09\n\t\t\t\t\tif (this.hasFieldErrorsPayload(data.errors)) {\n\t\t\t\t\t\tthis.errors = data.errors;\n\t\t\t\t\t} else if (data.field && data.message) {\n\t\t\t\t\t\tthis.errors[data.field] = data.message;\n\t\t\t\t\t} else if (data.message) {\n\t\t\t\t\t\tthis.showRestMessage(data);\n\t\t\t\t\t} else {\n\t\t\t\t\t\talert(this.i18n.errorOccurred);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (error) {\n\t\t\t\talert(this.i18n.errorOccurred);\n\t\t\t\tconsole.error(error);\n\t\t\t} finally {\n\t\t\t\tthis.loading = false;\n\t\t\t}\n\t\t},\n\t\tstartResendCountdown(seconds) {\n\t\t\tthis.resendCountdown = seconds;\n\t\t\tif (this.resendTimer) {\n\t\t\t\tclearInterval(this.resendTimer);\n\t\t\t}\n\t\t\tthis.resendTimer = setInterval(() => {\n\t\t\t\tthis.resendCountdown--;\n\t\t\t\tif (this.resendCountdown <= 0) {\n\t\t\t\t\tclearInterval(this.resendTimer);\n\t\t\t\t\tthis.resendTimer = null;\n\t\t\t\t}\n\t\t\t}, 1000);\n\t\t},\n\t\t\/**\n\t\t * \u8655\u7406\u9801\u9762\u96e2\u958b\u524d\u7684\u8b66\u544a\n\t\t *\/\n\t\thandleBeforeUnload(event) {\n\t\t\t\/\/ \u53ea\u6709\u5728\u8868\u55ae\u6709\u8b8a\u66f4\u6642\u624d\u986f\u793a\u8b66\u544a\n\t\t\tif (this.formChanged) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tevent.returnValue = ''; \/\/ Chrome \u9700\u8981\u8a2d\u5b9a returnValue\n\t\t\t\treturn ''; \/\/ \u90e8\u5206\u820a\u7248\u700f\u89bd\u5668\u9700\u8981\u8fd4\u56de\u5b57\u4e32\n\t\t\t}\n\t\t}\n\t},\n\twatch: {\n\t\t\/\/ \u76e3\u807d\u767b\u5165\u8868\u55ae\u8b8a\u5316\n\t\t'loginForm.email'(newVal) {\n\t\t\tif (newVal) {\n\t\t\t\tthis.formChanged = true;\n\t\t\t}\n\t\t},\n\t\t\/\/ \u76e3\u807d OTP \u8868\u55ae\u8b8a\u5316\uff08\u50c5\u4fdd\u7559\u6578\u5b57\uff0c\u6700\u591a 6 \u78bc\uff09\n\t\t'otpForm.code'(newVal) {\n\t\t\tconst digits = String(newVal ?? '').replace(\/\\D\/g, '').slice(0, 6);\n\t\t\tif (digits !== newVal) {\n\t\t\t\tthis.otpForm.code = digits;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (newVal) {\n\t\t\t\tthis.formChanged = true;\n\t\t\t}\n\t\t},\n\t\t\/\/ \u76e3\u807d\u8a3b\u518a\u8868\u55ae\u8b8a\u5316\n\t\t'registerForm.email'(newVal) {\n\t\t\tif (newVal) {\n\t\t\t\tthis.formChanged = true;\n\t\t\t}\n\t\t},\n\t\t'registerForm.company'(newVal) {\n\t\t\tif (newVal) {\n\t\t\t\tthis.formChanged = true;\n\t\t\t}\n\t\t},\n\t\t'registerForm.GUI_number'(newVal) {\n\t\t\tif (newVal) {\n\t\t\t\tthis.formChanged = true;\n\t\t\t}\n\t\t}\n\t},\n\tmounted() {\n\t\t\/\/ \u76e3\u807d\u9801\u9762\u96e2\u958b\u4e8b\u4ef6\n\t\twindow.addEventListener('beforeunload', this.handleBeforeUnload);\n\t},\n\tbeforeUnmount() {\n\t\t\/\/ \u79fb\u9664\u4e8b\u4ef6\u76e3\u807d\u5668\n\t\twindow.removeEventListener('beforeunload', this.handleBeforeUnload);\n\n\t\tif (this.resendTimer) {\n\t\t\tclearInterval(this.resendTimer);\n\t\t}\n\t}\n}).mount('#gc-login-app');\n<\/script>\n<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-3dd3685 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"3dd3685\" data-element_type=\"section\" data-settings=\"{&quot;jet_parallax_layout_list&quot;:[]}\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-86a74a3\" data-id=\"86a74a3\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-93eac85 elementor-widget elementor-widget-spacer\" data-id=\"93eac85\" data-element_type=\"widget\" data-widget_type=\"spacer.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-spacer\">\n\t\t\t<div class=\"elementor-spacer-inner\"><\/div>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>\u6703\u54e1\u4e2d\u5fc3<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"elementor_header_footer","meta":{"footnotes":""},"class_list":["post-2557","page","type-page","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v23.7 (Yoast SEO v23.7) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u767b\u5165 - \u6703\u5c55\u7522\u696d\u7bc0\u80fd\u6e1b\u78b3\u5c08\u5340<\/title>\n<meta name=\"robots\" content=\"noindex, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<meta property=\"og:locale\" content=\"zh_TW\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u767b\u5165\" \/>\n<meta property=\"og:description\" content=\"\u6703\u54e1\u4e2d\u5fc3\" \/>\n<meta property=\"og:url\" content=\"https:\/\/demo2.gcreate.com.tw\/gc_energy_saving\/login\/\" \/>\n<meta property=\"og:site_name\" content=\"\u6703\u5c55\u7522\u696d\u7bc0\u80fd\u6e1b\u78b3\u5c08\u5340\" \/>\n<meta property=\"article:modified_time\" content=\"2023-08-04T08:46:33+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/demo2.gcreate.com.tw\/gc_energy_saving\/login\/\",\"url\":\"https:\/\/demo2.gcreate.com.tw\/gc_energy_saving\/login\/\",\"name\":\"\u767b\u5165 - \u6703\u5c55\u7522\u696d\u7bc0\u80fd\u6e1b\u78b3\u5c08\u5340\",\"isPartOf\":{\"@id\":\"https:\/\/demo2.gcreate.com.tw\/gc_energy_saving\/#website\"},\"datePublished\":\"2023-08-01T07:04:47+00:00\",\"dateModified\":\"2023-08-04T08:46:33+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/demo2.gcreate.com.tw\/gc_energy_saving\/login\/#breadcrumb\"},\"inLanguage\":\"zh-TW\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/demo2.gcreate.com.tw\/gc_energy_saving\/login\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/demo2.gcreate.com.tw\/gc_energy_saving\/login\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9801\",\"item\":\"https:\/\/demo2.gcreate.com.tw\/gc_energy_saving\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u767b\u5165\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/demo2.gcreate.com.tw\/gc_energy_saving\/#website\",\"url\":\"https:\/\/demo2.gcreate.com.tw\/gc_energy_saving\/\",\"name\":\"\u6703\u5c55\u7522\u696d\u7bc0\u80fd\u6e1b\u78b3\u5c08\u5340\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/demo2.gcreate.com.tw\/gc_energy_saving\/#organization\"},\"alternateName\":\"\u6703\u5c55\u7522\u696d\u7bc0\u80fd\u6e1b\u78b3\u5c08\u5340\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/demo2.gcreate.com.tw\/gc_energy_saving\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"zh-TW\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/demo2.gcreate.com.tw\/gc_energy_saving\/#organization\",\"name\":\"\u6703\u5c55\u7522\u696d\u7bc0\u80fd\u6e1b\u78b3\u5c08\u5340\",\"url\":\"https:\/\/demo2.gcreate.com.tw\/gc_energy_saving\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-TW\",\"@id\":\"https:\/\/demo2.gcreate.com.tw\/gc_energy_saving\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/demo2.gcreate.com.tw\/gc_energy_saving\/wp-content\/uploads\/2023\/05\/cropped-fav-mt.png\",\"contentUrl\":\"https:\/\/demo2.gcreate.com.tw\/gc_energy_saving\/wp-content\/uploads\/2023\/05\/cropped-fav-mt.png\",\"width\":512,\"height\":512,\"caption\":\"\u6703\u5c55\u7522\u696d\u7bc0\u80fd\u6e1b\u78b3\u5c08\u5340\"},\"image\":{\"@id\":\"https:\/\/demo2.gcreate.com.tw\/gc_energy_saving\/#\/schema\/logo\/image\/\"}}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"\u767b\u5165 - \u6703\u5c55\u7522\u696d\u7bc0\u80fd\u6e1b\u78b3\u5c08\u5340","robots":{"index":"noindex","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"og_locale":"zh_TW","og_type":"article","og_title":"\u767b\u5165","og_description":"\u6703\u54e1\u4e2d\u5fc3","og_url":"https:\/\/demo2.gcreate.com.tw\/gc_energy_saving\/login\/","og_site_name":"\u6703\u5c55\u7522\u696d\u7bc0\u80fd\u6e1b\u78b3\u5c08\u5340","article_modified_time":"2023-08-04T08:46:33+00:00","twitter_card":"summary_large_image","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/demo2.gcreate.com.tw\/gc_energy_saving\/login\/","url":"https:\/\/demo2.gcreate.com.tw\/gc_energy_saving\/login\/","name":"\u767b\u5165 - \u6703\u5c55\u7522\u696d\u7bc0\u80fd\u6e1b\u78b3\u5c08\u5340","isPartOf":{"@id":"https:\/\/demo2.gcreate.com.tw\/gc_energy_saving\/#website"},"datePublished":"2023-08-01T07:04:47+00:00","dateModified":"2023-08-04T08:46:33+00:00","breadcrumb":{"@id":"https:\/\/demo2.gcreate.com.tw\/gc_energy_saving\/login\/#breadcrumb"},"inLanguage":"zh-TW","potentialAction":[{"@type":"ReadAction","target":["https:\/\/demo2.gcreate.com.tw\/gc_energy_saving\/login\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/demo2.gcreate.com.tw\/gc_energy_saving\/login\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9801","item":"https:\/\/demo2.gcreate.com.tw\/gc_energy_saving\/"},{"@type":"ListItem","position":2,"name":"\u767b\u5165"}]},{"@type":"WebSite","@id":"https:\/\/demo2.gcreate.com.tw\/gc_energy_saving\/#website","url":"https:\/\/demo2.gcreate.com.tw\/gc_energy_saving\/","name":"\u6703\u5c55\u7522\u696d\u7bc0\u80fd\u6e1b\u78b3\u5c08\u5340","description":"","publisher":{"@id":"https:\/\/demo2.gcreate.com.tw\/gc_energy_saving\/#organization"},"alternateName":"\u6703\u5c55\u7522\u696d\u7bc0\u80fd\u6e1b\u78b3\u5c08\u5340","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/demo2.gcreate.com.tw\/gc_energy_saving\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"zh-TW"},{"@type":"Organization","@id":"https:\/\/demo2.gcreate.com.tw\/gc_energy_saving\/#organization","name":"\u6703\u5c55\u7522\u696d\u7bc0\u80fd\u6e1b\u78b3\u5c08\u5340","url":"https:\/\/demo2.gcreate.com.tw\/gc_energy_saving\/","logo":{"@type":"ImageObject","inLanguage":"zh-TW","@id":"https:\/\/demo2.gcreate.com.tw\/gc_energy_saving\/#\/schema\/logo\/image\/","url":"https:\/\/demo2.gcreate.com.tw\/gc_energy_saving\/wp-content\/uploads\/2023\/05\/cropped-fav-mt.png","contentUrl":"https:\/\/demo2.gcreate.com.tw\/gc_energy_saving\/wp-content\/uploads\/2023\/05\/cropped-fav-mt.png","width":512,"height":512,"caption":"\u6703\u5c55\u7522\u696d\u7bc0\u80fd\u6e1b\u78b3\u5c08\u5340"},"image":{"@id":"https:\/\/demo2.gcreate.com.tw\/gc_energy_saving\/#\/schema\/logo\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/demo2.gcreate.com.tw\/gc_energy_saving\/wp-json\/wp\/v2\/pages\/2557","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/demo2.gcreate.com.tw\/gc_energy_saving\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/demo2.gcreate.com.tw\/gc_energy_saving\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/demo2.gcreate.com.tw\/gc_energy_saving\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/demo2.gcreate.com.tw\/gc_energy_saving\/wp-json\/wp\/v2\/comments?post=2557"}],"version-history":[{"count":20,"href":"https:\/\/demo2.gcreate.com.tw\/gc_energy_saving\/wp-json\/wp\/v2\/pages\/2557\/revisions"}],"predecessor-version":[{"id":2618,"href":"https:\/\/demo2.gcreate.com.tw\/gc_energy_saving\/wp-json\/wp\/v2\/pages\/2557\/revisions\/2618"}],"wp:attachment":[{"href":"https:\/\/demo2.gcreate.com.tw\/gc_energy_saving\/wp-json\/wp\/v2\/media?parent=2557"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}