...
|
...
|
@@ -481,8 +481,8 @@ class House extends Api |
|
|
*/
|
|
|
public function joinhouse()
|
|
|
{
|
|
|
$param['user_id'] = $this->auth->id;
|
|
|
$param = $this->request->param();
|
|
|
$param['user_id'] = $this->auth->id;
|
|
|
$validate = new Validate([
|
|
|
'house_id' => 'require',
|
|
|
'name' => 'require',
|
...
|
...
|
@@ -491,6 +491,8 @@ class House extends Api |
|
|
if (!$validate->check($param)) {
|
|
|
$this->error($validate->getError());
|
|
|
}
|
|
|
$param['createtime'] = time();
|
|
|
$param['updatetime'] = time();
|
|
|
$data = Db::name('user_house')->insertGetId($param);
|
|
|
if(empty($data)){
|
|
|
$this->error('申请失败');
|
...
|
...
|
|