Files
gmTouringMiniApp/src/pages.json
T
周瑞哲 7ef4094788 fix(map): 收敛 regionchange 回写回路,修复选中标点后地图抽动
选中标点后地图在左右/上下反复抽动,根因是视口回写形成了自激回路:
map 的 longitude/latitude/scale 绑定到 store,而 regionchange 又无条件把
地图当前中心点写回 store —— 写 store 触发地图移动,移动结束回传一个
「差一点点」的中心点,再写回,再移动。上一个提交把中心点改成从
detail.centerLocation 同步读取后,回路里原本靠 getCenterLocation 异步跳变
掩盖住的这一点噪声就直接闭合了。

两道闸:
- 只接受手势造成的变化。causedBy 为 update(我们自己改绑定值或调
  includePoints 触发)时 store 已是权威值,不回写。老基础库拿不到
  causedBy 时退化到下一道闸。
- 所有回写走 commitViewport,经 isSignificantViewportChange 过滤掉小于
  1e-4 度 / 0.01 级的变化。远小于任何一次真实拖动,足以吸收量化噪声。

顺带修一个 H5 构建回归(1bcdd40 引入):uni 的 H5 路由生成器按路径推导
组件标识,pages/poi/detail 与 pages-poi/detail 都归一成 PagesPoiDetail,
重复声明导致 build:h5 失败。兼容跳板必须留在旧路径上,所以改名分包路由
pages-poi/detail -> pages-poi/poi-detail。
2026-08-03 11:08:39 +08:00

152 lines
4.0 KiB
JSON

{
"permission": {
"scope.userLocation": {
"desc": "用于地图定位、行程优化和到点打卡判断"
}
},
"requiredPrivateInfos": [
"getLocation",
"startLocationUpdate",
"onLocationChange"
],
"lazyCodeLoading": "requiredComponents",
"easycom": {
"custom": {
"^u--(.*)": "uview-plus/components/u-$1/u-$1.vue",
"^up-(.*)": "uview-plus/components/u-$1/u-$1.vue",
"^u-([^-].*)": "uview-plus/components/u-$1/u-$1.vue"
}
},
"pages": [
{
"path": "pages/map/index",
"type": "home",
"layout": "map",
"style": {
"navigationBarTitleText": "光明文旅地图",
"navigationBarBackgroundColor": "#ffffff",
"navigationBarTextStyle": "black",
"disableScroll": true
}
},
{
"path": "pages/assistant/index",
"type": "page",
"layout": "map",
"style": {
"navigationBarTitleText": "文旅助手",
"navigationBarBackgroundColor": "#ffffff",
"navigationBarTextStyle": "black",
"backgroundColor": "#f4f8f6"
}
},
{
"path": "pages/check-in/index",
"type": "page",
"layout": "map",
"style": {
"navigationBarTitleText": "点位打卡",
"navigationBarBackgroundColor": "#ffffff",
"navigationBarTextStyle": "black",
"backgroundColor": "#f4f8f6"
}
},
{
"path": "pages/check-in/records",
"type": "page",
"layout": "map",
"style": {
"navigationBarTitleText": "我的打卡",
"navigationBarBackgroundColor": "#ffffff",
"navigationBarTextStyle": "black",
"backgroundColor": "#f4f8f6"
}
},
{
"path": "pages/itinerary/index",
"type": "page",
"layout": "map",
"style": {
"navigationBarTitleText": "推荐路线",
"navigationBarBackgroundColor": "#ffffff",
"navigationBarTextStyle": "black",
"backgroundColor": "#f4f8f6"
}
},
{
"path": "pages/planner/index",
"type": "page",
"layout": "map",
"style": {
"navigationBarTitleText": "智能路线规划",
"navigationBarBackgroundColor": "#ffffff",
"navigationBarTextStyle": "black",
"backgroundColor": "#f4f8f6"
}
},
{
"path": "pages/poi/detail",
"type": "page",
"layout": "map",
"style": {
"navigationBarTitleText": "点位详情",
"navigationBarBackgroundColor": "#ffffff",
"navigationBarTextStyle": "black",
"backgroundColor": "#f5f7f6"
}
}
],
"globalStyle": {
"navigationBarBackgroundColor": "#ffffff",
"backgroundColor": "#f5f7f6",
"navigationBarTextStyle": "black",
"navigationBarTitleText": "光明文旅地图",
"app-plus": {
"titleNView": false
}
},
"tabBar": {
"color": "#718078",
"selectedColor": "#167a5b",
"backgroundColor": "#ffffff",
"borderStyle": "white",
"list": [
{
"pagePath": "pages/map/index",
"text": "全域地图",
"iconPath": "static/tabbar/map.png",
"selectedIconPath": "static/tabbar/map-selected.png"
},
{
"pagePath": "pages/assistant/index",
"text": "文旅助手",
"iconPath": "static/tabbar/assistant.png",
"selectedIconPath": "static/tabbar/assistant-selected.png"
},
{
"pagePath": "pages/planner/index",
"text": "路线规划",
"iconPath": "static/tabbar/planner.png",
"selectedIconPath": "static/tabbar/planner-selected.png"
}
]
},
"subPackages": [
{
"root": "pages-poi",
"pages": [
{
"path": "poi-detail",
"type": "page",
"layout": "map",
"style": {
"navigationBarTitleText": "点位详情",
"navigationBarBackgroundColor": "#ffffff",
"navigationBarTextStyle": "black",
"backgroundColor": "#f5f7f6"
}
}
]
}
]
}