Repository navigation
Expand file tree
/
Copy pathconfig-fields.json
More file actions
65 lines (65 loc) · 11.7 KB
/
Copy pathconfig-fields.json
File metadata and controls
65 lines (65 loc) · 11.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
{
"说明": "配置项的唯一定义。Python(carpool.FIELDS、DEFAULTS)、编辑页(占位、校验、中文名)都从这里读,规则页默认值表和 trip.example.toml 由测试核对。改默认值、范围、中文名只改这里。每项:path 路径(people[] 表示每位成员)、type 类型、default 默认值(没有固定默认值的用 default_from 指向取值的项,或用 default_note 写明)、min/max 范围、unit 单位、label 中文名、hint 说明、section 所属分段、choices 可选值、rules_table 是否列进规则页默认值表、placeholder 无默认值时的输入框示例。",
"sections": {"venue": "目的地", "options": "选项", "return": "返程", "suggest": "找站设置", "stations": "候选站", "people": "成员"},
"fields": [
{"path": "venue.name", "type": "text", "label": "目的地名称", "section": "venue"},
{"path": "venue.address", "type": "text", "label": "目的地地址", "section": "venue"},
{"path": "venue.location", "type": "text", "label": "目的地坐标", "section": "venue", "hint": "经度,纬度(高德坐标);填了就不再按地址解析"},
{"path": "venue.city", "type": "text", "label": "目的地所在城市", "section": "venue", "hint": "地址解析不准时用来限定城市"},
{"path": "options.max_detour_min", "type": "number", "label": "默认最多绕路", "section": "options", "default": 30, "min": 0, "unit": "分钟", "rules_table": true, "hint": "车主默认最多愿意为接人多绕几分钟,可以按人单独设"},
{"path": "options.max_stops", "type": "integer", "label": "每车最多停几次", "section": "options", "default": 2, "min": 0, "unit": "次", "rules_table": true, "hint": "每辆车最多停几个接人点"},
{"path": "options.travel_date", "type": "date", "label": "出发日期", "section": "options", "placeholder": "YYYY-MM-DD", "default_note": "明天", "hint": "用来估算不开车的人坐公共交通到各站要多久"},
{"path": "options.travel_time", "type": "time", "label": "出发时间", "section": "options", "default": "08:00", "rules_table": true, "hint": "公交估算的出发时刻"},
{"path": "options.estimate_rail", "type": "boolean", "label": "估算公共交通", "section": "options", "default": true, "hint": "不想估算公共交通时关掉(少调用接口)"},
{"path": "options.station_cost_min", "type": "number", "label": "到站用时的估值", "section": "options", "default": 60, "min": 0, "unit": "分钟", "rules_table": true, "hint": "查不到乘客到站用时时,每个站按这个数算"},
{"path": "options.station_access_min", "type": "number", "label": "去车站+候车", "section": "options", "default": 45, "min": 0, "unit": "分钟", "rules_table": true, "hint": "填了车次时,去车站和候车的时间"},
{"path": "options.exit_buffer_min", "type": "number", "label": "下车到上车", "section": "options", "default": 15, "min": 0, "unit": "分钟", "rules_table": true, "hint": "列车到站后出站、走到接人点"},
{"path": "options.outbound", "type": "boolean", "label": "规划去程", "section": "options", "default": true},
{"path": "options.taxi_mode", "type": "choice", "label": "打车方式", "section": "options", "default": "save", "rules_table": true, "choices": [{"value": "save", "label": "尽量拼车省钱"}, {"value": "fast", "label": "各人走自己最快的站"}], "hint": "没搭上车的人另外打车时怎么安排"},
{"path": "options.ride_extra_min", "type": "number", "label": "搭车最多多花", "section": "options", "default": 30, "min": 0, "unit": "分钟", "rules_table": true, "hint": "为了多带一个人,搭顺风车的人最多比他自己单独打车多花几分钟(不算等人)"},
{"path": "options.taxi_pool_extra_min", "type": "number", "label": "拼车最多多花", "section": "options", "default": 30, "min": 0, "unit": "分钟", "rules_table": true, "hint": "为了拼车,一个人最多比他自己最快的走法多花几分钟"},
{"path": "options.taxi_wait_min", "type": "number", "label": "拼一辆的时间差", "section": "options", "default": 30, "min": 0, "unit": "分钟", "rules_table": true, "hint": "同一辆出租里的人,到站或离场的时间最多相差几分钟"},
{"path": "options.discover_radius_km", "type": "number", "label": "自动找站的范围", "section": "options", "default": 120, "min": 0, "unit": "公里", "rules_table": true, "hint": "没写候选站时,自动搜索目的地周围多大范围内的火车站"},
{"path": "options.discover_limit", "type": "integer", "label": "自动找站最多留几个", "section": "options", "default": 10, "min": 0, "unit": "个", "rules_table": true},
{"path": "return.enabled", "type": "boolean", "label": "开关", "section": "return", "default": false},
{"path": "return.depart_time", "type": "time", "label": "散场后几点出发", "section": "return", "placeholder": "20:30", "hint": "车主几点从场地出发;没填离场时间的人也从这时走"},
{"path": "return.security_min", "type": "number", "label": "发车前多久到站", "section": "return", "default": 40, "min": 0, "unit": "分钟", "rules_table": true, "hint": "回程车次发车前多久要到站"},
{"path": "return.max_wait_min", "type": "number", "label": "乘客最多等车主", "section": "return", "default": 30, "min": 0, "unit": "分钟", "rules_table": true, "hint": "返程时,乘客准备好后最多等车主多久"},
{"path": "return.date", "type": "date", "label": "返程日期", "section": "return", "placeholder": "YYYY-MM-DD", "default_note": "同出发日期", "hint": "只规划返程时必填"},
{"path": "options.suggest.areas", "type": "multi", "label": "在哪些地方找", "section": "suggest", "default": ["dest", "owner_home", "owner_route"], "choices": [{"value": "dest", "label": "目的地周边"}, {"value": "owner_home", "label": "车主出发地附近"}, {"value": "owner_route", "label": "车主路上"}, {"value": "rider_home", "label": "乘客出发地附近"}]},
{"path": "options.suggest.route_cover", "type": "choice", "label": "车主路上怎么圈范围", "section": "suggest", "default": "along", "choices": [{"value": "along", "label": "沿路线取点"}, {"value": "detour", "label": "绕路上限内全覆盖"}], "hint": "全覆盖按每位车主的绕路上限圈出范围,更全,但搜索次数更多"},
{"path": "options.suggest.dest_radius_km", "type": "number", "label": "目的地周边多大范围", "section": "suggest", "default": 90, "min": 30, "max": 150, "unit": "公里"},
{"path": "options.suggest.home_radius_km", "type": "number", "label": "出发地附近多大范围", "section": "suggest", "default": 30, "min": 10, "max": 50, "unit": "公里"},
{"path": "options.suggest.route_step_km", "type": "number", "label": "车主路上每隔多远找一次", "section": "suggest", "default": 30, "min": 10, "max": 60, "unit": "公里"},
{"path": "options.suggest.route_radius_km", "type": "number", "label": "车主路上每次找多大范围", "section": "suggest", "default": 25, "min": 5, "max": 60, "unit": "公里", "greater_than": {"path": "options.suggest.route_step_km", "factor": 0.5}, "hint": "要大于间隔的一半,两圈之间才连得上"},
{"path": "options.suggest.drivers", "type": "list", "label": "用哪几位车主的路线", "section": "suggest", "default_note": "全部车主"},
{"path": "options.suggest.route_strategy", "type": "choice", "label": "车主路线怎么走", "section": "suggest", "default": 0, "choices": [{"value": 0, "label": "高德默认(速度优先)"}, {"value": 12, "label": "躲避拥堵"}, {"value": 13, "label": "不走高速"}, {"value": 14, "label": "避免收费"}, {"value": 19, "label": "高速优先"}], "hint": "对应高德驾车路径规划的 strategy"},
{"path": "options.suggest.alt_routes", "type": "boolean", "label": "也沿备选路线找", "section": "suggest", "default": false, "hint": "开:高德给的最多 3 条路线都取点,能照顾到平行的高速"},
{"path": "options.suggest.max_searches", "type": "integer", "label": "每次最多搜索几次", "section": "suggest", "default": 80, "min": 20, "max": 200, "unit": "次", "hint": "到上限就停,结果里写明可能没列全"},
{"path": "options.suggest.sort", "type": "choice", "label": "怎么排序", "section": "suggest", "default": "detour", "choices": [{"value": "detour", "label": "车主最少绕路"}, {"value": "dest", "label": "到目的地最近"}, {"value": "rider_home", "label": "离乘客家最近"}], "hint": "离乘客家最近只在找了乘客出发地附近时可选"},
{"path": "options.suggest.over_limit", "type": "choice", "label": "超过车主绕路上限的站", "section": "suggest", "default": "show", "choices": [{"value": "show", "label": "照常列出,标明超过上限,不默认勾选"}, {"value": "hide", "label": "直接不显示"}]},
{"path": "options.suggest.show_count", "type": "integer", "label": "最多显示几个", "section": "suggest", "default": 15, "min": 5, "max": 30, "unit": "个"},
{"path": "options.suggest.checked_count", "type": "integer", "label": "默认勾选几个", "section": "suggest", "default": 6, "min": 0, "max": 30, "unit": "个", "hint": "不能超过显示个数"},
{"path": "options.suggest.filter_12306", "type": "boolean", "label": "用 12306 站名表过滤", "section": "suggest", "default": true, "hint": "关掉会混进货运站"},
{"path": "stations[].name", "type": "text", "label": "站名", "section": "stations"},
{"path": "stations[].city", "type": "text", "label": "城市", "section": "stations"},
{"path": "stations[].location", "type": "text", "label": "坐标", "section": "stations"},
{"path": "people[].name", "type": "text", "label": "名字", "section": "people"},
{"path": "people[].from", "type": "text", "label": "出发地", "section": "people"},
{"path": "people[].city", "type": "text", "label": "城市", "section": "people"},
{"path": "people[].location", "type": "text", "label": "坐标", "section": "people"},
{"path": "people[].car_seats", "type": "integer", "label": "空座", "section": "people", "min": 1, "default_note": "不开车"},
{"path": "people[].max_detour_min", "type": "number", "label": "最多绕路", "section": "people", "min": 0, "unit": "分钟", "default_from": "options.max_detour_min"},
{"path": "people[].pickup_at_home", "type": "boolean", "label": "到家附近接", "section": "people", "default": true},
{"path": "people[].party", "type": "integer", "label": "同行人数", "section": "people", "default": 1, "min": 1, "unit": "人", "hint": "含自己;这组人一起上同一辆车,或者一起打车"},
{"path": "people[].note", "type": "text", "label": "备注", "section": "people"},
{"path": "people[].stations", "type": "list", "label": "只考虑这些站", "section": "people"},
{"path": "people[].trains", "type": "map", "label": "到各站的车次", "section": "people"},
{"path": "people[].rail_min", "type": "map", "label": "到各站的用时", "section": "people", "min": 0, "unit": "分钟"},
{"path": "people[].return_drives", "type": "boolean", "label": "返程是否开车", "section": "people", "default": true},
{"path": "people[].return_max_detour_min", "type": "number", "label": "返程最多绕路", "section": "people", "min": 0, "unit": "分钟", "default_note": "同去程"},
{"path": "people[].return_trains", "type": "map", "label": "返程车次", "section": "people"},
{"path": "people[].return_rail_min", "type": "map", "label": "返程用时", "section": "people", "min": 0, "unit": "分钟"},
{"path": "people[].leave_time", "type": "time", "label": "离场时间", "section": "people", "default_from": "return.depart_time", "default_note": "同散场时间", "hint": "返程时这个人几点离开场地;车主的离场时间就是车的出发时间"}
]
}