41 lines
869 B
PHP
41 lines
869 B
PHP
<?php
|
|
|
|
|
|
namespace app\store\controller\user;
|
|
|
|
|
|
use app\store\controller\BaseAdminController;
|
|
use app\store\lists\user\UserLists;
|
|
use app\admin\logic\user\UserLogic;
|
|
use app\admin\validate\user\UserValidate;
|
|
|
|
|
|
class UserController extends BaseAdminController
|
|
{
|
|
|
|
public function lists()
|
|
{
|
|
return $this->dataLists(new UserLists());
|
|
}
|
|
|
|
|
|
public function add()
|
|
{
|
|
$params = (new UserValidate())->post()->goCheck('storeAdd');
|
|
$result = UserLogic::StoreAdd($params);
|
|
if (UserLogic::hasError() ) {
|
|
return $this->fail(UserLogic::getError());
|
|
}
|
|
return $this->success('添加成功', [], 1, 1);
|
|
|
|
}
|
|
|
|
|
|
public function detail()
|
|
{
|
|
$params = (new UserValidate())->goCheck('detail');
|
|
$detail = UserLogic::detail($params['id']);
|
|
return $this->success('', $detail);
|
|
}
|
|
|
|
} |