Web UI
Start
From repository root:
python3 -m http.server 8123
Open:
- http://127.0.0.1:8123/web/device_query.html (设备查询)
- http://127.0.0.1:8123/web/brand_management.html (数据管理)
页面顶部有导航条(Gitea 风格):
设备查询数据管理
设备查询
Mode A: 客户端上报模式(新增)
字段按你给的上报方式输入:
- Android
platform=androidmodel_raw=Build.MODEL(例如SM-G9980)
- iOS
platform=iosmodel_raw=utsname.machine(例如iPhone14,2)
- 鸿蒙
platform=harmonymodel_raw(如果有就原样填)deviceInfo.marketName(页面里填marketName)deviceInfo.osFullName(页面里填osFullName)
说明:
- 鸿蒙模式下,
model_raw和marketName至少填一个。 - 页面会输出完整候选列表,并附带
report_payload方便核对上报值。
Mode B: 通用多字段模式(原有)
primaryName:
- Put the strongest identifier first, such as
iPhone14,5,M2102J2SC,L55M5-AD,SM-G9910.
extraNames (one line each):
- Paste all values you can get from client APIs, for example:
model=SM-G9910
device=star2qltechn
marketName=Galaxy S21
buildProduct=o1qzcx
brand:
- Optional. Supports aliases like
苹果,samsung,huawei,小米.
platform:
- iOS / Android / HarmonyOS / Unknown
Output
设备查询页会返回:
- best candidate
- complete ranked candidates
- normalized brand + parent manufacturer
- source rank/weight (from source order config)
- matched inputs
- matched normalized keys
- source markdown file and section
- full JSON output for direct integration or debugging
Data management
数据管理页支持:
- Independent maintenance:
- Brand list is maintained independently in the UI and initialized from index data on first load.
- Changes are stored in browser
localStorage.
- Alias normalization (brand only):
华为 / huawei / HUAWEIare normalized to brandHUAWEI.
- Brand-manufacturer relations:
- One brand has exactly one parent manufacturer.
- One manufacturer can contain multiple brands.
- Examples:
Xiaomimanufacturer includes brandsXiaomi,Redmi,POCO.vivomanufacturer includes brandsvivo,iQOO.OPPOmanufacturer includes brandsOPPO,OnePlus,realme.
- Click
品牌数 / 厂商数to open full list popup. 编辑品牌列表: popup edit.编辑品牌-厂商关系: popup edit.编辑品牌同义词: popup edit.- 数据来源管理(新增):
- Supports drag-and-drop source ordering.
- Ranking weight is higher for sources at the top.
- Initial order puts
*_cn.mdbefore non-cnsources.
Notes
- If browser blocks local file fetch, start HTTP server as above.
- You can also manually upload
dist/device_index.jsonin the page.