\jd_vopArea

Summary

Methods
Properties
Constants
__construct()
Req()
Province()
City()
County()
Town()
CheckArea()
GetJDAddressFromAddress()
No public properties found
No constants found
No protected methods found
$client_id
$username
$password_md5
$client_secret
N/A
No private methods found
No private properties found
N/A

Properties

$client_id

$client_id : 

Type

$username

$username : 

Type

$password_md5

$password_md5 : 

Type

$client_secret

$client_secret : 

Type

Methods

__construct()

__construct(  $client_id,   $username,   $password_md5,   $client_secret) 

Parameters

$client_id
$username
$password_md5
$client_secret

Req()

Req(\jd_vop\request\Request  $request, string  $response) : \jd_vop\response\Response

统一请求封装

Parameters

\jd_vop\request\Request $request

Request 对象 继承自request\Request

string $response

response 接收对象 实现 response\Response 接口

Throws

\jd_vop\exception\BizException
\jd_vop\exception\DataException
\jd_vop\exception\NetWorkException

Returns

\jd_vop\response\Response

Province()

Province(  $token) 

3.1 查询一级地址

Parameters

$token

string access token

Throws

\jd_vop\exception\NetWorkException
\jd_vop\exception\BizException
\jd_vop\exception\DataException

City()

City(  $token,   $province_id) 

3.2 查询二级地址

Parameters

$token

string access token

$province_id

int 一级地址ID

Throws

\jd_vop\exception\NetWorkException
\jd_vop\exception\BizException
\jd_vop\exception\DataException

County()

County(  $token,   $city_id) 

3.3 查询三级地址

Parameters

$token

string access token

$city_id

int 二级地址ID

Throws

\jd_vop\exception\NetWorkException
\jd_vop\exception\BizException
\jd_vop\exception\DataException

Town()

Town(  $token,   $county_id) 

3.4 查询四级地址

Parameters

$token

string access token

$county_id

int 三级地址id

Throws

\jd_vop\exception\NetWorkException
\jd_vop\exception\BizException
\jd_vop\exception\DataException

CheckArea()

CheckArea(  $token,   $province_id,   $city_id,   $county_id,   $town_id) 

3.5 验证地址有效性

Parameters

$token

string access token

$province_id

int 一级地址ID

$city_id

int 二级地址id

$county_id

int 三级地址id

$town_id

int 四级地址ID 若三级地址下无四级地址传0

Throws

\jd_vop\exception\NetWorkException
\jd_vop\exception\BizException
\jd_vop\exception\DataException

GetJDAddressFromAddress()

GetJDAddressFromAddress(  $token,   $address) 

3.6 地址详情转换京东地址编码

Parameters

$token

string access token

$address

string 详细地址

Throws

\jd_vop\exception\NetWorkException
\jd_vop\exception\BizException
\jd_vop\exception\DataException