|
|
@@ -11,24 +11,24 @@ use yii\web\Controller;
|
|
|
|
|
|
class AdminShopController extends BaseController
|
|
|
{
|
|
|
-
|
|
|
- //创建管理员数据准备 shish 2020.4.17
|
|
|
- public function actionPrepareBind()
|
|
|
- {
|
|
|
- $post = Yii::$app->request->post();
|
|
|
- $roleId = isset($post['roleId']) ? $post['roleId'] : 0;
|
|
|
- $role = AdminRoleService::getById($roleId);
|
|
|
- if (empty($role) || isset($role['merchantId']) != $this->merchantId) {
|
|
|
- util::fail('请选择角色!');
|
|
|
- }
|
|
|
- unset($post['userId']);
|
|
|
- unset($post['status']);
|
|
|
- $post['shopId'] = $this->shopId;
|
|
|
- $post['adminId'] = $this->adminId;
|
|
|
- $post['merchant'] = $this->merchant;
|
|
|
- $respond = AdminShopService::prepareBindAdmin($post);
|
|
|
- $miniCode = isset($respond['miniCode']) ? $respond['miniCode'] : '';
|
|
|
- util::success(['miniCode' => $miniCode]);
|
|
|
- }
|
|
|
+
|
|
|
+ //创建管理员数据准备 shish 2020.4.17
|
|
|
+ public function actionPrepareBind()
|
|
|
+ {
|
|
|
+ $post = Yii::$app->request->post();
|
|
|
+ $roleId = isset($post['roleId']) ? $post['roleId'] : 0;
|
|
|
+ $role = AdminRoleService::getById($roleId);
|
|
|
+ if (empty($role) || isset($role['merchantId']) != $this->merchantId) {
|
|
|
+ util::fail('请选择角色!');
|
|
|
+ }
|
|
|
+ unset($post['userId']);
|
|
|
+ unset($post['status']);
|
|
|
+ $post['shopId'] = $this->shopId;
|
|
|
+ $post['adminId'] = $this->adminId;
|
|
|
+ $post['merchant'] = $this->merchant;
|
|
|
+ $respond = AdminShopService::prepareBindAdmin($post);
|
|
|
+ $miniCode = isset($respond['miniCode']) ? Yii::$app->params['imgHost'] . $respond['miniCode'] : '';
|
|
|
+ util::success(['miniCode' => $miniCode]);
|
|
|
+ }
|
|
|
|
|
|
}
|