shop-php/app/controller/middle/UserLabel.php
2024-01-26 09:39:36 +08:00

38 lines
840 B
PHP
Executable File

<?php
namespace app\controller\middle;
use crmeb\basic\BaseController;
use think\App;
use app\common\repositories\user\UserLabelRepository;
/**
* Class Auth
* @package app\controller\api
* @author xaboy
* @day 2020-05-06
*/
class UserLabel extends BaseController
{
protected $repository;
public function __construct(App $app, UserLabelRepository $repository)
{
parent::__construct($app);
$this->repository = $repository;
}
public function lst()
{
$page = 1;
$limit = 9999;
$where = $this->request->params(['type', 'all']);
$where['mer_id'] = $this->request->merId();
$data = $this->repository->getList($where, $page, $limit);
$data['lists'] = $data['list'];
unset($data['list']);
return app('json')->success($data);
}
}