* Optimize bound jumps.

This commit is contained in:
zhangjialiang
2025-06-26 18:02:25 +08:00
parent 5be5df2c06
commit 41f1d65ca8
2 changed files with 11 additions and 2 deletions
+4 -2
View File
@@ -547,11 +547,13 @@ class admin extends control
$this->config->admin->register->bindCommunityMobile = $data->mobile;
$agreeUX = $data->agreeUX;
$agreeUX = $agreeUX == 1 ? 'true' : 'false';
$agreeUX = $agreeUX == 'on' ? 'true' : 'false';
$this->loadModel('setting')->setItem('system.admin.register.agreeUX', $agreeUX);
$this->config->admin->agreeUX = $agreeUX;
return $this->send(array('result' => 'success', 'message' => $this->lang->admin->community->joinSuccess, 'callback' => 'loadToRegister()'));
$callBack = $this->loadModel('user')->isLogon() ? 'loadToRegister()' : 'loadToIndex()';
return $this->send(array('result' => 'success', 'message' => $this->lang->admin->community->joinSuccess, 'callback' => $callBack));
}
return $this->send(array('result' => 'fail', 'message' => isset($response['message']) ? $response['message'] : $this->lang->admin->community->loginFailed));
}
+7
View File
@@ -84,4 +84,11 @@ window.loadToRegister = function()
setTimeout(function() {
location.href = $.createLink('admin', 'register');
}, 2000);
}
window.loadToIndex = function()
{
setTimeout(function() {
location.href = $.createLink('index', 'index');
}, 2000);
}