...
|
...
|
@@ -4,6 +4,7 @@ use Action\WebAction; |
|
|
use WebPlugin\Helpers;
|
|
|
use Shopping\CartModel;
|
|
|
use WebPlugin\UdpLog;
|
|
|
use WebPlugin\Encryption;
|
|
|
|
|
|
/**
|
|
|
* 购物车相关的控制器
|
...
|
...
|
@@ -269,6 +270,8 @@ class IndexController extends WebAction |
|
|
if ($this->isAjax()) {
|
|
|
$uid = $this->getUid(false);
|
|
|
$addressId = $this->post('id');
|
|
|
//解密
|
|
|
$addressId = intval(Encryption::decrypt($addressId));
|
|
|
$result = CartModel::setDefaultAddress($uid, $addressId);
|
|
|
}
|
|
|
|
...
|
...
|
@@ -295,7 +298,11 @@ class IndexController extends WebAction |
|
|
|
|
|
if ($this->isAjax()) {
|
|
|
$uid = $this->getUid(false);
|
|
|
$id = $this->post('id', null);
|
|
|
$id = $this->post('id', null); //TODO
|
|
|
if ($id) {
|
|
|
//解密
|
|
|
$id = intval(Encryption::decrypt($id));
|
|
|
}
|
|
|
$address = $this->post('address', '');
|
|
|
$areaCode = $this->post('areaCode', '');
|
|
|
$consignee = $this->post('consignee', '');
|
...
|
...
|
@@ -327,7 +334,8 @@ class IndexController extends WebAction |
|
|
|
|
|
if ($this->isAjax()) {
|
|
|
$uid = $this->getUid(false);
|
|
|
$addressId = $this->post('id');
|
|
|
$addressId = $this->post('id');// TODO
|
|
|
$addressId = intval(Encryption::decrypt($addressId));
|
|
|
$result = CartModel::delAddress($uid, $addressId);
|
|
|
}
|
|
|
|
...
|
...
|
@@ -435,7 +443,9 @@ class IndexController extends WebAction |
|
|
break;
|
|
|
}
|
|
|
|
|
|
$addressId = $this->post('addressId', null);
|
|
|
$addressId = $this->post('addressId', null);//TODO
|
|
|
//解密
|
|
|
$addressId = intval(Encryption::decrypt($addressId));
|
|
|
$cartType = $this->post('cartType', 'ordinary'); // 默认普通购物车
|
|
|
$deliveryTimeId = $this->post('deliveryTimeId', 1); // 默认只工作日配送
|
|
|
$deliveryWayId = $this->post('deliveryWayId', 1); // 默认普通快递
|
...
|
...
|
|