|
|
@@ -98,6 +98,11 @@ class CpController extends BaseController
|
|
|
|
|
|
public function actionRecoverCp()
|
|
|
{
|
|
|
+ $masterShop = $this->shop;
|
|
|
+ if (isset($masterShop->default) == false || $masterShop->default == 0) {
|
|
|
+ util::fail('请在总店操作');
|
|
|
+ }
|
|
|
+
|
|
|
$get = Yii::$app->request->get();
|
|
|
$id = $get['id'] ?? 0;
|
|
|
$cp = CpClass::getById($id, true);
|
|
|
@@ -119,6 +124,11 @@ class CpController extends BaseController
|
|
|
|
|
|
public function actionDelCp()
|
|
|
{
|
|
|
+ $masterShop = $this->shop;
|
|
|
+ if (isset($masterShop->default) == false || $masterShop->default == 0) {
|
|
|
+ util::fail('请在总店操作');
|
|
|
+ }
|
|
|
+
|
|
|
$get = Yii::$app->request->get();
|
|
|
$id = $get['id'] ?? 0;
|
|
|
$cp = CpClass::getById($id, true);
|