Commit 170bdf1a authored by 孙磊's avatar 孙磊

门店服务类目、配送方式修改

Signed-off-by: 孙磊's avatarsunlei <sunlei@romens.cn>
parent 99fdac0d
...@@ -296,7 +296,10 @@ class BranchController extends BaseController ...@@ -296,7 +296,10 @@ class BranchController extends BaseController
if (!$info) { if (!$info) {
throw new BadRequestHttpException('未找到符合的门店服务类目信息'); throw new BadRequestHttpException('未找到符合的门店服务类目信息');
} }
return $info; return new ActiveDataProvider([
'models' => $info,
'pagination' => false
]);
} }
/** /**
* @OA\Get( * @OA\Get(
...@@ -318,7 +321,10 @@ class BranchController extends BaseController ...@@ -318,7 +321,10 @@ class BranchController extends BaseController
if (!$info) { if (!$info) {
throw new BadRequestHttpException('未找到符合的门店门店配送方式'); throw new BadRequestHttpException('未找到符合的门店门店配送方式');
} }
return $info; return new ActiveDataProvider([
'models' => $info,
'pagination' => false
]);
} }
/** /**
* @OA\Get( * @OA\Get(
...@@ -340,7 +346,10 @@ class BranchController extends BaseController ...@@ -340,7 +346,10 @@ class BranchController extends BaseController
if (!$info) { if (!$info) {
throw new BadRequestHttpException('未找到符合的分公司信息'); throw new BadRequestHttpException('未找到符合的分公司信息');
} }
return $info; return new ActiveDataProvider([
'models' => $info,
'pagination' => false
]);
} }
/** /**
* @OA\Get( * @OA\Get(
...@@ -374,7 +383,10 @@ class BranchController extends BaseController ...@@ -374,7 +383,10 @@ class BranchController extends BaseController
throw new BadRequestHttpException('未找到符合的门店区域信息'); throw new BadRequestHttpException('未找到符合的门店区域信息');
} }
$info[0]['ROLE_ID'] = $authRole; $info[0]['ROLE_ID'] = $authRole;
return $info; return new ActiveDataProvider([
'models' => $info,
'pagination' => false
]);
} else { } else {
//验证失败:$errors 是一个包含错误信息的数组 //验证失败:$errors 是一个包含错误信息的数组
Yii::$app->response->statusCode = 422; Yii::$app->response->statusCode = 422;
...@@ -413,7 +425,10 @@ class BranchController extends BaseController ...@@ -413,7 +425,10 @@ class BranchController extends BaseController
throw new BadRequestHttpException('未找到符合的门店区域信息'); throw new BadRequestHttpException('未找到符合的门店区域信息');
} }
$info[0]['ROLE_ID'] = $authRole; $info[0]['ROLE_ID'] = $authRole;
return $info; return new ActiveDataProvider([
'models' => $info,
'pagination' => false
]);
} else { } else {
//验证失败:$errors 是一个包含错误信息的数组 //验证失败:$errors 是一个包含错误信息的数组
Yii::$app->response->statusCode = 422; Yii::$app->response->statusCode = 422;
......
...@@ -359,9 +359,7 @@ class ShopBranch extends BaseModel ...@@ -359,9 +359,7 @@ class ShopBranch extends BaseModel
return new ActiveDataProvider([ return new ActiveDataProvider([
'query' => $query->asArray(), 'query' => $query->asArray(),
'pagination' => [ 'pagination' => false
'pageSize' => PAGE_SIZE
],
]); ]);
} }
//获取门店(权限下的) //获取门店(权限下的)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment