跳出到 登录功能 重构
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user