Authored by cailing

地址修改

... ... @@ -185,7 +185,8 @@ class OrderData
$param['area_code'] = $area_code;
$param['address'] = $address;
$param['mobile'] = $mobile;
$param['phone'] = $phone;
// $param['phone'] = $phone;
$param['debug'] = 'XYZ';
$param['client_secret'] = Sign::getSign($param);
// 调用接口获得数据
... ...
... ... @@ -225,11 +225,7 @@ class OrderModel
$detail['operation'] = self::getOrderDetailOp($orderDetail['order_code'], $orderDetail['payment'], $orderDetail['status'], $orderDetail['is_cancel'], $orderDetail['payment_status'], $orderDetail['payment_type'], $orderDetail['order_type'], $orderDetail['attribute'], $orderDetail['refund_status']); //,$orderDetail['order_type_value']
$detail['packages'] = CartModel::getPackageInfo($orderDetail);
//判断是否可以修改地址
$result['changeable'] = $orderDetail['can_update_delivery_address'] == 'Y' ? 'true' : 'false';
//判断是否有关联订单
$result['relation'] = $orderDetail['relate_order_code'] == 'Y' ? 'true' : 'false';
//修改地址跳转链接
$result['url'] = Helpers::url('/home/addressModify', array('orderCode' => $orderCode, 'relation' => $result['relation']));
$detail['changeable'] = $orderDetail['can_update_delivery_address'] == 'Y' ? 'true' : 'false';
}
return $detail;
}
... ...
... ... @@ -257,21 +257,25 @@ class OrdersController extends WebAction
do {
/* 判断是不是AJAX请求 */
if (!$this->isAjax()) {
break;
}
// if (!$this->isAjax()) {
// break;
// }
//获取相关参数
$order_code = $this->get('orderCode', ''); //订单号
$address_id = $this->get('addressId', ''); //地址id
$user_name = $this->get('user_name', ''); //收货人
$area_code = $this->get('area_code', ''); //区号
$address = $this->get('address', ''); //地址
$mobile = $this->get('mobile', ''); //手机号码
$phone = $this->get('phone', ''); //固定电话
if (!$order_code || !$address_id) {
$result = array('code' => 400, 'message' => '缺失必填项', 'data' => '');
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 = 1615400071; //订单号
$user_name = '接口测试'; //收货人
$area_code = 321023; //区号
$address = '测试地址'; //地址
$mobile = 18021408798; //手机号码
// if (!$order_code || !$address_id) {
// $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;
... ...