|  | @@ -90,6 +90,13 @@ class Topicdongtai extends Api
 | 
											
												
													
														|  |          $this->success('success',$list);
 |  |          $this->success('success',$list);
 | 
											
												
													
														|  |      }
 |  |      }
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | 
 |  | +    //动态删除
 | 
											
												
													
														|  | 
 |  | +    public function delete(){
 | 
											
												
													
														|  | 
 |  | +        $id = input('id',0);
 | 
											
												
													
														|  | 
 |  | +        Db::name('topic_dongtai')->where('id',$id)->where('user_id',$this->auth->id)->delete();
 | 
											
												
													
														|  | 
 |  | +        $this->success('删除成功');
 | 
											
												
													
														|  | 
 |  | +    }
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  |      //是否点赞
 |  |      //是否点赞
 | 
											
												
													
														|  |      private function is_good($dt_id,$uid){
 |  |      private function is_good($dt_id,$uid){
 | 
											
												
													
														|  |          $where = [
 |  |          $where = [
 | 
											
										
											
												
													
														|  | @@ -437,9 +444,10 @@ class Topicdongtai extends Api
 | 
											
												
													
														|  |              $where['dt.id'] = ['NOTIN',$screen_ids];
 |  |              $where['dt.id'] = ['NOTIN',$screen_ids];
 | 
											
												
													
														|  |          }
 |  |          }
 | 
											
												
													
														|  |          //排除黑名单的
 |  |          //排除黑名单的
 | 
											
												
													
														|  | 
 |  | +        $where2 = [];
 | 
											
												
													
														|  |          $black_ids = Db::name('user_blacklist')->where('user_id',$this->auth->id)->column('black_user_id');
 |  |          $black_ids = Db::name('user_blacklist')->where('user_id',$this->auth->id)->column('black_user_id');
 | 
											
												
													
														|  |          if(!empty($black_ids)){
 |  |          if(!empty($black_ids)){
 | 
											
												
													
														|  | -            $where['dt.user_id'] = ['NOTIN',$black_ids];
 |  | 
 | 
											
												
													
														|  | 
 |  | +            $where2['dt.user_id'] = ['NOTIN',$black_ids];
 | 
											
												
													
														|  |          }
 |  |          }
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |          //
 |  |          //
 | 
											
										
											
												
													
														|  | @@ -448,6 +456,7 @@ class Topicdongtai extends Api
 | 
											
												
													
														|  |              ->join('topic_hub topic','dt.topic_id = topic.id','LEFT')
 |  |              ->join('topic_hub topic','dt.topic_id = topic.id','LEFT')
 | 
											
												
													
														|  |              ->field('dt.*,user.nickname,user.avatar,user.gender,topic.name as topic_name')
 |  |              ->field('dt.*,user.nickname,user.avatar,user.gender,topic.name as topic_name')
 | 
											
												
													
														|  |              ->where($where)
 |  |              ->where($where)
 | 
											
												
													
														|  | 
 |  | +            ->where($where2)
 | 
											
												
													
														|  |              ->order($orderby)->autopage()->select();
 |  |              ->order($orderby)->autopage()->select();
 | 
											
												
													
														|  |          $list = list_domain_image($list,['images','avatar']);
 |  |          $list = list_domain_image($list,['images','avatar']);
 | 
											
												
													
														|  |  
 |  |  
 |