{"id":221,"date":"2023-11-01T11:59:14","date_gmt":"2023-11-01T03:59:14","guid":{"rendered":"https:\/\/shop.draytek.com\/wordpress\/?page_id=221"},"modified":"2024-01-17T10:19:37","modified_gmt":"2024-01-17T02:19:37","slug":"registration","status":"publish","type":"page","link":"https:\/\/shop.draytek.com\/b2b\/index.php\/registration\/","title":{"rendered":"\u5e33\u865f\u8a3b\u518a"},"content":{"rendered":"\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<h2 class=\"wp-block-heading has-text-align-center has-text-color\" style=\"color:#666666\">B2B \u5e33\u865f\u8a3b\u518a<\/h2>\n\n\n\n<div class=\"um um-register um-217\">\n\t<div class=\"um-form\" data-mode=\"register\">\n\t\t<form method=\"post\" action=\"\">\n\t\t\t<div class=\"um-row _um_row_1 \" style=\"margin: 0 0 30px 0;\"><div class=\"um-col-121\"><div  id=\"um_field_217_user_login\" class=\"um-field um-field-text  um-field-user_login um-field-text um-field-type_text\" data-key=\"user_login\"><div class=\"um-field-label\"><label for=\"user_login-217\">\u4f7f\u7528\u8005\u540d\u7a31<\/label><span class=\"um-tip um-tip-w\" title=\"\u8acb\u586b\u5beb\u82f1\u6578\u5b57\uff0c\u5141\u8a31\u5b57\u5143a~z or A~Z or 0~9\"><i class=\"um-icon-help-circled\"><\/i><\/span><div class=\"um-clear\"><\/div><\/div><div class=\"um-field-area\"><input  autocomplete=\"off\" class=\"um-form-field valid \" type=\"text\" name=\"user_login-217\" id=\"user_login-217\" value=\"\" placeholder=\"\" data-validate=\"unique_username\" data-key=\"user_login\"  aria-invalid=\"false\" \/>\n\n\t\t\t\t\t\t<\/div><\/div><div  id=\"um_field_217_first_name\" class=\"um-field um-field-text  um-field-first_name um-field-text um-field-type_text\" data-key=\"first_name\"><div class=\"um-field-label\"><label for=\"first_name-217\">\u540d\u5b57<\/label><div class=\"um-clear\"><\/div><\/div><div class=\"um-field-area\"><input  autocomplete=\"off\" class=\"um-form-field valid not-required \" type=\"text\" name=\"first_name-217\" id=\"first_name-217\" value=\"\" placeholder=\"\" data-validate=\"\" data-key=\"first_name\"  aria-invalid=\"false\" \/>\n\n\t\t\t\t\t\t<\/div><\/div><div  id=\"um_field_217_last_name\" class=\"um-field um-field-text  um-field-last_name um-field-text um-field-type_text\" data-key=\"last_name\"><div class=\"um-field-label\"><label for=\"last_name-217\">\u59d3\u6c0f<\/label><div class=\"um-clear\"><\/div><\/div><div class=\"um-field-area\"><input  autocomplete=\"off\" class=\"um-form-field valid not-required \" type=\"text\" name=\"last_name-217\" id=\"last_name-217\" value=\"\" placeholder=\"\" data-validate=\"\" data-key=\"last_name\"  aria-invalid=\"false\" \/>\n\n\t\t\t\t\t\t<\/div><\/div><div  id=\"um_field_217_user_password\" class=\"um-field um-field-password  um-field-user_password um-field-password um-field-type_password\" data-key=\"user_password\"><div class=\"um-field-label\"><label for=\"user_password-217\">\u5bc6\u78bc<\/label><div class=\"um-clear\"><\/div><\/div><div class=\"um-field-area\"><input class=\"um-form-field valid \" type=\"password\" name=\"user_password-217\" id=\"user_password-217\" value=\"\" placeholder=\"\" data-validate=\"\" data-key=\"user_password\"  aria-invalid=\"false\" \/>\n\n\t\t\t\t\t\t\t<\/div><\/div><div  id=\"um_field_217_confirm_user_password\" class=\"um-field um-field-password  um-field-user_password um-field-password um-field-type_password\" data-key=\"confirm_user_password\"><div class=\"um-field-label\"><label for=\"confirm_user_password-217\">\u78ba\u8a8d\u5bc6\u78bc<\/label><div class=\"um-clear\"><\/div><\/div><div class=\"um-field-area\"><input class=\"um-form-field valid \" type=\"password\" name=\"confirm_user_password-217\" id=\"confirm_user_password-217\" value=\"\" placeholder=\"\u78ba\u8a8d\u5bc6\u78bc\" data-validate=\"\" data-key=\"confirm_user_password\"  aria-invalid=\"false\" \/><\/div><\/div><\/div><div class=\"um-col-122\"><div  id=\"um_field_217_user_email\" class=\"um-field um-field-text  um-field-user_email um-field-text um-field-type_text\" data-key=\"user_email\"><div class=\"um-field-label\"><label for=\"user_email-217\">\u96fb\u5b50\u90f5\u4ef6\u5730\u5740<\/label><div class=\"um-clear\"><\/div><\/div><div class=\"um-field-area\"><input  autocomplete=\"off\" class=\"um-form-field valid not-required \" type=\"text\" name=\"user_email-217\" id=\"user_email-217\" value=\"\" placeholder=\"\" data-validate=\"unique_email\" data-key=\"user_email\"  aria-invalid=\"false\" \/>\n\n\t\t\t\t\t\t<\/div><\/div><div  id=\"um_field_217_tax_number\" class=\"um-field um-field-tel  um-field-tax_number um-field-tel um-field-type_tel\" data-key=\"tax_number\"><div class=\"um-field-label\"><label for=\"tax_number-217\">\u7d71\u7de8<\/label><div class=\"um-clear\"><\/div><\/div><div class=\"um-field-area\"><input  autocomplete=\"off\" class=\"um-form-field valid not-required \" type=\"tel\" name=\"tax_number-217\" id=\"tax_number-217\" value=\"\" placeholder=\"\u8acb\u8f38\u5165\u516c\u53f8\u7d71\u7de8\" data-validate=\"\" data-key=\"tax_number\"  aria-invalid=\"false\" \/>\n\n\t\t\t\t\t\t<\/div><\/div><div  id=\"um_field_217_billing_company\" class=\"um-field um-field-text  um-field-billing_company um-field-text um-field-type_text\" data-key=\"billing_company\"><div class=\"um-field-label\"><label for=\"billing_company-217\">\u516c\u53f8\u540d\u7a31<\/label><div class=\"um-clear\"><\/div><\/div><div class=\"um-field-area\"><input  autocomplete=\"off\" class=\"um-form-field valid \" type=\"text\" name=\"billing_company-217\" id=\"billing_company-217\" value=\"\" placeholder=\"\u8acb\u8f38\u5165\u60a8\u7684\u516c\u53f8\u540d\u7a31\" data-validate=\"\" data-key=\"billing_company\"  aria-invalid=\"false\" \/>\n\n\t\t\t\t\t\t<\/div><\/div><div  id=\"um_field_217_is_check_tax\" class=\"um-field um-field-checkbox  um-is-conditional um-field-is_check_tax um-field-checkbox um-field-type_checkbox\" data-key=\"is_check_tax\" data-cond-0-action=\"show\" data-cond-0-field=\"tax_number\" data-cond-0-operator=\"not empty\" data-cond-0-value=\"\"  aria-invalid=\"false\" ><div class=\"um-field-label\"><label for=\"is_check_tax-217\">isCheckedTax<\/label><div class=\"um-clear\"><\/div><\/div><div class=\"um-field-area\"><label class=\"um-field-checkbox  um-field-half  um-field-radio-state-disabled\"><input   type=\"checkbox\" name=\"is_check_tax[]\" value=\"t\"  \/><span class=\"um-field-checkbox-state\"><i class=\"um-icon-android-checkbox-outline-blank\"><\/i><\/span><span class=\"um-field-checkbox-option\">t<\/span><\/label><div class=\"um-clear\"><\/div><\/div><\/div><\/div><div class=\"um-clear\"><\/div><\/div>\t\t<input type=\"hidden\" name=\"form_id\" id=\"form_id_217\" value=\"217\" \/>\n\t\n\t<p class=\"um_request_name\">\n\t\t<label for=\"um_request_217\">Only fill in if you are not human<\/label>\n\t\t<input type=\"hidden\" name=\"um_request\" id=\"um_request_217\" class=\"input\" value=\"\" size=\"25\" autocomplete=\"off\" \/>\n\t<\/p>\n\n\t<input type=\"hidden\" id=\"_wpnonce\" name=\"_wpnonce\" value=\"d40b6041c6\" \/><input type=\"hidden\" name=\"_wp_http_referer\" value=\"\/b2b\/index.php\/wp-json\/wp\/v2\/pages\/221\" \/>\n\t<div class=\"um-col-alt\">\n\n\t\t\n\t\t\t<div class=\"um-center\">\n\t\t\t\t<input type=\"submit\" value=\"\u8a3b\u518a\u5e33\u865f\" class=\"um-button\" id=\"um-submit-btn\" \/>\n\t\t\t<\/div>\n\n\t\t\n\t\t<div class=\"um-clear\"><\/div>\n\n\t<\/div>\n\n\t\t\t<\/form>\n\t<\/div>\n<\/div>\n<style>\n\t\t\t.um-217.um {\n\t\t\tmax-width: 780px;\n\t\t}\n\t\t<\/style>\n\n\n\n\n<script>\ndocument.querySelector(\"#um_field_217_tax_number label\").innerHTML += `<button type=\"button\" class=\"ml-1 btn btn-primary\" onclick=\"checkTaxNum()\">\u6aa2\u67e5\u7d71\u7de8<\/button>`;\nfunction checkTaxNum() {\n    let formData = new FormData();\n    formData.append(\"tax\", document.querySelector('#tax_number-217').value);\n    const apiUrl = `\/b2b\/wp-content\/plugins\/woocommerce\/check_tax_num.php`;\n    fetch(apiUrl, {\n        method: \"POST\",\n        body: formData,\n    })\n        .then((response) => {\n            if (response.ok) {\n                return response.json();\n            } else {\n                throw new Error(\"Request fail\");\n            }\n        })\n        .then((data) => {\n            console.log(data);\n            if(data!=\"\"){\n                document.querySelector(\"#billing_company-217\").value = JSON.parse(data)[0].Company_Name\n                document.querySelector(\"#um_field_217_is_check_tax input\").click()\n            }\n        })\n        .catch((error) => {\n            console.error(\"\u932f\u8aa4\u539f\u56e0:\", error);\n        });\n}\n<\/script>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>B2B \u5e33\u865f\u8a3b\u518a<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_acf_changed":false,"footnotes":""},"class_list":["post-221","page","type-page","status-publish","hentry"],"blocksy_meta":"","acf":[],"_links":{"self":[{"href":"https:\/\/shop.draytek.com\/b2b\/index.php\/wp-json\/wp\/v2\/pages\/221","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/shop.draytek.com\/b2b\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/shop.draytek.com\/b2b\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/shop.draytek.com\/b2b\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/shop.draytek.com\/b2b\/index.php\/wp-json\/wp\/v2\/comments?post=221"}],"version-history":[{"count":28,"href":"https:\/\/shop.draytek.com\/b2b\/index.php\/wp-json\/wp\/v2\/pages\/221\/revisions"}],"predecessor-version":[{"id":384,"href":"https:\/\/shop.draytek.com\/b2b\/index.php\/wp-json\/wp\/v2\/pages\/221\/revisions\/384"}],"wp:attachment":[{"href":"https:\/\/shop.draytek.com\/b2b\/index.php\/wp-json\/wp\/v2\/media?parent=221"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}