{"id":38425,"date":"2026-07-13T08:48:28","date_gmt":"2026-07-13T11:48:28","guid":{"rendered":"https:\/\/www.ubiqplay.com\/br\/?page_id=38425"},"modified":"2026-07-13T08:50:46","modified_gmt":"2026-07-13T11:50:46","slug":"registro-afiliados","status":"publish","type":"page","link":"https:\/\/www.ubiqplay.com\/br\/registro-afiliados\/","title":{"rendered":"Registro de Afiliados"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-page\" data-elementor-id=\"38425\" class=\"elementor elementor-38425\" data-elementor-post-type=\"page\">\n\t\t\t\t<div class=\"elementor-element elementor-element-75cbcf6 e-flex e-con-boxed e-con e-parent\" data-id=\"75cbcf6\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-4153238 elementor-widget elementor-widget-shortcode\" data-id=\"4153238\" data-element_type=\"widget\" data-e-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\">\n<style>\n\/* Importando Quantico e DM Sans *\/\n@import url('https:\/\/fonts.googleapis.com\/css2?family=Quantico:wght@400;700&family=DM+Sans:wght@400;500;700&display=swap');\n\n:root {\n    --uq-purple: #B118EF;\n    --uq-green: #56EF18;\n    --uq-input-bg: #ffffff;\n    --uq-white: #ffffff;\n    --font-header: 'Quantico', sans-serif;\n    --font-body: 'DM Sans', sans-serif;\n}\n\n.uq-page-wrap {\n    min-height: 70vh;\n    display: flex;\n    align-items: center;\n    justify-content: center;\n    padding: 40px 20px;\n    font-family: var(--font-body);\n    box-sizing: border-box;\n    background: transparent;\n}\n\n.uq-cards-wrapper {\n    display: flex;\n    gap: 25px;\n    width: 100%;\n    max-width: 950px;\n    align-items: stretch;\n    justify-content: center;\n}\n\n\/* \u2500\u2500 CARD BASE \u2500\u2500 *\/\n.uq-card {\n    background: var(--uq-purple);\n    border-radius: 40px;\n    padding: 45px 35px;\n    display: flex;\n    flex-direction: column;\n    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);\n    box-sizing: border-box;\n}\n\n\/* Card de Login (Esquerda) *\/\n.uq-card-login {\n    flex: 0.9; \n}\n\n\/* Card de Cadastro (Direita) *\/\n.uq-card-join {\n    flex: 0.85; \n}\n\n.uq-card h2 {\n    font-family: var(--font-header);\n    font-size: 22px;\n    font-weight: 700;\n    color: var(--uq-white);\n    margin: 0 0 30px 0;\n    text-align: center;\n    white-space: nowrap;\n    text-transform: uppercase;\n}\n\n\/* \u2500\u2500 INPUTS \u2500\u2500 *\/\n.uq-field {\n    position: relative;\n    margin-bottom: 15px;\n    display: flex;\n    align-items: center;\n}\n\n.uq-field .uq-icon-left {\n    position: absolute;\n    left: 18px;\n    color: #666;\n    display: flex;\n    align-items: center;\n    pointer-events: none;\n    z-index: 2;\n}\n\n.uq-field input {\n    width: 100%;\n    padding: 12px 45px 12px 50px;\n    background: var(--uq-input-bg);\n    border: none;\n    border-radius: 50px;\n    color: #333;\n    font-size: 14px;\n    outline: none;\n    box-sizing: border-box;\n    height: 48px;\n}\n\n\/* Mensagem de erro *\/\n.uq-error {\n    background: rgba(220, 53, 69, 0.9);\n    color: white;\n    padding: 10px 15px;\n    border-radius: 8px;\n    font-size: 13px;\n    margin-bottom: 15px;\n    text-align: center;\n    display: none;\n}\n\n.uq-error.show {\n    display: block;\n    animation: fadeIn 0.3s ease;\n}\n\n\/* Mensagem de sucesso *\/\n.uq-success {\n    background: rgba(40, 167, 69, 0.9);\n    color: white;\n    padding: 10px 15px;\n    border-radius: 8px;\n    font-size: 13px;\n    margin-bottom: 15px;\n    text-align: center;\n    display: none;\n}\n\n.uq-success.show {\n    display: block;\n    animation: fadeIn 0.3s ease;\n}\n\n\/* Loading *\/\n.uq-loading {\n    display: inline-block;\n    width: 16px;\n    height: 16px;\n    border: 2px solid #fff;\n    border-radius: 50%;\n    border-top-color: transparent;\n    animation: spin 0.6s linear infinite;\n    margin-right: 8px;\n}\n\n@keyframes spin {\n    to { transform: rotate(360deg); }\n}\n\n\/* Olhinho Centralizado *\/\n.uq-field .pw-toggle {\n    position: absolute;\n    right: 18px;\n    background: none;\n    border: none;\n    cursor: pointer;\n    color: #888;\n    display: flex;\n    align-items: center;\n    justify-content: center;\n    padding: 0;\n    height: 100%;\n    z-index: 2;\n}\n\n\/* \u2500\u2500 INFOS \u2500\u2500 *\/\n.uq-remember-row {\n    display: flex;\n    align-items: center;\n    justify-content: space-between;\n    margin: 5px 10px 20px 10px;\n}\n\n.uq-remember-row label {\n    display: flex;\n    align-items: center;\n    gap: 8px;\n    color: var(--uq-white);\n    font-size: 12px;\n    font-weight: 600;\n    cursor: pointer;\n}\n\n.uq-lost-pw {\n    color: var(--uq-white);\n    font-size: 12px;\n    text-decoration: none;\n    font-weight: 600;\n}\n\n.uq-lost-pw:hover {\n    color: var(--uq-white);\n}\n\n\/* \u2500\u2500 BOT\u00d5ES \u2500\u2500 *\/\n.uq-btn-green {\n    display: block;\n    width: fit-content;\n    min-width: 150px;\n    margin: 0 auto;\n    padding: 10px 20px;\n    background: var(--uq-green);\n    color: #000;\n    font-family: var(--font-header);\n    font-weight: 700;\n    font-size: 14px;\n    border: none;\n    border-radius: 50px;\n    cursor: pointer;\n    text-transform: uppercase;\n    transition: transform 0.2s ease;\n}\n\n.uq-btn-green:hover {\n    transform: scale(1.05);\n    background: var(--uq-green);\n}\n\n.uq-btn-green:disabled {\n    opacity: 0.6;\n    cursor: not-allowed;\n    transform: none;\n}\n\n.uq-hint {\n    color: var(--uq-white);\n    font-size: 13px;\n    text-align: left;\n    margin-bottom: 25px;\n    line-height: 1.4;\n    padding: 0 5px;\n}\n\n\/* Responsivo *\/\n@media (max-width: 992px) {\n    .uq-cards-wrapper { flex-direction: column; align-items: center; }\n    .uq-card { width: 100%; max-width: 420px; flex: none; }\n    .uq-card h2 { white-space: normal; }\n}\n\n@keyframes fadeIn {\n    from { opacity: 0; transform: translateY(-10px); }\n    to { opacity: 1; transform: translateY(0); }\n}\n<\/style>\n\n<div class=\"uq-page-wrap\">\n    <div class=\"uq-cards-wrapper\">\n\n        <!-- Card de Login -->\n        <div class=\"uq-card uq-card-login\">\n            <h2>J\u00e1 tem uma conta?<\/h2>\n            \n            <div id=\"login-error\" class=\"uq-error\"><\/div>\n            <div id=\"login-success\" class=\"uq-success\"><\/div>\n            \n            <form id=\"uq-login-form\" method=\"post\">\n                <div class=\"uq-field\">\n                    <span class=\"uq-icon-left\">\n                        <svg width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\"><path d=\"M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2\"><\/path><circle cx=\"12\" cy=\"7\" r=\"4\"><\/circle><\/svg>\n                    <\/span>\n                    <input type=\"email\" id=\"login-email\" name=\"log\" placeholder=\"*Email\" required>\n                <\/div>\n\n                <div class=\"uq-field\">\n                    <span class=\"uq-icon-left\">\n                        <svg width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\"><rect x=\"3\" y=\"11\" width=\"18\" height=\"11\" rx=\"2\" ry=\"2\"><\/rect><path d=\"M7 11V7a5 5 0 0 1 10 0v4\"><\/path><\/svg>\n                    <\/span>\n                    <input type=\"password\" name=\"pwd\" id=\"uq-pass-field\" placeholder=\"*Senha\" required>\n                    <button type=\"button\" class=\"pw-toggle\" onclick=\"uqTogglePw('uq-pass-field', this)\">\n                        <svg width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\"><path d=\"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z\"><\/path><circle cx=\"12\" cy=\"12\" r=\"3\"><\/circle><\/svg>\n                    <\/button>\n                <\/div>\n\n                <div class=\"uq-remember-row\">\n                    <label><input type=\"checkbox\" name=\"rememberme\" value=\"forever\" style=\"accent-color:var(--uq-green)\"> Lembrar<\/label>\n                    <a href=\"https:\/\/www.ubiqplay.com\/br\/ver-minha-conta\/lost-password\/\" class=\"uq-lost-pw\">Esqueci minha senha<\/a>\n                <\/div>\n                \n                <button type=\"submit\" class=\"uq-btn-green\" id=\"login-btn\">\n                    ACESSAR\n                <\/button>\n            <\/form>\n        <\/div>\n\n        <!-- Card de Cadastro -->\n        <div class=\"uq-card uq-card-join\">\n            <h2>Junte-se ao Creators Club<\/h2>\n            \n            <div id=\"register-error\" class=\"uq-error\"><\/div>\n            <div id=\"register-success\" class=\"uq-success\"><\/div>\n            \n            <div class=\"uq-field\">\n                <span class=\"uq-icon-left\">\n                    <svg width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\"><path d=\"M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z\"><\/path><polyline points=\"22,6 12,12 2,6\"><\/polyline><\/svg>\n                <\/span>\n                <input type=\"email\" id=\"reg-email\" placeholder=\"*Email\">\n            <\/div>\n            \n            <div id=\"email-status\" style=\"font-size: 12px; margin: -10px 0 15px 15px; color: rgba(255,255,255,0.7); display: none;\"><\/div>\n            \n            <p class=\"uq-hint\">Ap\u00f3s inserir seu e-mail e prosseguir, vamos pedir algumas informa\u00e7\u00f5es para te conhecermos melhor!<\/p>\n            \n            <button type=\"button\" class=\"uq-btn-green\" id=\"continue-btn\" onclick=\"validateAndProceed()\">\n                CONTINUAR\n            <\/button>\n        <\/div>\n\n    <\/div>\n<\/div>\n\n<script>\n\/\/ Fun\u00e7\u00e3o para toggle da senha\nfunction uqTogglePw(id, btn) {\n    const input = document.getElementById(id);\n    const isPassword = input.type === 'password';\n    input.type = isPassword ? 'text' : 'password';\n    \n    if (isPassword) {\n        btn.innerHTML = '<svg width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\"><path d=\"M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19\"><\/path><line x1=\"1\" y1=\"1\" x2=\"23\" y2=\"23\"><\/line><\/svg>';\n    } else {\n        btn.innerHTML = '<svg width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\"><path d=\"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z\"><\/path><circle cx=\"12\" cy=\"12\" r=\"3\"><\/circle><\/svg>';\n    }\n}\n\n\/\/ Valida\u00e7\u00e3o de email em tempo real\nconst emailInput = document.getElementById('reg-email');\nconst emailStatus = document.getElementById('email-status');\nlet emailTimeout;\n\nemailInput.addEventListener('input', function() {\n    clearTimeout(emailTimeout);\n    const email = this.value.trim();\n    \n    if (email.length === 0) {\n        emailStatus.style.display = 'none';\n        return;\n    }\n    \n    if (!isValidEmail(email)) {\n        emailStatus.style.display = 'block';\n        emailStatus.innerHTML = 'Email inv\u00e1lido';\n        emailStatus.style.color = '#ff9999';\n        return;\n    }\n    \n    \/\/ Verificar se email j\u00e1 existe\n    emailTimeout = setTimeout(function() {\n        checkEmailExists(email);\n    }, 500);\n});\n\nfunction isValidEmail(email) {\n    const re = \/^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$\/;\n    return re.test(email);\n}\n\nfunction checkEmailExists(email) {\n    emailStatus.style.display = 'block';\n    emailStatus.innerHTML = 'Verificando...';\n    emailStatus.style.color = 'rgba(255,255,255,0.7)';\n    \n    fetch('https:\/\/www.ubiqplay.com\/br\/wp-admin\/admin-ajax.php', {\n        method: 'POST',\n        headers: {\n            'Content-Type': 'application\/x-www-form-urlencoded',\n        },\n        body: 'action=ubiqplay_check_email_exists&email=' + encodeURIComponent(email) + '&nonce=47172ddba3'\n    })\n    .then(response => response.json())\n    .then(data => {\n        if (data.exists) {\n            if (data.is_affiliate) {\n                emailStatus.innerHTML = 'Voc\u00ea j\u00e1 \u00e9 afiliado! Fa\u00e7a login.';\n                emailStatus.style.color = '#56EF18';\n            } else {\n                emailStatus.innerHTML = 'Email j\u00e1 cadastrado - voc\u00ea pode usar esta conta para se afiliar!';\n                emailStatus.style.color = '#56EF18';\n            }\n        } else {\n            emailStatus.innerHTML = 'Email dispon\u00edvel para cadastro';\n            emailStatus.style.color = '#56EF18';\n        }\n    })\n    .catch(error => {\n        console.error('Erro:', error);\n        emailStatus.innerHTML = 'Erro ao verificar email';\n        emailStatus.style.color = '#ff9999';\n    });\n}\n\nfunction validateAndProceed() {\n    const email = emailInput.value.trim();\n    const errorDiv = document.getElementById('register-error');\n    const successDiv = document.getElementById('register-success');\n    const continueBtn = document.getElementById('continue-btn');\n    \n    \/\/ Limpar mensagens anteriores\n    errorDiv.classList.remove('show');\n    successDiv.classList.remove('show');\n    \n    \/\/ Validar email\n    if (!email) {\n        errorDiv.innerHTML = 'Por favor, digite seu email';\n        errorDiv.classList.add('show');\n        emailInput.focus();\n        return;\n    }\n    \n    if (!isValidEmail(email)) {\n        errorDiv.innerHTML = 'Por favor, digite um email v\u00e1lido';\n        errorDiv.classList.add('show');\n        emailInput.focus();\n        return;\n    }\n    \n    \/\/ Desabilitar bot\u00e3o e mostrar loading\n    continueBtn.disabled = true;\n    continueBtn.innerHTML = '<span class=\"uq-loading\"><\/span> VERIFICANDO...';\n    \n    \/\/ Verificar se email existe antes de prosseguir\n    fetch('https:\/\/www.ubiqplay.com\/br\/wp-admin\/admin-ajax.php', {\n        method: 'POST',\n        headers: {\n            'Content-Type': 'application\/x-www-form-urlencoded',\n        },\n        body: 'action=ubiqplay_check_email_exists&email=' + encodeURIComponent(email) + '&nonce=47172ddba3'\n    })\n    .then(response => response.json())\n    .then(data => {\n        if (data.exists && data.is_affiliate) {\n            \/\/ Usu\u00e1rio j\u00e1 \u00e9 afiliado, redirecionar para dashboard\n            successDiv.innerHTML = 'Voc\u00ea j\u00e1 \u00e9 afiliado! Redirecionando para o dashboard...';\n            successDiv.classList.add('show');\n            setTimeout(() => {\n                window.location.href = 'https:\/\/www.ubiqplay.com\/br\/dashboard\/';\n            }, 1500);\n        } else {\n            \/\/ Prosseguir para o cadastro\n            window.location.href = 'https:\/\/www.ubiqplay.com\/br\/afiliados-cadastro\/?reg_email=' + encodeURIComponent(email);\n        }\n    })\n    .catch(error => {\n        console.error('Erro:', error);\n        errorDiv.innerHTML = '\u274c Erro ao verificar email. Tente novamente.';\n        errorDiv.classList.add('show');\n        continueBtn.disabled = false;\n        continueBtn.innerHTML = 'CONTINUAR';\n    });\n}\n\n\/\/ Login via AJAX\ndocument.getElementById('uq-login-form').addEventListener('submit', function(e) {\n    e.preventDefault();\n    \n    const email = document.getElementById('login-email').value;\n    const password = document.getElementById('uq-pass-field').value;\n    const remember = document.querySelector('input[name=\"rememberme\"]').checked ? 'forever' : '';\n    const errorDiv = document.getElementById('login-error');\n    const successDiv = document.getElementById('login-success');\n    const loginBtn = document.getElementById('login-btn');\n    \n    \/\/ Limpar mensagens\n    errorDiv.classList.remove('show');\n    successDiv.classList.remove('show');\n    \n    \/\/ Validar campos\n    if (!email || !password) {\n        errorDiv.innerHTML = '\u274c Por favor, preencha email e senha';\n        errorDiv.classList.add('show');\n        return;\n    }\n    \n    \/\/ Desabilitar bot\u00e3o\n    loginBtn.disabled = true;\n    loginBtn.innerHTML = '<span class=\"uq-loading\"><\/span> ENTRANDO...';\n    \n    \/\/ Enviar requisi\u00e7\u00e3o de login\n    const formData = new FormData();\n    formData.append('log', email);\n    formData.append('pwd', password);\n    formData.append('rememberme', remember);\n    formData.append('action', 'ubiqplay_ajax_login');\n    formData.append('nonce', 'c537b04c06');\n    \n    fetch('https:\/\/www.ubiqplay.com\/br\/wp-admin\/admin-ajax.php', {\n        method: 'POST',\n        body: formData\n    })\n    .then(response => response.json())\n    .then(data => {\n        if (data.success) {\n            successDiv.innerHTML = 'Login realizado com sucesso! Redirecionando...';\n            successDiv.classList.add('show');\n            \n            setTimeout(() => {\n                window.location.href = 'https:\/\/www.ubiqplay.com\/br\/dashboard\/';\n            }, 1000);\n        } else {\n            errorDiv.innerHTML = data.message || 'Email ou senha incorretos';\n            errorDiv.classList.add('show');\n            loginBtn.disabled = false;\n            loginBtn.innerHTML = 'ACESSAR';\n        }\n    })\n    .catch(error => {\n        console.error('Erro:', error);\n        errorDiv.innerHTML = 'Erro ao fazer login. Tente novamente.';\n        errorDiv.classList.add('show');\n        loginBtn.disabled = false;\n        loginBtn.innerHTML = 'ACESSAR';\n    });\n});\n\n\/\/ Enter key para login\ndocument.getElementById('uq-pass-field').addEventListener('keypress', function(e) {\n    if (e.key === 'Enter') {\n        document.getElementById('uq-login-form').dispatchEvent(new Event('submit'));\n    }\n});\n\ndocument.getElementById('login-email').addEventListener('keypress', function(e) {\n    if (e.key === 'Enter') {\n        document.getElementById('uq-login-form').dispatchEvent(new Event('submit'));\n    }\n});\n\n\/\/ Enter key para cadastro\ndocument.getElementById('reg-email').addEventListener('keypress', function(e) {\n    if (e.key === 'Enter') {\n        validateAndProceed();\n    }\n});\n<\/script><\/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\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\n    <div class=\"xs_social_share_widget xs_share_url after_content \t\tmain_content  wslu-style-1 wslu-share-box-shaped wslu-fill-colored wslu-none wslu-share-horizontal wslu-theme-font-no wslu-main_content\">\n\n\t\t\n        <ul>\n\t\t\t        <\/ul>\n    <\/div> \n","protected":false},"excerpt":{"rendered":"","protected":false},"author":12,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-38425","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.ubiqplay.com\/br\/wp-json\/wp\/v2\/pages\/38425","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ubiqplay.com\/br\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.ubiqplay.com\/br\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.ubiqplay.com\/br\/wp-json\/wp\/v2\/users\/12"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ubiqplay.com\/br\/wp-json\/wp\/v2\/comments?post=38425"}],"version-history":[{"count":4,"href":"https:\/\/www.ubiqplay.com\/br\/wp-json\/wp\/v2\/pages\/38425\/revisions"}],"predecessor-version":[{"id":38429,"href":"https:\/\/www.ubiqplay.com\/br\/wp-json\/wp\/v2\/pages\/38425\/revisions\/38429"}],"wp:attachment":[{"href":"https:\/\/www.ubiqplay.com\/br\/wp-json\/wp\/v2\/media?parent=38425"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}