|
|
@@ -231,12 +231,10 @@ class ShopAdminController extends BaseController
|
|
|
public function actionDelete()
|
|
|
{
|
|
|
$id = Yii::$app->request->get('id');
|
|
|
-
|
|
|
- $shopAdmin = $this->shopAdmin->attributes;
|
|
|
- if ($shopAdmin['super'] != 1) {
|
|
|
- util::fail('超管才能操作');
|
|
|
+ $shopAdmin = $this->shopAdmin;
|
|
|
+ if (isset($shopAdmin->super) == false || $shopAdmin->super != 1) {
|
|
|
+ util::fail('没有权限');
|
|
|
}
|
|
|
-
|
|
|
$relation = ShopAdminClass::getById($id, true);
|
|
|
\biz\shop\classes\ShopAdminClass::deleteShopAdmin($relation, $this->shopAdminId, $this->shopId);
|
|
|
util::complete();
|