|
@@ -271,7 +271,7 @@
|
|
|
if(!pwd){ loginError.textContent = '请输入密码'; loginError.style.display = ''; return; }
|
|
if(!pwd){ loginError.textContent = '请输入密码'; loginError.style.display = ''; return; }
|
|
|
loginConfirm.disabled = true; loginConfirm.textContent = '登录中…';
|
|
loginConfirm.disabled = true; loginConfirm.textContent = '登录中…';
|
|
|
apiPost('login', {password: pwd}).then(data => {
|
|
apiPost('login', {password: pwd}).then(data => {
|
|
|
- if(data.success){ hideLoginModal(); loadLinks(); }
|
|
|
|
|
|
|
+ if(data.success){ window.location.href = 'admin.php'; }
|
|
|
else { loginError.textContent = data.error || '密码错误'; loginError.style.display = ''; loginConfirm.disabled = false; loginConfirm.textContent = '登录'; }
|
|
else { loginError.textContent = data.error || '密码错误'; loginError.style.display = ''; loginConfirm.disabled = false; loginConfirm.textContent = '登录'; }
|
|
|
}).catch(e => {
|
|
}).catch(e => {
|
|
|
loginError.textContent = e.message; loginError.style.display = '';
|
|
loginError.textContent = e.message; loginError.style.display = '';
|