跳出到 登录功能 重构

This commit is contained in:
geyun
2026-10-15 10:07:42 +08:00
parent 988a0aee34
commit 8acce63d8f
3 changed files with 7 additions and 5 deletions

View File

@@ -460,7 +460,6 @@
<div class="form-panel" id="weixin-panel">
<div id="weixin_container"></div>
<p class="wechat-tip">请使用微信扫描二维码登录</p>
</div>
</div>
@@ -480,6 +479,8 @@
</div>
<div class="toast" id="toast"></div>
<script src="./wxLogin.js"></script>
<script>
const WECHAT_APPID = 'wx0eeb7556d60121db';
@@ -572,7 +573,7 @@
btn.disabled = true;
btn.innerText = '登陆中...';
fetch('http://1.95.137.212:8081/login', {
fetch('https://serviceri.satabot.com/login', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ username, password, sourceType: 1 })
@@ -587,7 +588,7 @@
if (data.userName) setCookie('nickname', data.userName, 7);
setTimeout(() => {
window.location.href = './index.html?userId=' + encodedUserId;
}, 500);
}, 100);
} else {
showToast((data && data.msg) || '账号或密码错误');
btn.disabled = false;