...
|
...
|
@@ -96,22 +96,25 @@ class CartModel |
|
|
* 购物车商品选择与取消接口返回的数据处理
|
|
|
*
|
|
|
* @param int $uid 用户ID
|
|
|
* @param string $sku 商品sku列表
|
|
|
* @param string $skuList 商品sku列表
|
|
|
* @param string $shoppingKey 未登录用户唯一识别码
|
|
|
* @return array 处理之后的数据的数据
|
|
|
*/
|
|
|
public static function selectGoods($uid, $sku, $shoppingKey)
|
|
|
public static function selectGoods($uid, $skuList, $shoppingKey)
|
|
|
{
|
|
|
$result = array('code' => 400, 'message' => '出错啦~');
|
|
|
|
|
|
// 处理sku
|
|
|
$sku_list = json_encode(array($sku => 1));
|
|
|
do {
|
|
|
if (empty($skuList)) {
|
|
|
break;
|
|
|
}
|
|
|
|
|
|
$select = CartData::selectGoods($uid, $sku_list, $shoppingKey);
|
|
|
$select = CartData::selectGoods($uid, $skuList, $shoppingKey);
|
|
|
if ($select && isset($select['code'])) {
|
|
|
$result['code'] = $select['code'];
|
|
|
$result['message'] = $select['message'];
|
|
|
}
|
|
|
}while(0);
|
|
|
|
|
|
return $result;
|
|
|
}
|
...
|
...
|
|