...
|
...
|
@@ -378,6 +378,23 @@ class Index extends Api |
|
|
$tree = Tree::instance();
|
|
|
$tree->init(Db::name('folder')->select(), 'pid');
|
|
|
foreach ($data as &$v){
|
|
|
|
|
|
$user_info = Db::name('user')->where('id',$v['user_id'])->find();
|
|
|
if($v['user_id'] == $user_id){
|
|
|
$v['is_white'] = 1;
|
|
|
}else{
|
|
|
if(empty($user_info['whiteip_ids'])){
|
|
|
$v['is_white'] = 2;
|
|
|
}else{
|
|
|
$whiteip_ids = explode(',',$user_info['whiteip_ids']);
|
|
|
if(in_array($user_id,$whiteip_ids)){
|
|
|
$v['is_white'] = 1;
|
|
|
}else{
|
|
|
$v['is_white'] = 2;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
$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')
|
...
|
...
|
|