| xqd
@@ -2098,8 +2098,10 @@ class AlbumController extends Controller
|
|
|
//dd($detail);die;
|
|
|
$goods_id = $detail['goods_id'];
|
|
|
$goods = AlbumProductModel::where([['id',$goods_id]])->first();
|
|
|
- $count= AlbumWatchRecord::where([['action',3],['store_id',$store_id],['open_id',$open_id],['detail',$detail]])->count();
|
|
|
- $arr[] = ['name'=>$goods->name,'count'=>$count];
|
|
|
+ if($goods){
|
|
|
+ $count= AlbumWatchRecord::where([['action',3],['store_id',$store_id],['open_id',$open_id],['detail',$detail]])->count();
|
|
|
+ $arr[] = ['name'=>$goods->name,'count'=>$count];
|
|
|
+ }
|
|
|
}
|
|
|
return $this->api($arr,0,'success');
|
|
|
}
|