@@ -202,7 +202,18 @@ class Books extends Api
->where('is_series',0)
->field('id,title,image,book_type,is_new_recommend,author,is_awards,price,entity_price,createtime,updatetime,level_id,arrangement_id,speciality_id,series_id,is_series')
->select();
- $this->success('操作成功',$list);
+ $lists = $list->toArray();
+ if($this->auth->isLogin()) {
+ $uid = $this->auth->id;
+ foreach ($lists as $k => $v) {
+ $UserGoods = new UserGoods();
+ $good = $UserGoods->where('user_id', $uid)->where('goods_type', 0)->where('goods_id', $v['id'])->find();
+ if ($good) {
+ unset($lists[$k]);
+ }
+ $this->success('操作成功',$lists);
}
/**