...
|
...
|
@@ -395,6 +395,7 @@ class Index extends Api |
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
$v['url'] = request()->domain().'/index/index/filedetail/user_id/'.$v['user_id'].'/file_id/'.$v['id'];
|
|
|
$list = $tree->getChildrenIds($v['id'],true);
|
|
|
$is_have = Db::name('rotor')
|
...
|
...
|
@@ -577,7 +578,7 @@ class Index extends Api |
|
|
|
|
|
|
|
|
|
|
|
$Info['foleder'] = $data;
|
|
|
$Info['foleder'] = $arrs;
|
|
|
$Info['note'] = $this->sundry($arr);
|
|
|
$Info['pic'] = $this->sundry($arr_pic);
|
|
|
$Info['video'] = $this->sundry($arr_video);
|
...
|
...
|
@@ -708,6 +709,7 @@ class Index extends Api |
|
|
*
|
|
|
* @ApiHeaders (name=token, type=string, required=true, description="请求的Token")
|
|
|
* @ApiParams (name="folder_id", type="inter", required=true, description="文件夹id")
|
|
|
* @ApiParams (name="user_id", type="inter", required=false, description="用户id")
|
|
|
*
|
|
|
* @ApiReturn({
|
|
|
"code": 1,
|
...
|
...
|
@@ -813,8 +815,10 @@ class Index extends Api |
|
|
*/
|
|
|
public function filedetail()
|
|
|
{
|
|
|
$qiniu = get_addon_config('qiniu')['cdnurl'];
|
|
|
$user_id = $this->auth->id;
|
|
|
$folder_id = $this->request->param('folder_id');
|
|
|
$other_user_id = $this->request->param('user_id');
|
|
|
if(empty($folder_id)){
|
|
|
$this->error('缺少必要参数');
|
|
|
}
|
...
|
...
|
@@ -1055,6 +1059,16 @@ class Index extends Api |
|
|
$gong2 = $this->gong(3,$video,$zhuan_video);
|
|
|
$data['video'] = $this->sundry($gong2);
|
|
|
|
|
|
if(!empty($other_user_id)){
|
|
|
$res_userinfo = Db::name('user')->where('id',$other_user_id)->field('username,avatar')->find();
|
|
|
$data['username'] = $res_userinfo['username'];
|
|
|
if(!empty($res_userinfo['avatar'])){
|
|
|
$data['avatar'] = $qiniu.$res_userinfo['avatar'];
|
|
|
}else{
|
|
|
$data['avatar'] = '';
|
|
|
}
|
|
|
}
|
|
|
|
|
|
$this->success('success',$data);
|
|
|
}
|
|
|
|
...
|
...
|
|