|
@@ -394,7 +394,8 @@ class Index extends Api |
|
@@ -394,7 +394,8 @@ class Index extends Api |
394
|
}
|
394
|
}
|
395
|
}
|
395
|
}
|
396
|
}
|
396
|
}
|
397
|
-
|
397
|
+
|
|
|
398
|
+
|
398
|
$v['url'] = request()->domain().'/index/index/filedetail/user_id/'.$v['user_id'].'/file_id/'.$v['id'];
|
399
|
$v['url'] = request()->domain().'/index/index/filedetail/user_id/'.$v['user_id'].'/file_id/'.$v['id'];
|
399
|
$list = $tree->getChildrenIds($v['id'],true);
|
400
|
$list = $tree->getChildrenIds($v['id'],true);
|
400
|
$is_have = Db::name('rotor')
|
401
|
$is_have = Db::name('rotor')
|
|
@@ -577,7 +578,7 @@ class Index extends Api |
|
@@ -577,7 +578,7 @@ class Index extends Api |
577
|
|
578
|
|
578
|
|
579
|
|
579
|
|
580
|
|
580
|
- $Info['foleder'] = $data;
|
581
|
+ $Info['foleder'] = $arrs;
|
581
|
$Info['note'] = $this->sundry($arr);
|
582
|
$Info['note'] = $this->sundry($arr);
|
582
|
$Info['pic'] = $this->sundry($arr_pic);
|
583
|
$Info['pic'] = $this->sundry($arr_pic);
|
583
|
$Info['video'] = $this->sundry($arr_video);
|
584
|
$Info['video'] = $this->sundry($arr_video);
|
|
@@ -708,6 +709,7 @@ class Index extends Api |
|
@@ -708,6 +709,7 @@ class Index extends Api |
708
|
*
|
709
|
*
|
709
|
* @ApiHeaders (name=token, type=string, required=true, description="请求的Token")
|
710
|
* @ApiHeaders (name=token, type=string, required=true, description="请求的Token")
|
710
|
* @ApiParams (name="folder_id", type="inter", required=true, description="文件夹id")
|
711
|
* @ApiParams (name="folder_id", type="inter", required=true, description="文件夹id")
|
|
|
712
|
+ * @ApiParams (name="user_id", type="inter", required=false, description="用户id")
|
711
|
*
|
713
|
*
|
712
|
* @ApiReturn({
|
714
|
* @ApiReturn({
|
713
|
"code": 1,
|
715
|
"code": 1,
|
|
@@ -813,8 +815,10 @@ class Index extends Api |
|
@@ -813,8 +815,10 @@ class Index extends Api |
813
|
*/
|
815
|
*/
|
814
|
public function filedetail()
|
816
|
public function filedetail()
|
815
|
{
|
817
|
{
|
|
|
818
|
+ $qiniu = get_addon_config('qiniu')['cdnurl'];
|
816
|
$user_id = $this->auth->id;
|
819
|
$user_id = $this->auth->id;
|
817
|
$folder_id = $this->request->param('folder_id');
|
820
|
$folder_id = $this->request->param('folder_id');
|
|
|
821
|
+ $other_user_id = $this->request->param('user_id');
|
818
|
if(empty($folder_id)){
|
822
|
if(empty($folder_id)){
|
819
|
$this->error('缺少必要参数');
|
823
|
$this->error('缺少必要参数');
|
820
|
}
|
824
|
}
|
|
@@ -1055,6 +1059,16 @@ class Index extends Api |
|
@@ -1055,6 +1059,16 @@ class Index extends Api |
1055
|
$gong2 = $this->gong(3,$video,$zhuan_video);
|
1059
|
$gong2 = $this->gong(3,$video,$zhuan_video);
|
1056
|
$data['video'] = $this->sundry($gong2);
|
1060
|
$data['video'] = $this->sundry($gong2);
|
1057
|
|
1061
|
|
|
|
1062
|
+ if(!empty($other_user_id)){
|
|
|
1063
|
+ $res_userinfo = Db::name('user')->where('id',$other_user_id)->field('username,avatar')->find();
|
|
|
1064
|
+ $data['username'] = $res_userinfo['username'];
|
|
|
1065
|
+ if(!empty($res_userinfo['avatar'])){
|
|
|
1066
|
+ $data['avatar'] = $qiniu.$res_userinfo['avatar'];
|
|
|
1067
|
+ }else{
|
|
|
1068
|
+ $data['avatar'] = '';
|
|
|
1069
|
+ }
|
|
|
1070
|
+ }
|
|
|
1071
|
+
|
1058
|
$this->success('success',$data);
|
1072
|
$this->success('success',$data);
|
1059
|
}
|
1073
|
}
|
1060
|
|
1074
|
|