|
@@ -57,6 +57,9 @@ class User extends Api
|
|
|
{
|
|
|
$data = $this->request->post();
|
|
|
|
|
|
+ $user = $this->geiUserInfo();
|
|
|
+ if ($user['level'] !=0 ) return $this->error('非业主不能提交');
|
|
|
+
|
|
|
if (!isset($data['name']) || empty($data['name'])) return $this->error('请输入姓名');
|
|
|
|
|
|
if (!isset($data['phone']) || empty($data['phone'])) return $this->error('请输入手机号');
|
|
@@ -99,6 +102,9 @@ class User extends Api
|
|
|
|
|
|
$user = $this->geiUserInfo();
|
|
|
|
|
|
+ if ($user['level'] !=0 ) return $this->error('非业主不能提交');
|
|
|
+
|
|
|
+
|
|
|
$data['uid'] = $user['id'];
|
|
|
|
|
|
$data['create_time'] = date('Y-m-d H:i',time());
|
|
@@ -172,6 +178,10 @@ class User extends Api
|
|
|
{
|
|
|
$data = $this->request->post();
|
|
|
|
|
|
+ $user = $this->geiUserInfo();
|
|
|
+
|
|
|
+ if ($user['level'] !=0 ) return $this->error('非业主不能提交');
|
|
|
+
|
|
|
if (!isset($data['name']) || empty($data['name'])) return $this->error('请输入姓名');
|
|
|
|
|
|
if (!isset($data['phone']) || empty($data['phone'])) return $this->error('请输入手机号');
|
|
@@ -184,7 +194,7 @@ class User extends Api
|
|
|
|
|
|
if(!preg_match("/^1[34578]\d{9}$/", $data['phone'])) return $this->error('手机号格式不正确');
|
|
|
|
|
|
- $user = $this->geiUserInfo();
|
|
|
+ // $user = $this->geiUserInfo();
|
|
|
|
|
|
$data['uid'] = $user['id'];
|
|
|
|