@a5635268
2018-04-26T14:30:47.000000Z
字数 3156
阅读 782
接口文档
参数默认都是必传的,非必传的会有说明
都是通过POST方式请求
成功的status状态都为0
# 所有接口都要带上以下参数
api_secret = md5(md5(json_encode(post)) + 'Zq9&W*a3xP3xxceg#Q9JCzI4d');
采用跳转授权的方式
http://dev.mall.chamshare.cn/wap/Wap/Index/wxTransfer/uniacid/163?_url=http://www.baidu.com
_url显示的指定跳转的链接接着授权成功后回跳转回
https://www.baidu.com/?user_key=30af9e1dd2b96576c49bfd041955cd2d。以此得到user_key,该key的有效时间为30秒
api
http://dev.mallservice.chamshare.cn/park/Content/getToken
params
{
"user_key": "user_key——user_key", // 通过上面的链接获得
}
response
# success
{
"status": 0,
"data": {
'token': '用户标识token'
},
"message": "调用成功"
}
api
http://dev.mallservice.chamshare.cn/park/Content/recentCar
params
{
"token": "token",
}
response
{
"code": 0,
"message": "调用成功",
"data": {
"count": 4,
"list": [
{
"member_car_id": 4,
"member_id": 488786,
"car_plate_num": "沪C0C6T2",
"create_time": "2017-11-06 14:43:49"
},
{
"member_car_id": 3,
"member_id": 0,
"car_plate_num": "沪C0C6T2",
"create_time": "1970-01-01 08:00:00"
},
{
"member_car_id": 2,
"member_id": 488786,
"car_plate_num": "陕A3WQ75",
"create_time": "2017-11-06 14:43:49"
}
]
}
}
api
http://dev.mallservice.chamshare.cn/park/Content/myCoupon
params
{
"token": "token",
page,
page_size
}
response
{
"code": 0,
"message": "调用成功",
"data": {
"count": 1,
"list": [
{
"coupon_id": 42,
"title": "一小时停车券",
"status": 0,
"status_text": "未兑换",
"valid_stime": "1970-01-01 08:00:00",
"valid_etime": "1970-01-01 08:00:00",
"ctime": "2018-04-22 00:01:01"
}
]
}
}
api
http://dev.mallservice.chamshare.cn/park/Content/myIntegral
params
{
"token": "token"
}
response
{
"code": 0,
"message": "调用成功",
"data": {
"intergral_num": 250,
"phone": "18221995891"
}
}
api
http://dev.mallservice.chamshare.cn/park/Order/query
params
{
"token": "token",
page,
page_size
}
response
{
"code": 0,
"message": "调用成功",
"data": {
"count": 115,
"list": [
{
"order_no": "20180424143130001",
"car_plate_num": "陕A3WQ75",
"in_time": "1970-01-01 08:00:00", //进场时间
"out_time": "1970-01-01 08:00:00",
"coupon_free": "0.00", // 优惠券减免金额
"intergral_free": "0.00", // 积分减免金额
"payable_amount": "100.00", // 应付金额
"paid_amount": "100.00", // 实付金额
"create_time": "2018-04-24 18:45:31" // 支付时间
"pay_type": 0, // 支付方式
"pay_type_text": "其它", // 支付方式说明
}
]
}
api
http://dev.mallservice.chamshare.cn/park/Content/getJsSdk
params
{
"token": "token" // 请求后一看便知
}
api
http://dev.mallservice.chamshare.cn/park/Content/getCoupon
params
{
"token": "token" ,
"coupon_str" //上面扫描得来的二维码;
}
api
http://dev.mallservice.chamshare.cn/park/Order/computeCost
params
{
"token": "token" ,
"member_coupon_id" : 券id,
"car_plate_num" : 牌照,
"is_use_integral" : 1 // 是否用积分
}
return
{
"code": 0,
"message": "调用成功",
"data": {
"cost": 664, //价钱
payment : 实际支付
"car_plate_num": "沪A12345",
"in_time": "2018-3-26 14:09:40",
"out_time": "2018-4-26 14:09:55",
"coupon_data": {
"count": 13,
"list": [
{
"member_coupon_id": 3604,
"coupon_id": 43,
"title": "两小时停车券",
"deduct_money": 0,
"coupon_type": 2,
"status": 0,
"status_text": "未兑换",
"valid_stime": "2018-04-21 00:00:00",
"valid_etime": "2018-04-30 23:59:59",
"ctime": "2018-04-24 21:04:27"
},
{
"member_coupon_id": 3603,
"coupon_id": 43,
"title": "两小时停车券",
"deduct_money": 0,
"coupon_type": 2,
"status": 0,
"status_text": "未兑换",
"valid_stime": "1970-01-01 08:33:38",
"valid_etime": "1970-01-01 08:33:38",
"ctime": "2018-04-24 20:59:52"
}
},
"integral_data": {
"integral_num": 4999,
"is_usable": 1 // 1可以用 0不可以用
},
"use_integral": -500
}
}