feat(shopro): 添加俱乐部、球馆的访客记录功能

- 在 Club 控制器中添加访客记录逻辑
- 在 Gym 控制器中添加访客记录逻辑
- 在 Sys 控制器中添加获取访客记录的功能
This commit is contained in:
2025-06-05 14:55:16 +08:00
parent 582c52e3a1
commit 9223c1b127
11 changed files with 431 additions and 0 deletions

View File

@@ -2,6 +2,7 @@
namespace addons\shopro\controller\zy;
use app\admin\model\zy\link\Visitor;
use think\Db;
use think\Exception;
use app\admin\model\zy\Tags;
@@ -110,4 +111,11 @@ class Sys extends Base
}
$this->success('Success');
}
public function visitor()
{
$params = $this->request->param();
$res = Visitor::where('type', $params['type'])->where('obj_id', $params['obj_id'])->paginate($params['pageSize'] ?? 10);
$this->success('Success', ['list' => $res->items(), 'count' => $res->total()]);
}
}