...
|
...
|
@@ -62,9 +62,8 @@ class CartData |
|
|
public static function selectGoods($uid, $sku, $shoppingKey)
|
|
|
{
|
|
|
$param = Yohobuy::param();
|
|
|
$param['method'] = 'app.Shopping.selected';
|
|
|
$param['method'] = 'app.Shopping.selectedAndCart';
|
|
|
$param['product_sku_list'] = $sku;
|
|
|
|
|
|
if (!empty($uid)) {
|
|
|
$param['uid'] = $uid;
|
|
|
}
|
...
|
...
|
@@ -109,10 +108,10 @@ class CartData |
|
|
* @param string $shoppingKey 未登录用户唯一识别码
|
|
|
* @return array 接口返回的数据
|
|
|
*/
|
|
|
public static function removeFromCart($uid, $sku, $shoppingKey)
|
|
|
public static function removeFromCart($uid, $sku, $shoppingKey, $hasPromotion = false)
|
|
|
{
|
|
|
$param = Yohobuy::param();
|
|
|
$param['method'] = 'app.Shopping.remove';
|
|
|
$param['method'] = 'app.Shopping.removeAndCart';
|
|
|
$param['product_sku_list'] = $sku;
|
|
|
|
|
|
if (!empty($uid)) {
|
...
|
...
|
@@ -134,10 +133,10 @@ class CartData |
|
|
* @param string $sku 商品sku列表
|
|
|
* @return array 接口返回的数据
|
|
|
*/
|
|
|
public static function addToFav($uid, $sku)
|
|
|
public static function addToFav($uid, $sku, $hasPromotion = false)
|
|
|
{
|
|
|
$param = Yohobuy::param();
|
|
|
$param['method'] = 'app.Shopping.addfavorite';
|
|
|
$param['method'] = $hasPromotion ? 'app.Shopping.addfavoriteAndCart' : 'app.Shopping.addfavorite';
|
|
|
$param['product_sku_list'] = $sku;
|
|
|
$param['uid'] = $uid;
|
|
|
$param['client_secret'] = Sign::getSign($param);
|
...
|
...
|
|