|
|
@@ -3,6 +3,7 @@
|
|
|
namespace ghs\controllers;
|
|
|
|
|
|
use bizGhs\cp\classes\CpClass;
|
|
|
+use common\components\stringUtil;
|
|
|
use common\components\util;
|
|
|
use Yii;
|
|
|
|
|
|
@@ -31,6 +32,12 @@ class CpController extends BaseController
|
|
|
$post = Yii::$app->request->post();
|
|
|
$post['mainId'] = $this->mainId;
|
|
|
$post['adminId'] = $this->adminId;
|
|
|
+
|
|
|
+ if (isset($post['name']) == false || empty($post['name'])) {
|
|
|
+ util::fail('请填写名称')
|
|
|
+ }
|
|
|
+ $post['py'] = stringUtil::py($post['name']);
|
|
|
+
|
|
|
$staff = $this->shopAdmin;
|
|
|
$staffName = $staff->name ?? '';
|
|
|
$post['staffName'] = $staffName;
|