...
|
...
|
@@ -37,11 +37,11 @@ class Goods extends Api |
|
|
"file": "http://jinglong.springchunjia.cn/uploads/20191127/05d216e117e11bd3de352c155b42eaaa.mp4",//视频路径
|
|
|
"name": "MONENT 动感系列",//商品名称
|
|
|
"name_en": "Monent dynamic series",//商品名称(英文)
|
|
|
"new_price": 2499,//新人价格
|
|
|
"sale_price": 2599,//销售价格
|
|
|
"market_price": 2699,//市场价格
|
|
|
"expense_price": 0,//运费(0:显示包运费标签)
|
|
|
"is_collection": 0,//是否收藏(0:否,1:是)
|
|
|
"is_new_tag": 0//新人价格标签(0:不显示,1:显示)
|
|
|
"style": [//商品规格
|
|
|
"主餐匙,茶匙各1件",
|
|
|
"古堡灰"
|
...
|
...
|
@@ -113,6 +113,28 @@ class Goods extends Api |
|
|
}else{
|
|
|
$res['is_collection'] = 0;//未收藏
|
|
|
}
|
|
|
|
|
|
$is_news = 2;
|
|
|
if(!empty($this->uid)){
|
|
|
//已登录
|
|
|
$res2 = Common::findSoftWhereData('order',['uid'=>$this->uid,'status'=>config('verify.status')[3]],'id');
|
|
|
if($res2){
|
|
|
$is_news = 1;//旧人
|
|
|
}else{
|
|
|
$is_news = 0;//新人
|
|
|
}
|
|
|
}
|
|
|
if($is_news == 2 || $is_news == 0){//未登录或者新人
|
|
|
if($res['is_new'] == 0){
|
|
|
//非新人优惠标签
|
|
|
$res['is_new_tag'] = 0;//不用显示新人价标签
|
|
|
}else{
|
|
|
//新人优惠标签
|
|
|
$res['is_new_tag'] = 1;//显示新人价标签
|
|
|
}
|
|
|
}else{
|
|
|
$res['is_new_tag'] = 0;//不用显示新人价标签(新人价标签商品不会出来)
|
|
|
}
|
|
|
//浏览商品增加次数
|
|
|
$goodsModel = new \app\admin\model\Goods();
|
|
|
$goodsModel->where(['id'=>$goods_id])->setInc('hots',1);
|
...
|
...
|
|