...
|
...
|
@@ -168,13 +168,13 @@ class CartModel |
|
|
* @param string $shoppingKey 未登录用户唯一识别码
|
|
|
* @return array 接口返回的数据
|
|
|
*/
|
|
|
public static function removeFromCart($uid, $sku, $count, $shoppingKey, $hasPromotion = false)
|
|
|
public static function removeFromCart($uid, $sku, $count, $shoppingKey, $promotionId = 0)
|
|
|
{
|
|
|
$result = array('code' => 400, 'message' => '出错啦~');
|
|
|
|
|
|
// 处理sku
|
|
|
$sku_list = json_encode(array(array('product_sku'=>$sku,'buy_number'=>intval($count), 'promotion_id'=>$hasPromotion)));
|
|
|
$remove = CartData::removeFromCart($uid, $sku_list, $shoppingKey, $hasPromotion);
|
|
|
$sku_list = json_encode(array(array('product_sku'=>$sku,'buy_number'=>intval($count), 'promotion_id'=>$promotionId)));
|
|
|
$remove = CartData::removeFromCart($uid, $sku_list, $shoppingKey);
|
|
|
if ($remove && isset($remove['code'])) {
|
|
|
$result['code'] = $remove['code'];
|
|
|
$result['message'] = $remove['message'];
|
...
|
...
|
|