shish 6 жил өмнө
parent
commit
2063436037

+ 1 - 3
app/business/controllers/AdController.php

@@ -10,9 +10,7 @@ class AdController extends BaseController
 {
 	//list,detail,create,update,delete
 	protected $service = '\biz\ad\services\AdService';
-	
-	//protected $notAllowActions = ['delete']; // 设置方法过滤
-	
+
 	//广告列表
 	public function actionList()
 	{

+ 1 - 11
app/business/controllers/BaseController.php

@@ -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)) {