Authored by cailing

地址修改

@@ -185,7 +185,8 @@ class OrderData @@ -185,7 +185,8 @@ class OrderData
185 $param['area_code'] = $area_code; 185 $param['area_code'] = $area_code;
186 $param['address'] = $address; 186 $param['address'] = $address;
187 $param['mobile'] = $mobile; 187 $param['mobile'] = $mobile;
188 - $param['phone'] = $phone; 188 +// $param['phone'] = $phone;
  189 + $param['debug'] = 'XYZ';
189 $param['client_secret'] = Sign::getSign($param); 190 $param['client_secret'] = Sign::getSign($param);
190 191
191 // 调用接口获得数据 192 // 调用接口获得数据
@@ -225,11 +225,7 @@ class OrderModel @@ -225,11 +225,7 @@ class OrderModel
225 $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'] 225 $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']
226 $detail['packages'] = CartModel::getPackageInfo($orderDetail); 226 $detail['packages'] = CartModel::getPackageInfo($orderDetail);
227 //判断是否可以修改地址 227 //判断是否可以修改地址
228 - $result['changeable'] = $orderDetail['can_update_delivery_address'] == 'Y' ? 'true' : 'false';  
229 - //判断是否有关联订单  
230 - $result['relation'] = $orderDetail['relate_order_code'] == 'Y' ? 'true' : 'false';  
231 - //修改地址跳转链接  
232 - $result['url'] = Helpers::url('/home/addressModify', array('orderCode' => $orderCode, 'relation' => $result['relation'])); 228 + $detail['changeable'] = $orderDetail['can_update_delivery_address'] == 'Y' ? 'true' : 'false';
233 } 229 }
234 return $detail; 230 return $detail;
235 } 231 }
@@ -257,21 +257,25 @@ class OrdersController extends WebAction @@ -257,21 +257,25 @@ class OrdersController extends WebAction
257 257
258 do { 258 do {
259 /* 判断是不是AJAX请求 */ 259 /* 判断是不是AJAX请求 */
260 - if (!$this->isAjax()) {  
261 - break;  
262 - } 260 +// if (!$this->isAjax()) {
  261 +// break;
  262 +// }
263 //获取相关参数 263 //获取相关参数
264 - $order_code = $this->get('orderCode', ''); //订单号  
265 - $address_id = $this->get('addressId', ''); //地址id  
266 - $user_name = $this->get('user_name', ''); //收货人  
267 - $area_code = $this->get('area_code', ''); //区号  
268 - $address = $this->get('address', ''); //地址  
269 - $mobile = $this->get('mobile', ''); //手机号码  
270 - $phone = $this->get('phone', ''); //固定电话  
271 - if (!$order_code || !$address_id) {  
272 - $result = array('code' => 400, 'message' => '缺失必填项', 'data' => '');  
273 - break;  
274 - } 264 +// $order_code = $this->get('orderCode', ''); //订单号
  265 +// $user_name = $this->get('user_name', ''); //收货人
  266 +// $area_code = $this->get('area_code', ''); //区号
  267 +// $address = $this->get('address', ''); //地址
  268 +// $mobile = $this->get('mobile', ''); //手机号码
  269 +// $phone = $this->get('phone', ''); //固定电话
  270 + $order_code = 1615400071; //订单号
  271 + $user_name = '接口测试'; //收货人
  272 + $area_code = 321023; //区号
  273 + $address = '测试地址'; //地址
  274 + $mobile = 18021408798; //手机号码
  275 +// if (!$order_code || !$address_id) {
  276 +// $result = array('code' => 400, 'message' => '缺失必填项', 'data' => '');
  277 +// break;
  278 +// }
275 $result = OrderData::updateDeliveryAddress($order_code, $address_id, $user_name, $area_code, $address, $mobile, $phone); 279 $result = OrderData::updateDeliveryAddress($order_code, $address_id, $user_name, $area_code, $address, $mobile, $phone);
276 if (!isset($result['code'])) { 280 if (!isset($result['code'])) {
277 break; 281 break;