请求例子:
apirq('line/specialline', {
method: "post",
data: {
"start_net_id": "d466b9497ccc7924",
"end_net_id": "c84dfc14b0fe119f",
"trans": [
"a6bf2a0c694e4117",
"1e23852bfc7ec92a"
],
"title": "测试添加专线",
"full_title": "测试专线",
"distance": "234154",
"duration": "24213",
"overtime_limit": 0,
"description": "这是一条测试添加的专线",
"base_price": 5,
"rate": {
"from": 30,
"to": 40,
"trans": [
20,
10
]
},
"charge": {
"gbw": [
{
"wmin": 0,
"wmax": 3,
"wdj": 1.7,
"wxfl": 3,
"wdesc": "从0到3千克单价为1.7元,多线时下浮百分之3",
"wformula": "[[wgt]]*1.7*(1-[[mul]]*0.03)"
},
{
"wmin": 3,
"wmax": 20,
"wdj": 1.6,
"wxfl": 3,
"wdesc": "从3到20千克单价为1.6元,多线时下浮百分之3",
"wformula": "[[wgt]]*1.6*(1-[[mul]]*0.03)"
},
{
"wmin": 20,
"wmax": 100,
"wdj": 1.1,
"wxfl": 6,
"wdesc": "从20到100千克单价为1.1元,多线时下浮百分之6",
"wformula": "[[wgt]]*1.1*(1-[[mul]]*0.06)"
}
],
"gbv": [
{
"vmin": 0,
"vmax": 20,
"vdj": 8.9,
"vxfl": 3,
"vdesc": "从0到20方单价为8.9元,多线时下浮百分之3",
"vformula": "[[vol]]*8.9*(1-[[mul]]*0.03)"
},
{
"vmin": 20,
"vmax": 80,
"vdj": 8.5,
"vxfl": 5,
"vdesc": "从20到80方单价为8.5元,多线时下浮百分之5",
"vformula": "[[vol]]*8.5*(1-[[mul]]*0.05)"
}
]
}
}
})
返回数据结果:
{
"code": 0,
"msg": "ok",
"time": "1524030941",
"data": {
"start_net_id": "d466b9497ccc7924",
"end_net_id": "c84dfc14b0fe119f",
"trans": [
"a6bf2a0c694e4117",
"1e23852bfc7ec92a"
],
"title": "测试添加专线",
"full_title": "测试专线",
"distance": 234154,
"duration": 24213,
"overtime_limit": 0,
"description": "这是一条测试添加的专线",
"base_price": 5,
"rate": {
"from": 30,
"to": 40,
"trans": [
20,
10
]
},
"charge": {
"gbv": [
{
"vdesc": "从0到20方单价为8.9元,多线时下浮百分之3",
"vdj": 8.9,
"vformula": "[[vol]]*8.9*(1-[[mul]]*0.03)",
"vmax": 20,
"vmin": 0,
"vxfl": 3
},
{
"vdesc": "从20到80方单价为8.5元,多线时下浮百分之5",
"vdj": 8.5,
"vformula": "[[vol]]*8.5*(1-[[mul]]*0.05)",
"vmax": 80,
"vmin": 20,
"vxfl": 5
}
],
"gbw": [
{
"wdesc": "从0到3千克单价为1.7元,多线时下浮百分之3",
"wdj": 1.7,
"wformula": "[[wgt]]*1.7*(1-[[mul]]*0.03)",
"wmax": 3,
"wmin": 0,
"wxfl": 3
},
{
"wdesc": "从3到20千克单价为1.6元,多线时下浮百分之3",
"wdj": 1.6,
"wformula": "[[wgt]]*1.6*(1-[[mul]]*0.03)",
"wmax": 20,
"wmin": 3,
"wxfl": 3
},
{
"wdesc": "从20到100千克单价为1.1元,多线时下浮百分之6",
"wdj": 1.1,
"wformula": "[[wgt]]*1.1*(1-[[mul]]*0.06)",
"wmax": 100,
"wmin": 20,
"wxfl": 6
}
]
},
"signature": "a938136aebf02e528fed0b140ce00baa",
"type": 1,
"initials": "cstjzx",
"protocol_notpass": ",d466b9497ccc7924,a6bf2a0c694e4117,1e23852bfc7ec92a,c84dfc14b0fe119f,",
"path_ids": ",d466b9497ccc7924,a6bf2a0c694e4117,1e23852bfc7ec92a,c84dfc14b0fe119f,",
"path_data": "{\"line_type\":1,\"total_base_price\":5,\"is_multi\":true,\"path_ids\":\",d466b9497ccc7924,a6bf2a0c694e4117,1e23852bfc7ec92a,c84dfc14b0fe119f,\",\"charge_main\":{\"gbv\":[{\"vdesc\":\"\\u4ece0\\u523020\\u65b9\\u5355\\u4ef7\\u4e3a8.9\\u5143\\uff0c\\u591a\\u7ebf\\u65f6\\u4e0b\\u6d6e\\u767e\\u5206\\u4e4b3\",\"vdj\":8.9,\"vformula\":\"[[vol]]*8.9*(1-[[mul]]*0.03)\",\"vmax\":20,\"vmin\":0,\"vxfl\":3},{\"vdesc\":\"\\u4ece20\\u523080\\u65b9\\u5355\\u4ef7\\u4e3a8.5\\u5143\\uff0c\\u591a\\u7ebf\\u65f6\\u4e0b\\u6d6e\\u767e\\u5206\\u4e4b5\",\"vdj\":8.5,\"vformula\":\"[[vol]]*8.5*(1-[[mul]]*0.05)\",\"vmax\":80,\"vmin\":20,\"vxfl\":5}],\"gbw\":[{\"wdesc\":\"\\u4ece0\\u52303\\u5343\\u514b\\u5355\\u4ef7\\u4e3a1.7\\u5143\\uff0c\\u591a\\u7ebf\\u65f6\\u4e0b\\u6d6e\\u767e\\u5206\\u4e4b3\",\"wdj\":1.7,\"wformula\":\"[[wgt]]*1.7*(1-[[mul]]*0.03)\",\"wmax\":3,\"wmin\":0,\"wxfl\":3},{\"wdesc\":\"\\u4ece3\\u523020\\u5343\\u514b\\u5355\\u4ef7\\u4e3a1.6\\u5143\\uff0c\\u591a\\u7ebf\\u65f6\\u4e0b\\u6d6e\\u767e\\u5206\\u4e4b3\",\"wdj\":1.6,\"wformula\":\"[[wgt]]*1.6*(1-[[mul]]*0.03)\",\"wmax\":20,\"wmin\":3,\"wxfl\":3},{\"wdesc\":\"\\u4ece20\\u5230100\\u5343\\u514b\\u5355\\u4ef7\\u4e3a1.1\\u5143\\uff0c\\u591a\\u7ebf\\u65f6\\u4e0b\\u6d6e\\u767e\\u5206\\u4e4b6\",\"wdj\":1.1,\"wformula\":\"[[wgt]]*1.1*(1-[[mul]]*0.06)\",\"wmax\":100,\"wmin\":20,\"wxfl\":6}]},\"sections_divide\":[{\"sort\":0,\"net_id\":\"d466b9497ccc7924\",\"rate\":30,\"base_price\":1.5},{\"sort\":1,\"net_id\":\"a6bf2a0c694e4117\",\"rate\":20,\"base_price\":1},{\"sort\":2,\"net_id\":\"1e23852bfc7ec92a\",\"rate\":10,\"base_price\":0.5},{\"sort\":3,\"net_id\":\"c84dfc14b0fe119f\",\"rate\":40,\"base_price\":2}],\"sublines_conf\":[{\"sort\":0,\"net_from\":\"d466b9497ccc7924\",\"net_to\":\"a6bf2a0c694e4117\",\"sub_rate\":38,\"all_rate_from\":30,\"all_rate_to\":8,\"sub_rate_from\":78.947368421053,\"sub_rate_to\":21.052631578947},{\"sort\":1,\"net_from\":\"a6bf2a0c694e4117\",\"net_to\":\"1e23852bfc7ec92a\",\"sub_rate\":16,\"all_rate_from\":12,\"all_rate_to\":4,\"sub_rate_from\":75,\"sub_rate_to\":25},{\"sort\":2,\"net_from\":\"1e23852bfc7ec92a\",\"net_to\":\"c84dfc14b0fe119f\",\"sub_rate\":46,\"all_rate_from\":6,\"all_rate_to\":40,\"sub_rate_from\":13.04347826087,\"sub_rate_to\":86.95652173913}]}",
"line_id": "a685ede5450a6836",
"create_by": "0000000000000001",
"update_by": "0000000000000001",
"create_time": "2018-04-18 13:55:41",
"update_time": "2018-04-18 13:55:41"
}
}