作者 开飞机的舒克

绑定后不出现头像昵称的问题

... ... @@ -205,7 +205,10 @@ class Activity extends Api
->find();
$images = db('item_details')->where('item_id',$id)->value('images');
if (!empty($images)){
$data['images'] = cdnurl($images, true);
$image = explode(',',$images);
foreach ($image as $k){
$data['images'] = cdnurl($image, true);
}
}
$data['holdtime'] = date('Y-m-d',$data['holdtime']);
$data['details'] = strip_tags($data['details']);
... ...
... ... @@ -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
... ...
此 diff 太大无法显示。