...
|
...
|
@@ -10,6 +10,7 @@ use WebPlugin\Cache; |
|
|
use WebPlugin\Images;
|
|
|
use Configs\WebCacheConfig;
|
|
|
use Hood\Core\Security\AuthCode;
|
|
|
use WebPlugin\UdpLog;
|
|
|
|
|
|
/**
|
|
|
* 购物车相关的模板数据模型
|
...
|
...
|
@@ -56,6 +57,7 @@ class CartModel |
|
|
$result['isEmpty'] = true;
|
|
|
$result['guangUrl'] = Helpers::url('', null, 'list');
|
|
|
$result['viewOrderUrl'] = Helpers::url('/home/orders', array('t' => time()));
|
|
|
UdpLog::info('【购物车】校验参数传递auth','uid:'.$uid.'shoppingKey:'.$shoppingKey);
|
|
|
break;
|
|
|
}
|
|
|
|
...
|
...
|
@@ -223,6 +225,8 @@ class CartModel |
|
|
$addCart = CartData::addToCart($productSku, $buyNumber, $goodsType, $isEdit, $promotionId, $uid, $shoppingKey);
|
|
|
if ($addCart && isset($addCart['code'])) {
|
|
|
$result = $addCart;
|
|
|
}else{
|
|
|
UdpLog::info('【购物车】校验参数传递auth','productSku:'.$productSku.'buyNumber:'.$buyNumber.'goodsType:'.$goodsType,'isEdit:'.$isEdit.'promotionId:'.$promotionId.'uid:'.$uid.'shoppingKey:'.$shoppingKey);
|
|
|
}
|
|
|
|
|
|
return $result;
|
...
|
...
|
@@ -243,6 +247,7 @@ class CartModel |
|
|
|
|
|
do {
|
|
|
if (empty($skuList)) {
|
|
|
UdpLog::info('【购物车】校验参数传递auth','skuList:'.$skuList);
|
|
|
break;
|
|
|
}
|
|
|
|
...
|
...
|
@@ -250,6 +255,8 @@ class CartModel |
|
|
if ($select && isset($select['code'])) {
|
|
|
$result['code'] = $select['code'];
|
|
|
$result['message'] = $select['message'];
|
|
|
}else{
|
|
|
UdpLog::info('【购物车】校验参数传递auth','uid:'.$uid.'skuList:'.$skuList.'shoppingKey:'.$shoppingKey.'hasPromotion:'.$hasPromotion);
|
|
|
}
|
|
|
} while (false);
|
|
|
|
...
|
...
|
@@ -272,6 +279,7 @@ class CartModel |
|
|
|
|
|
do {
|
|
|
if (empty($skuList)) {
|
|
|
UdpLog::info('【购物车】校验参数传递auth','skuList:'.$skuList);
|
|
|
break;
|
|
|
}
|
|
|
|
...
|
...
|
@@ -282,6 +290,8 @@ class CartModel |
|
|
if (isset($remove['data']['goods_count'])) {
|
|
|
$result['total_goods_num'] = $remove['data']['goods_count'];
|
|
|
}
|
|
|
}else{
|
|
|
UdpLog::info('【购物车】校验参数传递auth','uid:'.$uid.'skuList:'.$skuList.'shoppingKey:'.$shoppingKey.'hasPromotion:'.$hasPromotion);
|
|
|
}
|
|
|
} while (false);
|
|
|
|
...
|
...
|
@@ -305,11 +315,11 @@ class CartModel |
|
|
$result['code'] = 403;
|
|
|
$result['message'] = '请先登录!';
|
|
|
$result['data']['url'] = Helpers::url('/signin.html', array('refer' => Helpers::url('/shopping/cart')));
|
|
|
|
|
|
break;
|
|
|
}
|
|
|
|
|
|
if (empty($skuList)) {
|
|
|
UdpLog::info('【购物车】校验参数传递auth','skuList:'.$skuList);
|
|
|
break;
|
|
|
}
|
|
|
|
...
|
...
|
@@ -317,6 +327,8 @@ class CartModel |
|
|
if ($add && isset($add['code'])) {
|
|
|
$result['code'] = $add['code'];
|
|
|
$result['message'] = $add['message'];
|
|
|
}else{
|
|
|
UdpLog::info('【购物车】校验参数传递auth','uid:'.$uid.'skuList:'.$skuList.'hasPromotion:'.$hasPromotion);
|
|
|
}
|
|
|
} while (false);
|
|
|
|
...
|
...
|
@@ -339,6 +351,7 @@ class CartModel |
|
|
|
|
|
do {
|
|
|
if (empty($sku)) {
|
|
|
UdpLog::info('【购物车】校验参数传递auth','sku:'.$sku);
|
|
|
break;
|
|
|
}
|
|
|
|
...
|
...
|
@@ -346,6 +359,8 @@ class CartModel |
|
|
if ($modify && isset($modify['code'])) {
|
|
|
$result['code'] = $modify['code'];
|
|
|
$result['message'] = $modify['message'];
|
|
|
}else{
|
|
|
UdpLog::info('【购物车】校验参数传递auth','uid:'.$uid.'sku:'.$sku,'increaseNum:'.$increaseNum.'decreaseNum:'.$decreaseNum.'shoppingKey:'.$shoppingKey);
|
|
|
}
|
|
|
} while (false);
|
|
|
|
...
|
...
|
@@ -419,6 +434,7 @@ class CartModel |
|
|
|
|
|
$browse = CartData::browseRecord($uid, $udid, $page, 6);
|
|
|
if (empty($browse['data']['product_list'])) {
|
|
|
UdpLog::info('【购物车】校验参数传递auth','uid:'.$uid.'udid'.$udid.'page'.$page);
|
|
|
break;
|
|
|
}
|
|
|
|
...
|
...
|
|