完善微信粉丝和标签

This commit is contained in:
JaguarJack
2020-06-22 07:55:16 +08:00
parent 317a9ef595
commit a3dd8282b3
7 changed files with 120 additions and 9 deletions

View File

@@ -24,17 +24,25 @@ class Tags extends CatchController
{
$this->repository = $repository;
}
/**
* 列表
*
* @time 2020/06/21 14:45
*
*
* @param Request $request
* @return \think\Response
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\db\exception\DataNotFoundException
*/
public function index()
public function index(Request $request)
{
return CatchResponse::paginate($this->repository->getList());
if ($request->has('all')) {
return CatchResponse::success($this->repository->getList($request->param()));
}
return CatchResponse::paginate($this->repository->getList($request->param()));
}
/**

View File

@@ -13,8 +13,10 @@ namespace catchAdmin\wechat\controller;
use catchAdmin\wechat\repository\WechatUsersRepository;
use catcher\base\CatchController;
use catcher\CatchResponse;
use catcher\library\WeChat;
use catcher\Utils;
use think\facade\Console;
use think\Request;
class Users extends CatchController
{
@@ -61,6 +63,11 @@ class Users extends CatchController
return CatchResponse::success($this->user->block($id));
}
public function tag($id, Request $request)
{
return CatchResponse::success($this->user->tag($id, $request->post()));
}
public function sync()
{
Console::call('sync:users');