|
|
@@ -78,10 +78,13 @@ class UserController extends BaseController
|
|
|
public function actionAdd()
|
|
|
{
|
|
|
$post = Yii::$app->request->post();
|
|
|
+ if (isset($post['mobile']) == false || stringUtil::isMobile($post['mobile'])) {
|
|
|
+ util::fail('请输入手机号');
|
|
|
+ }
|
|
|
if ($post['mobile'] != $post['confirmMobile']) {
|
|
|
util::fail('二次输入手机号不一样');
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
$confirmPassword = isset($post['confirmPassword']) ? $post['confirmPassword'] : '';
|
|
|
AdminService::verifyConfirmPassword($this->adminId, $confirmPassword);
|
|
|
|
|
|
@@ -90,11 +93,11 @@ class UserController extends BaseController
|
|
|
if (!empty($user)) {
|
|
|
util::fail('手机号已使用,客户已存在');
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
$post['merchantId'] = $this->merchantId;
|
|
|
$post['member'] = $post['memberLevel'];
|
|
|
UserService::addUser($post);
|
|
|
-
|
|
|
+
|
|
|
util::ok();
|
|
|
}
|
|
|
|