dyjh 6 年之前
父节点
当前提交
49752e9e7f
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      app/Http/Controllers/Api/V1/AlbumController.php

+ 2 - 2
app/Http/Controllers/Api/V1/AlbumController.php

@@ -518,7 +518,7 @@ class AlbumController extends Controller
             AlbumWatchRecord::create($add_record);
             AlbumWatchRecord::create($add_record);
         }
         }
         $goods = AlbumProductModel::where([['id',$goods_id],['store_id',$store_id]])->first();
         $goods = AlbumProductModel::where([['id',$goods_id],['store_id',$store_id]])->first();
-        if(!empty($goods) && $userAuth->up_agent_id != 0){
+        if(!empty($goods) && $userAuth->up_agent_id != 1){
             $price = DB::table('album_product_price')->where([['agent_id',$userAuth->up_agent_id],['store_id',$store_id],['product_id',$goods['id']]])->first();
             $price = DB::table('album_product_price')->where([['agent_id',$userAuth->up_agent_id],['store_id',$store_id],['product_id',$goods['id']]])->first();
             if(!empty($price)){
             if(!empty($price)){
                 $goods->price = $price->price;
                 $goods->price = $price->price;
@@ -531,7 +531,7 @@ class AlbumController extends Controller
                 $goods->address = '';
                 $goods->address = '';
             }
             }
             $check_favorite = AlbumFavoriteModel::where([['user_id',$userAuth->id],['store_id',$store_id],['product_id',$goods['id']]])->first();
             $check_favorite = AlbumFavoriteModel::where([['user_id',$userAuth->id],['store_id',$store_id],['product_id',$goods['id']]])->first();
-            dd($check_favorite);
+            //dd($check_favorite);
             if($check_favorite){
             if($check_favorite){
                 $goods->is_favorite = 1;
                 $goods->is_favorite = 1;
                 $goods->favorite_id = $check_favorite->id;
                 $goods->favorite_id = $check_favorite->id;