...
|
...
|
@@ -378,6 +378,36 @@ class User extends Api |
|
|
}
|
|
|
|
|
|
/**
|
|
|
* @ApiWeigh (76)
|
|
|
* @ApiTitle (加入企业-查询企业)
|
|
|
* @ApiSummary (加入企业-查询企业)
|
|
|
* @ApiMethod (POST)
|
|
|
*
|
|
|
* @ApiParams (name="keyword", type="string", required=true, description="关键字")
|
|
|
*
|
|
|
* @ApiReturn({
|
|
|
"code": 1,
|
|
|
"msg": "成功",
|
|
|
"time": "1602310974",
|
|
|
"data": [{
|
|
|
"id": 7, //企业ID
|
|
|
"name": "测试公司" //企业名称
|
|
|
}]
|
|
|
})
|
|
|
*/
|
|
|
public function companyList()
|
|
|
{
|
|
|
$keyword = $this->request->param('keyword');
|
|
|
empty($keyword) && $this->error('请输入关键字');
|
|
|
$list = Company::where('status','1')
|
|
|
->where('name','like','%'.$keyword.'%')
|
|
|
->field('id,name')
|
|
|
->select();
|
|
|
count($list) <= 0 && $this->error('未查找到该企业');
|
|
|
$this->success('成功',$list);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* @ApiWeigh (75)
|
|
|
* @ApiTitle (加入企业)
|
|
|
* @ApiSummary (加入企业)
|
...
|
...
|
|