...
|
...
|
@@ -236,17 +236,17 @@ class OrdersController extends WebAction |
|
|
* @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 getAreaListAction()
|
|
|
// {
|
|
|
// $result = array('code' => 200, 'message' => '地区信息', 'data' => array());
|
|
|
//
|
|
|
// if ($this->isAjax()) {
|
|
|
// $id = $this->get('id', 0);
|
|
|
// $result['data'] = CartModel::getAreaList($id);
|
|
|
// }
|
|
|
//
|
|
|
// $this->echoJson($result);
|
|
|
// }
|
|
|
|
|
|
/**
|
|
|
* 订单详情页地址修改
|
...
|
...
|
@@ -257,29 +257,33 @@ class OrdersController extends WebAction |
|
|
|
|
|
do {
|
|
|
/* 判断是不是AJAX请求 */
|
|
|
// if (!$this->isAjax()) {
|
|
|
// break;
|
|
|
// }
|
|
|
//获取相关参数
|
|
|
// $order_code = $this->get('orderCode', ''); //订单号
|
|
|
// $user_name = $this->get('user_name', ''); //收货人
|
|
|
// $area_code = $this->get('area_code', ''); //区号
|
|
|
// $address = $this->get('address', ''); //地址
|
|
|
// $mobile = $this->get('mobile', ''); //手机号码
|
|
|
// $phone = $this->get('phone', ''); //固定电话
|
|
|
$order_code = 1616956289; //订单号
|
|
|
$user_name = '接口测试'; //收货人
|
|
|
$area_code = 321023; //区号
|
|
|
$address = '测试地址'; //地址
|
|
|
$mobile = 18021408798; //手机号码
|
|
|
// if (!$order_code || !$address_id) {
|
|
|
// $result = array('code' => 400, 'message' => '缺失必填项', 'data' => '');
|
|
|
// break;
|
|
|
// }
|
|
|
if (!$this->isAjax()) {
|
|
|
break;
|
|
|
}
|
|
|
// 获取相关参数
|
|
|
$order_code = $this->get('orderCode', ''); //订单号
|
|
|
$user_name = $this->get('userName', ''); //收货人
|
|
|
$area_code = $this->get('areaCode', ''); //区号
|
|
|
$address = $this->get('address', ''); //地址
|
|
|
$mobile = $this->get('mobile', ''); //手机号码
|
|
|
$phoneNum = $this->get('phoneNum', ''); //固定电话
|
|
|
$phoneCode = $this->get('phoneCode', ''); //固定电话
|
|
|
if(!empty($phoneNum) && !empty($phoneCode)){
|
|
|
$phone = $phoneCode.'-'.$phoneNum;
|
|
|
}
|
|
|
// $order_code = 1616956289; //订单号
|
|
|
// $user_name = '接口测试'; //收货人
|
|
|
// $area_code = 321023; //区号
|
|
|
// $address = '测试地址'; //地址
|
|
|
// $mobile = 18021408798; //手机号码
|
|
|
if (!$order_code || !$user_name || !$area_code || !$address) {
|
|
|
$result = array('code' => 400, 'message' => '缺失必填项', 'data' => '');
|
|
|
break;
|
|
|
}
|
|
|
$result = OrderData::updateDeliveryAddress($order_code, $address_id, $user_name, $area_code, $address, $mobile, $phone);
|
|
|
// if (!isset($result['code'])) {
|
|
|
// break;
|
|
|
// }
|
|
|
if (!isset($result['code'])) {
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
while (false);
|
|
|
|
...
|
...
|
|