feat(hotspot): login page redireciona para o portal INCTG e login por voucher no portal
build-image / build-push (push) Successful in 8m51s
build-image / build-push (push) Successful in 8m51s
This commit is contained in:
1 parent
a8c513dc2c
commit
8fab1e2ab6
3 files changed
+87
-11
No files matched your search
@@ -484,6 +484,21 @@
|
||||
<div class="skel"></div><div class="skel"></div><div class="skel"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card" style="margin-top:14px">
|
||||
<button class="btn btn-ghost" id="showLogin" type="button">Já tenho usuário e senha</button>
|
||||
<div id="loginBox" class="hidden" style="margin-top:14px">
|
||||
<label class="field">
|
||||
<span>Usuário</span>
|
||||
<input id="hsUser" type="text" autocomplete="username" autocapitalize="off" placeholder="Ex.: GAB12CD">
|
||||
</label>
|
||||
<label class="field">
|
||||
<span>Senha</span>
|
||||
<input id="hsPass" type="password" autocomplete="current-password" placeholder="Sua senha">
|
||||
</label>
|
||||
<button class="btn btn-primary" id="hsConnect" type="button">Conectar ao Wi-Fi</button>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<!-- ===== DADOS DO PAGADOR ===== -->
|
||||
@@ -562,13 +577,13 @@
|
||||
</div>
|
||||
|
||||
<ol class="steps">
|
||||
<li>Volte às configurações de Wi-Fi do celular</li>
|
||||
<li>Conecte em <strong>Convidados-Pix</strong> (se ainda não estiver)</li>
|
||||
<li>Abra qualquer site para exibir o login</li>
|
||||
<li>Digite o usuário e a senha acima</li>
|
||||
<li>Toque no botão <strong>Conectar agora</strong> abaixo</li>
|
||||
<li>Se pedir, conecte em <strong>Convidados-Pix</strong></li>
|
||||
<li>Pronto: seu acesso já estará liberado</li>
|
||||
</ol>
|
||||
|
||||
<button class="btn btn-success" id="copyVoucher" type="button" style="margin-top:14px">Copiar usuário e senha</button>
|
||||
<button class="btn btn-success" id="hsAutoLogin" type="button" style="margin-top:14px">Conectar agora</button>
|
||||
<button class="btn btn-ghost" id="copyVoucher" type="button" style="margin-top:10px">Copiar usuário e senha</button>
|
||||
<a class="back" href="#" id="backBtn2">← Voltar aos planos</a>
|
||||
</section>
|
||||
|
||||
@@ -755,6 +770,28 @@
|
||||
$('payerNext').addEventListener('click', () => checkout(selectedPlanId));
|
||||
$('payerCpf').addEventListener('input', (e) => { e.target.value = maskCpf(e.target.value); });
|
||||
|
||||
// ===== Login no hotspot (voucher) =====
|
||||
const HS_LOGIN = 'http://10.10.10.1/login';
|
||||
|
||||
function hsUrl(user, pass) {
|
||||
return HS_LOGIN + '?username=' + encodeURIComponent(user) + '&password=' + encodeURIComponent(pass);
|
||||
}
|
||||
|
||||
$('showLogin').addEventListener('click', () => {
|
||||
$('loginBox').classList.toggle('hidden');
|
||||
});
|
||||
|
||||
$('hsConnect').addEventListener('click', () => {
|
||||
const u = $('hsUser').value.trim();
|
||||
const p = $('hsPass').value;
|
||||
if (!u || !p) { toast('Informe usuário e senha'); return; }
|
||||
window.location.href = hsUrl(u, p);
|
||||
});
|
||||
|
||||
$('hsAutoLogin').addEventListener('click', () => {
|
||||
window.location.href = hsUrl($('vUser').textContent, $('vPass').textContent);
|
||||
});
|
||||
|
||||
loadPlans();
|
||||
</script>
|
||||
</body>
|
||||
|
||||
Reference in new issue
Block a user