作者 sgj
1 个管道 的构建 失败 耗费 4 秒

后台信息完善

... ... @@ -46,5 +46,21 @@ class TeamModel extends Model
return $info;
}
public function joinTeamList($user_id){
$map['user_id']=$user_id;
$map['status']=1;
$team_array=db('team')->where($map)->column('team_id');
if (empty($team_array)){
return;
}
$team_id=implode(',',$team_array);
$map1['id']=['in',$team_id];
$info=$this->where($map1)->select();
foreach ($info as $k=>$v){
$info[$k]['pic']=cmf_get_image_url($v['pic']);
}
return $info;
}
}
\ No newline at end of file
... ...
... ... @@ -9,6 +9,7 @@
namespace api\index\controller;
use api\common\model\ActivityModel;
use api\common\model\ActivityNews;
use api\common\model\AddressModel;
use api\common\model\ClassModel;
... ... @@ -22,6 +23,7 @@ use api\common\model\TeamModel;
use api\common\model\UserPassModel;
use api\common\model\UserWorkLog;
use api\common\model\VolunteerModel;
use api\index\model\JoinModel;
use api\index\model\ManageModel;
use api\index\model\UserModel;
use cmf\controller\RestBaseController;
... ... @@ -880,7 +882,7 @@ class SecondController extends RestBaseController
*
*
*@header name:XX-Token require:1 default: desc:token
*
*@param name:good_id type:int require:1 other: desc:商品id
*
* @throws
*/
... ... @@ -897,12 +899,20 @@ class SecondController extends RestBaseController
*
*
*@header name:XX-Token require:1 default: desc:token
*
*@param name:user_id type:int require:1 other: desc:用户id
*
* @throws
*/
public function otherHome(){
$user_id=input('user_id');
$volunteer=new VolunteerModel();
$Join=new JoinModel();
$return['userInfo']=$volunteer->getUserInfo($user_id);
$Activity=new ActivityModel();
$return['userJoin']=$Join->getUserJoin($user_id);
$Team=new TeamModel();
$return['team']=$Team->joinTeamList($user_id);
$this->success('',$return);
}
... ...
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
</body>
</html>
\ No newline at end of file