{"id":139,"date":"2026-07-07T16:01:59","date_gmt":"2026-07-07T12:31:59","guid":{"rendered":"http:\/\/maham-iot.ir\/?page_id=139"},"modified":"2026-07-07T16:01:59","modified_gmt":"2026-07-07T12:31:59","slug":"%d8%ab%d8%a8%d8%aa-%d9%86%d8%a7%d9%85-%d8%b3%d8%a7%d9%85%d8%a7%d9%86%d9%87","status":"publish","type":"page","link":"https:\/\/maham-iot.ir\/?page_id=139","title":{"rendered":"\u062b\u0628\u062a \u0646\u0627\u0645 \u0633\u0627\u0645\u0627\u0646\u0647"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"><code>    <div id=\"maham-trial\" style=\"max-width:420px;margin:0 auto;font-family:inherit;direction:rtl\">\n      <div id=\"mt-step1\">\n        <h3>\u062b\u0628\u062a\u200c\u0646\u0627\u0645 \u0622\u0632\u0645\u0627\u06cc\u0634\u06cc \u0631\u0627\u06cc\u06af\u0627\u0646 \u06f1\u06f4 \u0631\u0648\u0632\u0647<\/h3>\n        <p style=\"font-size:13px;color:#666\">\u0634\u0645\u0627\u0631\u0647 \u0645\u0648\u0628\u0627\u06cc\u0644 \u062e\u0648\u062f \u0631\u0627 \u0648\u0627\u0631\u062f \u06a9\u0646\u06cc\u062f \u062a\u0627 \u06a9\u062f \u062a\u0623\u06cc\u06cc\u062f \u067e\u06cc\u0627\u0645\u06a9 \u0634\u0648\u062f.<\/p>\n        <input id=\"mt-phone\" type=\"tel\" placeholder=\"09123456789\" style=\"width:100%;padding:10px;margin:6px 0;border:1px solid #ccc;border-radius:8px;direction:ltr;text-align:right\">\n        <button onclick=\"mtSendOtp()\" id=\"mt-send-btn\" style=\"width:100%;padding:12px;background:#4caf50;color:#fff;border:none;border-radius:8px;cursor:pointer\">\u0627\u0631\u0633\u0627\u0644 \u06a9\u062f \u062a\u0623\u06cc\u06cc\u062f<\/button>\n      <\/div>\n\n      <div id=\"mt-step2\" style=\"display:none\">\n        <h3>\u062a\u06a9\u0645\u06cc\u0644 \u062b\u0628\u062a\u200c\u0646\u0627\u0645<\/h3>\n        <input id=\"mt-code\" type=\"text\" placeholder=\"\u06a9\u062f \u067e\u06cc\u0627\u0645\u06a9\u200c\u0634\u062f\u0647\" style=\"width:100%;padding:10px;margin:6px 0;border:1px solid #ccc;border-radius:8px;direction:ltr;text-align:right\">\n        <input id=\"mt-company\" type=\"text\" placeholder=\"\u0646\u0627\u0645 \u0645\u0631\u063a\u062f\u0627\u0631\u06cc \/ \u0645\u062c\u0645\u0648\u0639\u0647\" style=\"width:100%;padding:10px;margin:6px 0;border:1px solid #ccc;border-radius:8px\">\n        <input id=\"mt-fname\" type=\"text\" placeholder=\"\u0646\u0627\u0645\" style=\"width:100%;padding:10px;margin:6px 0;border:1px solid #ccc;border-radius:8px\">\n        <input id=\"mt-lname\" type=\"text\" placeholder=\"\u0646\u0627\u0645 \u062e\u0627\u0646\u0648\u0627\u062f\u06af\u06cc\" style=\"width:100%;padding:10px;margin:6px 0;border:1px solid #ccc;border-radius:8px\">\n        <input id=\"mt-pass\" type=\"password\" placeholder=\"\u0631\u0645\u0632 \u0639\u0628\u0648\u0631 (\u062d\u062f\u0627\u0642\u0644 \u06f6 \u062d\u0631\u0641)\" style=\"width:100%;padding:10px;margin:6px 0;border:1px solid #ccc;border-radius:8px\">\n        <button onclick=\"mtVerify()\" id=\"mt-verify-btn\" style=\"width:100%;padding:12px;background:#4caf50;color:#fff;border:none;border-radius:8px;cursor:pointer\">\u0633\u0627\u062e\u062a \u062d\u0633\u0627\u0628 \u0622\u0632\u0645\u0627\u06cc\u0634\u06cc<\/button>\n      <\/div>\n\n      <div id=\"mt-done\" style=\"display:none;text-align:center\">\n        <h3>\ud83c\udf89 \u062d\u0633\u0627\u0628 \u0634\u0645\u0627 \u0633\u0627\u062e\u062a\u0647 \u0634\u062f!<\/h3>\n        <p>\u0646\u0627\u0645 \u06a9\u0627\u0631\u0628\u0631\u06cc: <b id=\"mt-username\" style=\"direction:ltr\"><\/b><\/p>\n        <p>\u0645\u062f\u062a \u0622\u0632\u0645\u0627\u06cc\u0634\u06cc: \u06f1\u06f4 \u0631\u0648\u0632 \u2014 \u0647\u0645\u0647 \u0627\u0645\u06a9\u0627\u0646\u0627\u062a \u0641\u0639\u0627\u0644<\/p>\n        <a id=\"mt-panel-link\" href=\"#\" style=\"display:inline-block;padding:12px 24px;background:#4caf50;color:#fff;border-radius:8px;text-decoration:none\">\u0648\u0631\u0648\u062f \u0628\u0647 \u067e\u0646\u0644<\/a>\n        <p style=\"font-size:12px;color:#888;margin-top:8px\">\u0627\u067e\u0644\u06cc\u06a9\u06cc\u0634\u0646 \u0627\u0646\u062f\u0631\u0648\u06cc\u062f \u0631\u0627 \u0646\u06cc\u0632 \u0627\u0632 \u0633\u0627\u06cc\u062a \u062f\u0627\u0646\u0644\u0648\u062f \u06a9\u0646\u06cc\u062f \u0648 \u0628\u0627 \u0647\u0645\u06cc\u0646 \u0645\u0634\u062e\u0635\u0627\u062a \u0648\u0627\u0631\u062f \u0634\u0648\u06cc\u062f.<\/p>\n      <\/div>\n\n      <p id=\"mt-msg\" style=\"font-size:13px;margin-top:10px\"><\/p>\n    <\/div>\n\n    <script>\n    \/\/ \u067e\u0631\u0648\u06a9\u0633\u06cc same-origin \u2014 \u0628\u062f\u0648\u0646 \u0645\u0634\u06a9\u0644 mixed content\n    const MT_API = 'https:\/\/maham-iot.ir\/index.php?rest_route=\/maham\/v1\/signup';\n    function mtMsg(t, err) {\n      const el = document.getElementById('mt-msg');\n      el.textContent = t; el.style.color = err ? '#c62828' : '#2e7d32';\n    }\n    async function mtSendOtp() {\n      const phone = document.getElementById('mt-phone').value.trim();\n      const btn = document.getElementById('mt-send-btn');\n      btn.disabled = true; mtMsg('\u062f\u0631 \u062d\u0627\u0644 \u0627\u0631\u0633\u0627\u0644\u2026');\n      try {\n        const r = await fetch(MT_API + '\/request-otp', {\n          method: 'POST', headers: {'Content-Type': 'application\/json'},\n          body: JSON.stringify({phone})\n        });\n        const d = await r.json();\n        if (!r.ok) throw new Error(d.detail || '\u062e\u0637\u0627');\n        document.getElementById('mt-step1').style.display = 'none';\n        document.getElementById('mt-step2').style.display = 'block';\n        mtMsg(d.message || '\u06a9\u062f \u0627\u0631\u0633\u0627\u0644 \u0634\u062f');\n      } catch (e) { mtMsg(e.message, true); }\n      btn.disabled = false;\n    }\n    async function mtVerify() {\n      const btn = document.getElementById('mt-verify-btn');\n      btn.disabled = true; mtMsg('\u062f\u0631 \u062d\u0627\u0644 \u0633\u0627\u062e\u062a \u062d\u0633\u0627\u0628\u2026');\n      try {\n        const r = await fetch(MT_API + '\/verify', {\n          method: 'POST', headers: {'Content-Type': 'application\/json'},\n          body: JSON.stringify({\n            phone: document.getElementById('mt-phone').value.trim(),\n            code: document.getElementById('mt-code').value.trim(),\n            company_name: document.getElementById('mt-company').value.trim(),\n            first_name: document.getElementById('mt-fname').value.trim(),\n            last_name: document.getElementById('mt-lname').value.trim(),\n            password: document.getElementById('mt-pass').value,\n          })\n        });\n        const d = await r.json();\n        if (!r.ok) throw new Error(d.detail || '\u062e\u0637\u0627');\n        document.getElementById('mt-step2').style.display = 'none';\n        document.getElementById('mt-done').style.display = 'block';\n        document.getElementById('mt-username').textContent = d.username;\n        document.getElementById('mt-panel-link').href = d.panel_url;\n        mtMsg('');\n      } catch (e) { mtMsg(e.message, true); }\n      btn.disabled = false;\n    }\n    <\/script>\n    <\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":2,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-139","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/maham-iot.ir\/index.php?rest_route=\/wp\/v2\/pages\/139","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/maham-iot.ir\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/maham-iot.ir\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/maham-iot.ir\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/maham-iot.ir\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=139"}],"version-history":[{"count":2,"href":"https:\/\/maham-iot.ir\/index.php?rest_route=\/wp\/v2\/pages\/139\/revisions"}],"predecessor-version":[{"id":142,"href":"https:\/\/maham-iot.ir\/index.php?rest_route=\/wp\/v2\/pages\/139\/revisions\/142"}],"wp:attachment":[{"href":"https:\/\/maham-iot.ir\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=139"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}