{"id":24390,"date":"2024-07-05T09:30:02","date_gmt":"2024-07-05T09:30:02","guid":{"rendered":"https:\/\/injrb35666.rakkoserver.net\/?p=24390"},"modified":"2024-07-05T09:30:20","modified_gmt":"2024-07-05T09:30:20","slug":"meishirun","status":"publish","type":"post","link":"https:\/\/injrb35666.rakkoserver.net\/index.php\/2024\/07\/05\/meishirun\/","title":{"rendered":"\u540d\u523arun2"},"content":{"rendered":"\n<!-- class, action, method\u3092\u5909\u66f4\u3057\u306a\u3044\u3067\u304f\u3060\u3055\u3044 -->\n<form id=\"business-card-form\" class=\"formrun custom-form\" action=\"https:\/\/form.run\/api\/v1\/r\/hp12w6y0xgxudy439rzpzkxs\" method=\"post\" enctype=\"multipart\/form-data\">\n  <!-- \u2193\u81ea\u7531\u306b\u8981\u7d20\u3092\u8ffd\u52a0\u30fb\u7de8\u96c6\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059 -->\n  <div class=\"form-group\">\n    <label>\u30d5\u30a1\u30a4\u30eb\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9<\/label>\n    <input type=\"file\" id=\"file-upload\" name=\"\u6dfb\u4ed8\u30d5\u30a1\u30a4\u30eb\" class=\"form-file\">\n  <\/div>\n\n  <input type=\"hidden\" id=\"company-name\" name=\"\u4f1a\u793e\u540d\" value=\"\">\n  <input type=\"hidden\" id=\"department\" name=\"\u90e8\u7f72\" value=\"\">\n  <input type=\"hidden\" id=\"name\" name=\"\u540d\u524d\" value=\"\">\n  <input type=\"hidden\" id=\"phone\" name=\"\u96fb\u8a71\u756a\u53f7\" value=\"\">\n  <input type=\"hidden\" id=\"email\" name=\"\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\" value=\"\">\n\n  <!-- \"\u30dc\u30c3\u30c8\u6295\u7a3f\u3092\u30d6\u30ed\u30c3\u30af\u3059\u308b\u305f\u3081\u306e\u30bf\u30b0\" -->\n  <div class=\"_formrun_gotcha\">\n    <style media=\"screen\">._formrun_gotcha {position:absolute!important;height:1px;width:1px;overflow:hidden;}<\/style>\n    <label for=\"_formrun_gotcha\">If you are a human, ignore this field<\/label>\n    <input type=\"text\" name=\"_formrun_gotcha\" id=\"_formrun_gotcha\" tabindex=\"-1\">\n  <\/div>\n\n  <button type=\"button\" id=\"submit-button\" class=\"submit-button\">\u9001\u4fe1<\/button>\n<\/form>\n\n<script>\n  document.getElementById('submit-button').addEventListener('click', function() {\n    const fileInput = document.getElementById('file-upload');\n    const file = fileInput.files[0];\n    \n    if (file) {\n      const formData = new FormData();\n      formData.append('file', file);\n\n      \/\/ \u4eee\u306eOCR\u51e6\u7406: \u5b9f\u969b\u306eChatGPT4o\u306e\u547c\u3073\u51fa\u3057\u306b\u7f6e\u304d\u63db\u3048\u3066\u304f\u3060\u3055\u3044\n      fakeOCROperation(formData)\n        .then(data => {\n          document.getElementById('company-name').value = data.companyName;\n          document.getElementById('department').value = data.department;\n          document.getElementById('name').value = data.name;\n          document.getElementById('phone').value = data.phone;\n          document.getElementById('email').value = data.email;\n\n          \/\/ \u30d5\u30a9\u30fc\u30e0\u3092\u9001\u4fe1\u3059\u308b\n          document.getElementById('business-card-form').submit();\n        })\n        .catch(error => {\n          console.error('Error:', error);\n          alert('OCR\u51e6\u7406\u306b\u5931\u6557\u3057\u307e\u3057\u305f\u3002');\n        });\n    } else {\n      alert('\u30d5\u30a1\u30a4\u30eb\u3092\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3057\u3066\u304f\u3060\u3055\u3044\u3002');\n    }\n  });\n\n  \/\/ \u4eee\u306eOCR\u51e6\u7406\u95a2\u6570\n  function fakeOCROperation(formData) {\n    return new Promise((resolve, reject) => {\n      \/\/ \u3053\u3053\u3067\u5b9f\u969b\u306eOCR API\u547c\u3073\u51fa\u3057\u3092\u884c\u3046\n      setTimeout(() => {\n        resolve({\n          companyName: '\u682a\u5f0f\u4f1a\u793e\u30b5\u30f3\u30d7\u30eb',\n          department: '\u55b6\u696d\u90e8',\n          name: '\u5c71\u7530\u592a\u90ce',\n          phone: '080-1234-5678',\n          email: 'taro.yamada@example.com'\n        });\n      }, 2000);\n    });\n  }\n<\/script>\n","protected":false},"excerpt":{"rendered":"<p>\u30d5\u30a1\u30a4\u30eb\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9 If you are a human, ignore this field \u9001\u4fe1<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"swell_btn_cv_data":"","footnotes":""},"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/injrb35666.rakkoserver.net\/index.php\/wp-json\/wp\/v2\/posts\/24390"}],"collection":[{"href":"https:\/\/injrb35666.rakkoserver.net\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/injrb35666.rakkoserver.net\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/injrb35666.rakkoserver.net\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/injrb35666.rakkoserver.net\/index.php\/wp-json\/wp\/v2\/comments?post=24390"}],"version-history":[{"count":1,"href":"https:\/\/injrb35666.rakkoserver.net\/index.php\/wp-json\/wp\/v2\/posts\/24390\/revisions"}],"predecessor-version":[{"id":24391,"href":"https:\/\/injrb35666.rakkoserver.net\/index.php\/wp-json\/wp\/v2\/posts\/24390\/revisions\/24391"}],"wp:attachment":[{"href":"https:\/\/injrb35666.rakkoserver.net\/index.php\/wp-json\/wp\/v2\/media?parent=24390"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/injrb35666.rakkoserver.net\/index.php\/wp-json\/wp\/v2\/categories?post=24390"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/injrb35666.rakkoserver.net\/index.php\/wp-json\/wp\/v2\/tags?post=24390"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}