Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHOBUYPC
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
2
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
cailing
9 years ago
Commit
25da92e6eded108a9212277bfe1b91d3f0449258
1 parent
6b11ca79
修改地址
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
35 deletions
library/LibModels/Web/Home/OrderData.php
yohobuy/www.yohobuy.com/application/modules/Home/controllers/Orders.php
library/LibModels/Web/Home/OrderData.php
View file @
25da92e
...
...
@@ -185,8 +185,10 @@ class OrderData
$param
[
'area_code'
]
=
$area_code
;
$param
[
'address'
]
=
$address
;
$param
[
'mobile'
]
=
$mobile
;
// $param['phone'] = $phone;
$param
[
'debug'
]
=
'XYZ'
;
if
(
$phone
){
$param
[
'phone'
]
=
$phone
;
}
// $param['debug'] = 'XYZ';
$param
[
'client_secret'
]
=
Sign
::
getSign
(
$param
);
// 调用接口获得数据
...
...
yohobuy/www.yohobuy.com/application/modules/Home/controllers/Orders.php
View file @
25da92e
...
...
@@ -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
);
...
...
Please
register
or
login
to post a comment