修改原有框架中英文映射

This commit is contained in:
2026-03-17 18:09:10 +08:00
parent e7b8f4cae9
commit bdf50e61f5
81 changed files with 1956 additions and 735 deletions

View File

@@ -37,14 +37,14 @@ class SystemController extends BaseController
if ($adminInfo === null || !is_array($adminInfo) || !isset($adminInfo['id'])) {
$token = getCurrentInfo();
if (!is_array($token) || empty($token['id'])) {
return $this->fail('登录已过期或用户信息无效,请重新登录', 401);
return $this->fail('login expired or invalid, please login again', 401);
}
$adminInfo = UserInfoCache::getUserInfo($token['id']);
if (empty($adminInfo) || !isset($adminInfo['id'])) {
$adminInfo = UserInfoCache::setUserInfo($token['id']);
}
if (empty($adminInfo) || !isset($adminInfo['id'])) {
return $this->fail('登录已过期或用户信息无效,请重新登录', 401);
return $this->fail('login expired or invalid, please login again', 401);
}
$this->adminInfo = $adminInfo;
}
@@ -86,7 +86,7 @@ class SystemController extends BaseController
public function menu(): Response
{
if (!$this->ensureAdminInfo()) {
return $this->fail('登录已过期或用户信息无效,请重新登录', 401);
return $this->fail('login expired or invalid, please login again', 401);
}
$data = UserMenuCache::getUserMenu($this->adminInfo['id']);
return $this->success($data);
@@ -151,7 +151,7 @@ class SystemController extends BaseController
$config = Storage::getConfig('local');
$logic = new SystemAttachmentLogic();
$data = $logic->saveNetworkImage($url, $config);
return $this->success($data, '操作成功');
return $this->success($data, 'operation success');
}
/**
@@ -228,7 +228,7 @@ class SystemController extends BaseController
UserInfoCache::clearUserInfo($this->adminId);
UserAuthCache::clearUserAuth($this->adminId);
UserMenuCache::clearUserMenu($this->adminId);
return $this->success([], '清除缓存成功!');
return $this->success([], 'clear cache success');
}
/**