|
|
@@ -21,12 +21,6 @@ class BaseController extends PublicController
|
|
|
public $withoutLogin = [];//不需要登陆的方法名
|
|
|
public $validate = true;
|
|
|
|
|
|
- // Service 模型实例
|
|
|
- protected $service;
|
|
|
- // 设置允许与不允许方法 shizq 2019-12-05
|
|
|
- protected $allowActions = [];
|
|
|
- protected $notAllowActions = [];
|
|
|
-
|
|
|
public function beforeAction($action)
|
|
|
{
|
|
|
//token验证
|
|
|
@@ -34,10 +28,6 @@ class BaseController extends PublicController
|
|
|
if (empty($adminId)) {
|
|
|
$this->validate = false;
|
|
|
}
|
|
|
- //方法开放设置 shizq 2019-12-05
|
|
|
- if (in_array($action->id, $this->notAllowActions)) {
|
|
|
- util::fail($action->id . ' not allow');
|
|
|
- }
|
|
|
|
|
|
//游客可以访问的方法
|
|
|
if (in_array($action->id, $this->withoutLogin)) {
|
|
|
@@ -50,7 +40,7 @@ class BaseController extends PublicController
|
|
|
//授权方式获取客户信息 xhAdmin userId存的是每个公众号店长的微信userId
|
|
|
$admin = AdminService::getByCondition(['userId' => $adminId]);
|
|
|
if (empty($admin)) {
|
|
|
- util::fail('没有找到管理员' . $adminId);
|
|
|
+ util::fail('没有找到管理员,但已经获取客户ID:' . $adminId);
|
|
|
}
|
|
|
$merchantId = $admin['merchantId'];
|
|
|
if (empty($merchantId)) {
|