...
|
...
|
@@ -41,6 +41,7 @@ class Goods extends Api |
|
|
"sale_price": 2599,//销售价格
|
|
|
"market_price": 2699,//市场价格
|
|
|
"expense_price": 0,//运费(0:显示包运费标签)
|
|
|
"is_collection": 0,//是否收藏(0:否,1:是)
|
|
|
"style": [//商品规格
|
|
|
"主餐匙,茶匙各1件",
|
|
|
"古堡灰"
|
...
|
...
|
@@ -106,6 +107,12 @@ class Goods extends Api |
|
|
$res['b_type'] = '';
|
|
|
}
|
|
|
|
|
|
$res1 = Common::findWhereData('collection',['uid'=>$this->uid,'g_id'=>$goods_id],'id');
|
|
|
if($res1){
|
|
|
$res['is_collection'] = 1;//已收藏
|
|
|
}else{
|
|
|
$res['is_collection'] = 0;//未收藏
|
|
|
}
|
|
|
//浏览商品增加次数
|
|
|
$goodsModel = new \app\admin\model\Goods();
|
|
|
$goodsModel->where(['id'=>$goods_id])->setInc('hots',1);
|
...
|
...
|
|