From b03c78ac7a7918824ff2f4ec2dd123c202136baf Mon Sep 17 00:00:00 2001 From: Jerry Yan <792602257@qq.com> Date: Tue, 29 Oct 2019 21:27:56 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B4=AD=E7=89=A9=E8=BD=A6=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hyhproject/common/model/Carts.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hyhproject/common/model/Carts.php b/hyhproject/common/model/Carts.php index f2f25d4..17e6780 100755 --- a/hyhproject/common/model/Carts.php +++ b/hyhproject/common/model/Carts.php @@ -18,7 +18,7 @@ class Carts extends Base{ //goods_specs表的规格ID $goodsSpecId = (int)input('post.goodsSpecId'); $type = (int)input('post.type'); - $goodsType = (int)input('post.from',1); + $goodsType = (int)input('post.from',3); //mark 添加验证 //$m = new \addons\hyhsale\model\Hyhsale(); // if($type == 0 && model('\addons\hyhsale\model\Hyhsale')->getEffectiveGoods(['goodsId'=>$goodsId,'specsId'=>$goodsSpecId])){ @@ -37,7 +37,7 @@ class Carts extends Base{ //添加实物商品 if($chk['data']['goodsType']==0){ $goodsSpecId = $chk['data']['goodsSpecId']; - $goods = $this->where(['userId'=>$userId,'goodsId'=>$goodsId,'goodsSpecId'=>$goodsSpecId])->select(); + $goods = $this->where(['userId'=>$userId,'goodsId'=>$goodsId,'goodsSpecId'=>$goodsSpecId, 'goodsType'=>$goodsType])->select(); if(empty($goods)){ $data = array();