完善微信粉丝和标签
This commit is contained in:
@@ -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()));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -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');
|
||||
|
Reference in New Issue
Block a user