修改原有框架中英文映射

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

@@ -65,7 +65,7 @@ class SystemUserController extends BaseController
$data = is_array($model) ? $model : $model->toArray();
return $this->success($data);
} else {
return $this->fail('未查找到信息');
return $this->fail('not found');
}
}
@@ -81,9 +81,9 @@ class SystemUserController extends BaseController
$this->validate('save', $data);
$result = $this->logic->add($data);
if ($result) {
return $this->success('添加成功');
return $this->success('add success');
} else {
return $this->fail('添加失败');
return $this->fail('add failed');
}
}
@@ -99,9 +99,9 @@ class SystemUserController extends BaseController
$this->validate('update', $data);
$result = $this->logic->edit($data['id'], $data);
if ($result) {
return $this->success('修改成功');
return $this->success('update success');
} else {
return $this->fail('修改失败');
return $this->fail('update failed');
}
}
@@ -116,9 +116,9 @@ class SystemUserController extends BaseController
$ids = $request->input('ids', '');
if (!empty($ids)) {
$this->logic->destroy($ids);
return $this->success('操作成功');
return $this->success('operation success');
} else {
return $this->fail('参数错误,请检查');
return $this->fail('invalid parameters, please check');
}
}
@@ -134,7 +134,7 @@ class SystemUserController extends BaseController
UserInfoCache::clearUserInfo($id);
UserAuthCache::clearUserAuth($id);
UserMenuCache::clearUserMenu($id);
return $this->success('操作成功');
return $this->success('operation success');
}
/**
@@ -148,12 +148,12 @@ class SystemUserController extends BaseController
$id = $request->post('id', '');
$password = $request->post('password', '');
if ($id == 1) {
return $this->fail('超级管理员不允许重置密码');
return $this->fail('super admin cannot reset password');
}
$data = ['password' => password_hash($password, PASSWORD_DEFAULT)];
$this->logic->authEdit($id, $data);
UserInfoCache::clearUserInfo($id);
return $this->success('操作成功');
return $this->success('operation success');
}
/**
@@ -169,7 +169,7 @@ class SystemUserController extends BaseController
$data = ['dashboard' => $dashboard];
$this->logic->authEdit($id, $data);
UserInfoCache::clearUserInfo($id);
return $this->success('操作成功');
return $this->success('operation success');
}
/**
@@ -187,9 +187,9 @@ class SystemUserController extends BaseController
$result = $this->logic->updateInfo($this->adminId, $data);
if ($result) {
UserInfoCache::clearUserInfo($this->adminId);
return $this->success('操作成功');
return $this->success('operation success');
} else {
return $this->fail('操作失败');
return $this->fail('operation failed');
}
}
@@ -205,6 +205,6 @@ class SystemUserController extends BaseController
$newPassword = $request->input('newPassword');
$this->logic->modifyPassword($this->adminId, $oldPassword, $newPassword);
UserInfoCache::clearUserInfo($this->adminId);
return $this->success('修改成功');
return $this->success('update success');
}
}