...
|
...
|
@@ -189,7 +189,7 @@ class CartModel |
|
|
$product = CartData::cartProductData($uid, $skn);
|
|
|
if (isset($product['code']) && $product['code'] === 200) {
|
|
|
$result['code'] = 200;
|
|
|
$result['data'] = self::procGoodsDetail($product['data']);
|
|
|
$result['data'] = self::procGoodsDetail($product['data'], $num);
|
|
|
}
|
|
|
|
|
|
return $result;
|
...
|
...
|
@@ -575,9 +575,10 @@ class CartModel |
|
|
* 处理购物车商品、加价购商品、赠品详情数据
|
|
|
*
|
|
|
* @param array $productData 要处理的商品数据
|
|
|
* @param int $num 购买数目
|
|
|
* @return array $data 处理之后的数据
|
|
|
*/
|
|
|
private static function procGoodsDetail($productData)
|
|
|
private static function procGoodsDetail($productData, $num = null)
|
|
|
{
|
|
|
$data = array();
|
|
|
|
...
|
...
|
@@ -590,7 +591,9 @@ class CartModel |
|
|
$data['price'] = $productData['market_price'];
|
|
|
$data['salePrice'] = $productData['sales_price'];
|
|
|
$data['storage'] = $productData['storage_sum'];
|
|
|
$data['num'] = $num;
|
|
|
if ($num !== null) {
|
|
|
$data['num'] = $num;
|
|
|
}
|
|
|
|
|
|
// 商品选择
|
|
|
if (isset($productData['goods_list'])) {
|
...
|
...
|
|