feat(zy): 添加俱乐部功能和用户消息功能

- 新增俱乐部相关接口和功能,包括创建俱乐部、申请加入俱乐部、邀请加入俱乐部等
- 添加用户消息功能,包括发送消息、查看消息等
- 优化了部分代码结构,提高了可维护性
- 更新了文档,添加了新的接口说明
This commit is contained in:
2025-05-04 11:11:44 +08:00
parent 207e6b8a5d
commit 98eda4e5ff
23 changed files with 544 additions and 126 deletions

View File

@@ -10,7 +10,18 @@ use think\exception\ValidateException;
class Base extends Common
{
protected $noNeedLogin = [];
protected $noNeedRight = ['*'];
protected $model;
protected $user;
public function _initialize()
{
parent::_initialize();
$this->user = auth_user();
}
public function index()
{
@@ -21,7 +32,7 @@ class Base extends Common
$res = $this->model->select();
$this->success('获取成功', $res);
$this->success('Success', $res);
}
public function add()
@@ -39,7 +50,7 @@ class Base extends Common
if ($result === false) {
$this->error(__('No rows were inserted'));
}
$this->success();
$this->success('Success');
}
public function update()
@@ -61,7 +72,7 @@ class Base extends Common
if ($result === false) {
$this->error(__('No rows were inserted'));
}
$this->success();
$this->success('Success');
}
public function view()
@@ -70,6 +81,6 @@ class Base extends Common
if (empty($model)) {
$this->error(__('No rows were found'));
}
$this->success($model);
$this->success('Success', $model);
}
}