...
|
...
|
@@ -234,6 +234,18 @@ class Bind extends Api |
|
|
}
|
|
|
|
|
|
/**
|
|
|
* @ApiTitle (绑定后获取头像昵称)
|
|
|
*/
|
|
|
public function study(){
|
|
|
$user = $this->auth->getUserinfo();
|
|
|
$sid = \db('study')->where('user_id', $user['id'])->value('id');
|
|
|
//获取学生的信息
|
|
|
$data = \db('study')->where('id', $sid)->field('avatar,name,earn_score')->find();
|
|
|
$data['avatar'] = cdnurl( $data['avatar'], true);
|
|
|
$this->success('',$data);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* @ApiTitle (获取学生信息)
|
|
|
* @ApiMethod (POST)
|
|
|
* @ApiParams (name="cid", type="string", required=true, description="校区id")
|
...
|
...
|
@@ -264,9 +276,6 @@ class Bind extends Api |
|
|
$user = $this->auth->getUserinfo();
|
|
|
$cid = $this->request->param('cid');
|
|
|
$sid = \db('study')->where('user_id', $user['id'])->value('id');
|
|
|
//获取学生的信息
|
|
|
$data = \db('study')->where('id', $sid)->field('avatar,name,earn_score')->find();
|
|
|
$data['avatar'] = cdnurl( $data['avatar'], true);
|
|
|
//获取雷达维度
|
|
|
$data['item'] = \db('study_score_log')
|
|
|
->distinct('item_id')
|
...
|
...
|
@@ -282,7 +291,7 @@ class Bind extends Api |
|
|
->value('r.title');
|
|
|
return $item;
|
|
|
});
|
|
|
$this->success('获取学生信息成功', $data);
|
|
|
$this->success('获取成功', $data);
|
|
|
}
|
|
|
|
|
|
} |
|
|
\ No newline at end of file |
...
|
...
|
|