...
|
...
|
@@ -7,6 +7,7 @@ use Home\OrderModel; |
|
|
use LibModels\Web\Home\OrderData;
|
|
|
use Configs\ChannelConfig;
|
|
|
use WebPlugin\Paging;
|
|
|
use Shopping\CartModel;
|
|
|
|
|
|
/**
|
|
|
* 订单
|
...
|
...
|
@@ -191,7 +192,7 @@ class OrdersController extends WebAction |
|
|
break;
|
|
|
}
|
|
|
$uid = $this->auditJumpLogin();
|
|
|
$orderCode = trim($this->post('orderCode', ''));//订单编号
|
|
|
$orderCode = trim($this->post('orderCode', '')); //订单编号
|
|
|
$reason = $this->get('reason', ''); //取消订单原因
|
|
|
$reasonid = $this->get('reasonId', ''); //取消原因id
|
|
|
$data = OrderData::cancelUserOrder($uid, $orderCode, $reason, $reasonid);
|
...
|
...
|
@@ -228,4 +229,51 @@ class OrdersController extends WebAction |
|
|
$this->echoJson($data);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 获取省市区县信息列表
|
|
|
*
|
|
|
* @param int id
|
|
|
* @return json
|
|
|
*/
|
|
|
public function getAreaListAction()
|
|
|
{
|
|
|
$result = array('code' => 200, 'message' => '地区信息', 'data' => array());
|
|
|
|
|
|
if ($this->isAjax()) {
|
|
|
$id = $this->get('id', 0);
|
|
|
$result['data'] = CartModel::getAreaList($id);
|
|
|
}
|
|
|
|
|
|
$this->echoJson($result);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 订单详情页地址修改
|
|
|
*/
|
|
|
public function modifyAddressAction()
|
|
|
{
|
|
|
$result = array('code' => 400, 'message' => '', 'data' => '');
|
|
|
|
|
|
do {
|
|
|
/* 判断是不是AJAX请求 */
|
|
|
if (!$this->isAjax()) {
|
|
|
break;
|
|
|
}
|
|
|
//获取相关参数
|
|
|
$order_code = $this->get('orderCode', ''); //订单号
|
|
|
$address_id = $this->get('addressId', ''); //地址id
|
|
|
if (!$order_code || !$address_id) {
|
|
|
$result = array('code' => 400, 'message' => '缺失必填项', 'data' => '');
|
|
|
break;
|
|
|
}
|
|
|
$result = OrderData::updateDeliveryAddress($order_code, $address_id);
|
|
|
if (!isset($result['code'])) {
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
while (false);
|
|
|
|
|
|
$this->echoJson($result);
|
|
|
}
|
|
|
|
|
|
} |
...
|
...
|
|