|
@@ -77,6 +77,16 @@ class YHMApi_App_V2_Goods extends YHMApi_App_V1_Goods |
|
@@ -77,6 +77,16 @@ class YHMApi_App_V2_Goods extends YHMApi_App_V1_Goods |
77
|
if(!empty($productInfo))
|
77
|
if(!empty($productInfo))
|
78
|
{
|
78
|
{
|
79
|
$goodsImages = YHMProduct_Models_Goodsimages_Client::getByProductSkc($skc);
|
79
|
$goodsImages = YHMProduct_Models_Goodsimages_Client::getByProductSkc($skc);
|
|
|
80
|
+ // 是否收藏商品
|
|
|
81
|
+ if (!empty($params ['uid']))
|
|
|
82
|
+ {
|
|
|
83
|
+ $favorite = YHMPassport_Models_Favorite_Goods_Client::findIsFavoriteBySkc($params ['uid'], $params ['product_skc']);
|
|
|
84
|
+ }
|
|
|
85
|
+ $favorite_num = YHMPassport_Models_Favorite_Goods_Client::getFavoriteTotal($skc);
|
|
|
86
|
+ $is_favorite = 'N';
|
|
|
87
|
+ if (!empty($favorite)) {
|
|
|
88
|
+ $is_favorite = 'Y';
|
|
|
89
|
+ }
|
80
|
//商品描述 goods_describe
|
90
|
//商品描述 goods_describe
|
81
|
$goods_describe = YHMProduct_Models_Goods_Client::getGoodsDescribeBySkc($skc);
|
91
|
$goods_describe = YHMProduct_Models_Goods_Client::getGoodsDescribeBySkc($skc);
|
82
|
$imageList = array();
|
92
|
$imageList = array();
|
|
@@ -98,7 +108,10 @@ class YHMApi_App_V2_Goods extends YHMApi_App_V1_Goods |
|
@@ -98,7 +108,10 @@ class YHMApi_App_V2_Goods extends YHMApi_App_V1_Goods |
98
|
$resultList[] = array(
|
108
|
$resultList[] = array(
|
99
|
'image_list' => $imageList,
|
109
|
'image_list' => $imageList,
|
100
|
'product_skc' => $skc,
|
110
|
'product_skc' => $skc,
|
|
|
111
|
+ 'is_favorite' => $is_favorite, // 是否已收藏,
|
|
|
112
|
+ 'favorite_num'=> $favorite_num,//收藏数
|
101
|
'area_code'=> $productInfo['area_code'],
|
113
|
'area_code'=> $productInfo['area_code'],
|
|
|
114
|
+ 'goods_name'=> $productInfo['goods_name'],
|
102
|
'goods_describe' => $goods_describe['goods_describe'],
|
115
|
'goods_describe' => $goods_describe['goods_describe'],
|
103
|
'create_time' => $productInfo['create_time'],
|
116
|
'create_time' => $productInfo['create_time'],
|
104
|
'sale_price' => $productInfo['sale_price'],
|
117
|
'sale_price' => $productInfo['sale_price'],
|