...
|
...
|
@@ -380,20 +380,19 @@ class Index extends Api |
|
|
foreach ($data as &$v){
|
|
|
|
|
|
$user_info = Db::name('user')->where('id',$v['user_id'])->find();
|
|
|
if($v['user_id'] == $uid){
|
|
|
|
|
|
|
|
|
//查询白名单
|
|
|
if(!empty($user_info['whiteip_ids'])){
|
|
|
$user_info['whiteip_ids'] = explode(',',$user_info['whiteip_ids']);
|
|
|
if($v['user_id'] == $uid || in_array($uid,$user_info['whiteip_ids'])){
|
|
|
$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'];
|
...
|
...
|
@@ -439,21 +438,20 @@ class Index extends Api |
|
|
|
|
|
foreach ($note as &$v){
|
|
|
$user_info = Db::name('user')->where('id',$v['user_id'])->find();
|
|
|
if($v['user_id'] == $uid){
|
|
|
|
|
|
|
|
|
//查询白名单
|
|
|
if(!empty($user_info['whiteip_ids'])){
|
|
|
$user_info['whiteip_ids'] = explode(',',$user_info['whiteip_ids']);
|
|
|
if($v['user_id'] == $uid || in_array($uid,$user_info['whiteip_ids'])){
|
|
|
$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;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
//自己的图片文件
|
|
|
$pic = $this->myfile(2,$where);
|
...
|
...
|
@@ -466,7 +464,7 @@ class Index extends Api |
|
|
$v['is_white'] = 2;
|
|
|
}else{
|
|
|
$whiteip_ids = explode(',',$user_info['whiteip_ids']);
|
|
|
if(in_array($user_id,$whiteip_ids)){
|
|
|
if(in_array($uid,$whiteip_ids)){
|
|
|
$v['is_white'] = 1;
|
|
|
}else{
|
|
|
$v['is_white'] = 2;
|
...
|
...
|
@@ -485,7 +483,7 @@ class Index extends Api |
|
|
$v['is_white'] = 2;
|
|
|
}else{
|
|
|
$whiteip_ids = explode(',',$user_info['whiteip_ids']);
|
|
|
if(in_array($user_id,$whiteip_ids)){
|
|
|
if(in_array($uid,$whiteip_ids)){
|
|
|
$v['is_white'] = 1;
|
|
|
}else{
|
|
|
$v['is_white'] = 2;
|
...
|
...
|
@@ -506,7 +504,7 @@ class Index extends Api |
|
|
$v['is_white'] = 2;
|
|
|
}else{
|
|
|
$whiteip_ids = explode(',',$user_info['whiteip_ids']);
|
|
|
if(in_array($user_id,$whiteip_ids)){
|
|
|
if(in_array($uid,$whiteip_ids)){
|
|
|
$v['is_white'] = 1;
|
|
|
}else{
|
|
|
$v['is_white'] = 2;
|
...
|
...
|
@@ -525,7 +523,7 @@ class Index extends Api |
|
|
$v['is_white'] = 2;
|
|
|
}else{
|
|
|
$whiteip_ids = explode(',',$user_info['whiteip_ids']);
|
|
|
if(in_array($user_id,$whiteip_ids)){
|
|
|
if(in_array($uid,$whiteip_ids)){
|
|
|
$v['is_white'] = 1;
|
|
|
}else{
|
|
|
$v['is_white'] = 2;
|
...
|
...
|
@@ -544,7 +542,7 @@ class Index extends Api |
|
|
$v['is_white'] = 2;
|
|
|
}else{
|
|
|
$whiteip_ids = explode(',',$user_info['whiteip_ids']);
|
|
|
if(in_array($user_id,$whiteip_ids)){
|
|
|
if(in_array($uid,$whiteip_ids)){
|
|
|
$v['is_white'] = 1;
|
|
|
}else{
|
|
|
$v['is_white'] = 2;
|
...
|
...
|
|