map.wxml 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522
  1. <view class="page">
  2. <view
  3. class="app-edge-glow app-edge-glow--{{panelTelemetryTone}}"
  4. wx:if="{{panelTelemetryTone === 'orange' || panelTelemetryTone === 'red'}}"
  5. ></view>
  6. <view
  7. class="map-stage"
  8. catchtouchstart="handleTouchStart"
  9. catchtouchmove="handleTouchMove"
  10. catchtouchend="handleTouchEnd"
  11. catchtouchcancel="handleTouchCancel"
  12. >
  13. <view class="map-content">
  14. <canvas
  15. id="mapCanvas"
  16. type="webgl"
  17. canvas-id="mapCanvas"
  18. class="map-canvas map-canvas--base"
  19. ></canvas>
  20. <canvas
  21. id="routeLabelCanvas"
  22. type="2d"
  23. canvas-id="routeLabelCanvas"
  24. class="map-canvas map-canvas--labels"
  25. ></canvas>
  26. </view>
  27. <view class="map-stage__crosshair"></view>
  28. <view class="map-stage__map-pulse {{mapPulseFxClass}}" wx:if="{{mapPulseVisible}}" style="left: {{mapPulseLeftPx}}px; top: {{mapPulseTopPx}}px;"></view>
  29. <view class="map-stage__stage-fx {{stageFxClass}}" wx:if="{{stageFxVisible}}"></view>
  30. <view class="game-punch-hint" wx:if="{{punchHintText}}">{{punchHintText}}</view>
  31. <view class="game-punch-feedback game-punch-feedback--{{punchFeedbackTone}} {{punchFeedbackFxClass}}" wx:if="{{punchFeedbackVisible}}">{{punchFeedbackText}}</view>
  32. <view class="game-content-card {{contentCardFxClass}}" wx:if="{{contentCardVisible}}" bindtap="handleCloseContentCard">
  33. <view class="game-content-card__title">{{contentCardTitle}}</view>
  34. <view class="game-content-card__body">{{contentCardBody}}</view>
  35. <view class="game-content-card__hint">点击关闭</view>
  36. </view>
  37. <view class="map-stage__overlay">
  38. <view class="map-stage__bottom">
  39. <view class="compass-widget">
  40. <view class="compass-widget__heading">{{sensorHeadingText}}</view>
  41. <view class="compass-widget__edge-arrow"></view>
  42. <view class="compass-widget__dial {{orientationMode === 'heading-up' ? 'compass-widget__dial--active' : ''}}">
  43. <view class="compass-widget__glass"></view>
  44. <view class="compass-widget__inner-shadow"></view>
  45. <view class="compass-widget__card" style="transform: rotate({{rotationDeg}}deg);">
  46. <image class="compass-widget__north-arrow" src="../../assets/compass-north-arrow.svg" mode="aspectFit"></image>
  47. <view wx:for="{{compassTicks}}" wx:key="angle" class="compass-widget__tick-anchor" style="transform: translate(-50%, -50%) rotate({{item.angle}}deg);">
  48. <view class="compass-widget__tick {{item.long ? 'compass-widget__tick--long' : 'compass-widget__tick--short'}} {{item.major ? 'compass-widget__tick--major' : ''}}"></view>
  49. </view>
  50. <view wx:for="{{compassLabels}}" wx:key="text" class="compass-widget__mark-anchor" style="transform: translate(-50%, -50%) rotate({{item.angle}}deg);">
  51. <view class="compass-widget__mark {{item.className}}" style="transform: translate(-50%, -50%) translateY(-{{item.radius}}rpx) rotate({{item.rotateBack}}deg);">{{item.text}}</view>
  52. </view>
  53. </view>
  54. <view class="compass-widget__needle-anchor" style="transform: translate(-50%, -50%) rotate({{compassNeedleDeg}}deg);">
  55. <view class="compass-widget__needle-north"></view>
  56. <view class="compass-widget__needle-south"></view>
  57. </view>
  58. <view class="compass-widget__hub"></view>
  59. <view class="compass-widget__hub-core"></view>
  60. </view>
  61. <view class="compass-widget__hint" wx:if="{{compassDeclinationText}}">{{compassDeclinationText}}</view>
  62. </view>
  63. </view>
  64. </view>
  65. </view>
  66. <cover-view class="map-side-toggle" wx:if="{{!showDebugPanel}}" style="top: {{topInsetHeight}}px;" bindtap="handleCycleSideButtons">
  67. <cover-view class="map-side-button map-side-button--icon">
  68. <cover-image wx:if="{{sideButtonMode === 'left'}}" class="map-side-button__image" src="../../assets/btn_more2.png"></cover-image>
  69. <cover-image wx:elif="{{sideButtonMode === 'hidden'}}" class="map-side-button__image" src="../../assets/btn_more1.png"></cover-image>
  70. <cover-image wx:else class="map-side-button__image" src="../../assets/btn_more3.png"></cover-image>
  71. </cover-view>
  72. </cover-view>
  73. <cover-view class="map-side-column map-side-column--left map-side-column--left-group" wx:if="{{!showDebugPanel && showLeftButtonGroup}}" style="top: {{topInsetHeight}}px;">
  74. <cover-view class="map-side-button map-side-button--icon" bindtap="handleToggleMapRotateMode"><cover-image class="map-side-button__rotate-image {{orientationMode === 'heading-up' ? 'map-side-button__rotate-image--active' : ''}}" src="../../assets/btn_map_rotate_cropped.png"></cover-image></cover-view>
  75. <cover-view class="map-side-button map-side-button--muted"><cover-view class="map-side-button__text">LOC</cover-view></cover-view>
  76. <cover-view class="map-side-button"><cover-view class="map-side-button__text">LOCK</cover-view></cover-view>
  77. <cover-view class="map-side-button map-side-button--active"><cover-view class="map-side-button__text">SUN</cover-view></cover-view>
  78. <cover-view class="map-side-button"><cover-view class="map-side-button__text">EXIT</cover-view></cover-view>
  79. </cover-view>
  80. <cover-view class="map-side-column map-side-column--right-main" wx:if="{{!showDebugPanel && showRightButtonGroups}}" style="top: {{topInsetHeight}}px;">
  81. <cover-view class="map-side-button"><cover-view class="map-side-button__text">N</cover-view></cover-view>
  82. <cover-view class="map-side-button map-side-button--active"><cover-view class="map-side-button__text">DIR</cover-view></cover-view>
  83. <cover-view class="map-side-button"><cover-view class="map-side-button__text">COMP</cover-view></cover-view>
  84. <cover-view class="map-side-button map-side-button--active"><cover-view class="map-side-button__text">GUIDE</cover-view></cover-view>
  85. <cover-view class="map-side-button map-side-button--muted"><cover-view class="map-side-button__text">NET</cover-view></cover-view>
  86. <cover-view class="map-side-button map-side-button--active"><cover-view class="map-side-button__text">GO</cover-view></cover-view>
  87. </cover-view>
  88. <cover-view class="map-side-column map-side-column--right-sub" wx:if="{{!showDebugPanel && showRightButtonGroups}}" style="top: {{topInsetHeight}}px;">
  89. <cover-view class="map-side-button"><cover-view class="map-side-button__text">INFO</cover-view></cover-view>
  90. <cover-view class="map-side-button"><cover-view class="map-side-button__text">SET</cover-view></cover-view>
  91. <cover-view class="map-side-button"><cover-view class="map-side-button__text">m</cover-view></cover-view>
  92. <cover-view class="map-side-button"><cover-view class="map-side-button__text">PIN</cover-view></cover-view>
  93. <cover-view class="map-side-button"><cover-view class="map-side-button__text">LIST</cover-view></cover-view>
  94. <cover-view class="map-side-button"><cover-view class="map-side-button__text">USER</cover-view></cover-view>
  95. </cover-view>
  96. <cover-view class="map-punch-button {{punchButtonEnabled ? 'map-punch-button--active' : ''}} {{punchButtonFxClass}}" wx:if="{{!showDebugPanel}}" bindtap="handlePunchAction">
  97. <cover-view class="map-punch-button__text">{{punchButtonText}}</cover-view>
  98. </cover-view>
  99. <cover-view class="screen-button-layer screen-button-layer--start-left" wx:if="{{!showDebugPanel && showBottomDebugButton && gameSessionStatus === 'idle'}}" bindtap="handleStartGame">
  100. <cover-view class="screen-button-layer__text screen-button-layer__text--start">开始</cover-view>
  101. </cover-view>
  102. <cover-view class="screen-button-layer screen-button-layer--bottom-left" wx:if="{{!showDebugPanel && showBottomDebugButton}}" bindtap="handleToggleDebugPanel">
  103. <cover-view class="screen-button-layer__icon">
  104. <cover-view class="screen-button-layer__line"></cover-view>
  105. <cover-view class="screen-button-layer__stand"></cover-view>
  106. </cover-view>
  107. <cover-view class="screen-button-layer__text">调试</cover-view>
  108. </cover-view>
  109. <swiper class="race-panel-swiper" current="{{hudPanelIndex}}" bindchange="handleHudPanelChange" duration="220" easing-function="easeOutCubic">
  110. <swiper-item>
  111. <view class="race-panel race-panel--tone-{{panelTelemetryTone}}">
  112. <view class="race-panel__tag race-panel__tag--top-left">{{panelActionTagText}}</view>
  113. <view class="race-panel__tag race-panel__tag--top-right">里程</view>
  114. <view class="race-panel__tag race-panel__tag--bottom-left">{{panelDistanceTagText}}</view>
  115. <view class="race-panel__tag race-panel__tag--bottom-right">速度</view>
  116. <view class="race-panel__line race-panel__line--center"></view>
  117. <view class="race-panel__line race-panel__line--left-mid"></view>
  118. <view class="race-panel__line race-panel__line--right-mid"></view>
  119. <view class="race-panel__line race-panel__line--left-top"></view>
  120. <view class="race-panel__line race-panel__line--left-bottom"></view>
  121. <view class="race-panel__line race-panel__line--right-top"></view>
  122. <view class="race-panel__line race-panel__line--right-bottom"></view>
  123. <view class="race-panel__grid">
  124. <view class="race-panel__cell race-panel__cell--action">
  125. <view class="race-panel__action-button"><!-- status only -->
  126. <view class="race-panel__action-button-text">{{punchButtonText}}</view>
  127. </view>
  128. </view>
  129. <view class="race-panel__cell race-panel__cell--timer">
  130. <text class="race-panel__timer">{{panelTimerText}}</text>
  131. </view>
  132. <view class="race-panel__cell race-panel__cell--mileage">
  133. <view class="race-panel__mileage-wrap">
  134. <text class="race-panel__mileage">{{panelMileageText}}</text>
  135. <view class="race-panel__chevrons">
  136. <view class="race-panel__chevron"></view>
  137. <view class="race-panel__chevron race-panel__chevron--offset"></view>
  138. </view>
  139. </view>
  140. </view>
  141. <view class="race-panel__cell race-panel__cell--distance">
  142. <view class="race-panel__metric-group race-panel__metric-group--left">
  143. <text class="race-panel__metric-value race-panel__metric-value--distance">{{panelDistanceValueText}}</text>
  144. <text class="race-panel__metric-unit race-panel__metric-unit--distance">{{panelDistanceUnitText}}</text>
  145. </view>
  146. </view>
  147. <view class="race-panel__cell race-panel__cell--progress">
  148. <text class="race-panel__progress">{{panelProgressText}}</text>
  149. </view>
  150. <view class="race-panel__cell race-panel__cell--speed">
  151. <view class="race-panel__metric-group race-panel__metric-group--right">
  152. <text class="race-panel__metric-value race-panel__metric-value--speed">{{panelSpeedValueText}}</text>
  153. <text class="race-panel__metric-unit race-panel__metric-unit--speed">km/h</text>
  154. </view>
  155. </view>
  156. </view>
  157. </view>
  158. </swiper-item>
  159. <swiper-item>
  160. <view class="race-panel race-panel--tone-{{panelTelemetryTone}}">
  161. <view class="race-panel__tag race-panel__tag--top-left">心率</view>
  162. <view class="race-panel__tag race-panel__tag--top-right">卡路里</view>
  163. <view class="race-panel__tag race-panel__tag--bottom-left">均速</view>
  164. <view class="race-panel__tag race-panel__tag--bottom-right">精度</view>
  165. <view class="race-panel__line race-panel__line--center"></view>
  166. <view class="race-panel__line race-panel__line--left-mid"></view>
  167. <view class="race-panel__line race-panel__line--right-mid"></view>
  168. <view class="race-panel__line race-panel__line--left-top"></view>
  169. <view class="race-panel__line race-panel__line--left-bottom"></view>
  170. <view class="race-panel__line race-panel__line--right-top"></view>
  171. <view class="race-panel__line race-panel__line--right-bottom"></view>
  172. <view class="race-panel__grid">
  173. <view class="race-panel__cell race-panel__cell--action">
  174. <view class="race-panel__metric-group race-panel__metric-group--left race-panel__metric-group--panel">
  175. <text class="race-panel__metric-value race-panel__metric-value--telemetry">{{panelHeartRateValueText}}</text>
  176. <text class="race-panel__metric-unit race-panel__metric-unit--telemetry">{{panelHeartRateUnitText}}</text>
  177. </view>
  178. </view>
  179. <view class="race-panel__cell race-panel__cell--timer">
  180. <text class="race-panel__timer">{{panelTimerText}}</text>
  181. </view>
  182. <view class="race-panel__cell race-panel__cell--mileage">
  183. <view class="race-panel__metric-group race-panel__metric-group--right race-panel__metric-group--panel">
  184. <text class="race-panel__metric-value race-panel__metric-value--telemetry">{{panelCaloriesValueText}}</text>
  185. <text class="race-panel__metric-unit race-panel__metric-unit--telemetry">{{panelCaloriesUnitText}}</text>
  186. </view>
  187. </view>
  188. <view class="race-panel__cell race-panel__cell--distance">
  189. <view class="race-panel__metric-group race-panel__metric-group--left race-panel__metric-group--panel">
  190. <text class="race-panel__metric-value race-panel__metric-value--telemetry-secondary">{{panelAverageSpeedValueText}}</text>
  191. <text class="race-panel__metric-unit race-panel__metric-unit--telemetry">{{panelAverageSpeedUnitText}}</text>
  192. </view>
  193. </view>
  194. <view class="race-panel__cell race-panel__cell--progress">
  195. <view class="race-panel__zone">
  196. <text class="race-panel__zone-name">{{panelHeartRateZoneNameText}}</text>
  197. <text class="race-panel__zone-range">{{panelHeartRateZoneRangeText}}</text>
  198. </view>
  199. </view>
  200. <view class="race-panel__cell race-panel__cell--speed">
  201. <view class="race-panel__metric-group race-panel__metric-group--right race-panel__metric-group--panel">
  202. <text class="race-panel__metric-value race-panel__metric-value--telemetry-secondary">{{panelAccuracyValueText}}</text>
  203. <text class="race-panel__metric-unit race-panel__metric-unit--telemetry">{{panelAccuracyUnitText}}</text>
  204. </view>
  205. </view>
  206. </view>
  207. </view>
  208. </swiper-item>
  209. </swiper>
  210. <view class="race-panel-pager" wx:if="{{!showDebugPanel}}">
  211. <view class="race-panel-pager__dot {{hudPanelIndex === 0 ? 'race-panel-pager__dot--active' : ''}}"></view>
  212. <view class="race-panel-pager__dot {{hudPanelIndex === 1 ? 'race-panel-pager__dot--active' : ''}}"></view>
  213. </view>
  214. <view class="debug-modal" wx:if="{{showDebugPanel}}" bindtap="handleCloseDebugPanel">
  215. <view class="debug-modal__dialog" catchtap="handleDebugPanelTap">
  216. <view class="debug-modal__header">
  217. <view class="debug-modal__header-main">
  218. <view class="debug-modal__eyebrow">DEBUG PANEL</view>
  219. <view class="debug-modal__build">{{buildVersion}}</view>
  220. </view>
  221. <view class="debug-modal__header-actions">
  222. <view class="debug-modal__close" bindtap="handleCloseDebugPanel">关闭</view>
  223. </view>
  224. </view>
  225. <scroll-view class="debug-modal__content" scroll-y enhanced show-scrollbar="true">
  226. <view class="debug-section">
  227. <view class="debug-section__header">
  228. <view class="debug-section__title">Session</view>
  229. <view class="debug-section__desc">当前局状态与主流程控制</view>
  230. </view>
  231. <view class="info-panel__row">
  232. <text class="info-panel__label">Mode</text>
  233. <text class="info-panel__value">{{gameModeText}}</text>
  234. </view>
  235. <view class="info-panel__row">
  236. <text class="info-panel__label">Game</text>
  237. <text class="info-panel__value">{{gameSessionStatus}}</text>
  238. </view>
  239. <view class="info-panel__row">
  240. <text class="info-panel__label">Progress</text>
  241. <text class="info-panel__value">{{panelProgressText}}</text>
  242. </view>
  243. <view class="info-panel__row">
  244. <text class="info-panel__label">Timer</text>
  245. <text class="info-panel__value">{{panelTimerText}}</text>
  246. </view>
  247. <view class="info-panel__row info-panel__row--stack">
  248. <text class="info-panel__label">Punch Hint</text>
  249. <text class="info-panel__value">{{punchHintText}}</text>
  250. </view>
  251. <view class="control-row">
  252. <view class="control-chip {{gameModeText === '顺序赛' ? 'control-chip--active' : 'control-chip--secondary'}}" bindtap="handleSetClassicMode">顺序赛</view>
  253. <view class="control-chip {{gameModeText === '积分赛' ? 'control-chip--active' : 'control-chip--secondary'}}" bindtap="handleSetScoreOMode">积分赛</view>
  254. </view>
  255. <view class="control-row">
  256. <view class="control-chip control-chip--primary" bindtap="handleRecenter">回到首屏</view>
  257. <view class="control-chip control-chip--secondary" bindtap="handleRotationReset">旋转归零</view>
  258. </view>
  259. </view>
  260. <view class="debug-section">
  261. <view class="debug-section__header">
  262. <view class="debug-section__title">Sensors</view>
  263. <view class="debug-section__desc">定位、罗盘与心率带连接状态</view>
  264. </view>
  265. <view class="info-panel__row">
  266. <text class="info-panel__label">GPS</text>
  267. <text class="info-panel__value">{{gpsTrackingText}}</text>
  268. </view>
  269. <view class="info-panel__row">
  270. <text class="info-panel__label">Location Source</text>
  271. <text class="info-panel__value">{{locationSourceText}}</text>
  272. </view>
  273. <view class="info-panel__row info-panel__row--stack">
  274. <text class="info-panel__label">GPS Coord</text>
  275. <text class="info-panel__value">{{gpsCoordText}}</text>
  276. </view>
  277. <view class="info-panel__row info-panel__row--stack">
  278. <text class="info-panel__label">Mock Bridge</text>
  279. <text class="info-panel__value">{{mockBridgeStatusText}}</text>
  280. </view>
  281. <view class="info-panel__row info-panel__row--stack">
  282. <text class="info-panel__label">Mock URL</text>
  283. <view class="debug-inline-stack">
  284. <input
  285. class="debug-input"
  286. value="{{mockBridgeUrlDraft}}"
  287. placeholder="ws://192.168.x.x:17865/mock-gps"
  288. bindinput="handleMockBridgeUrlInput"
  289. />
  290. <view class="control-row control-row--compact">
  291. <view class="control-chip control-chip--secondary" bindtap="handleSaveMockBridgeUrl">保存地址</view>
  292. <view class="control-chip {{mockBridgeConnected ? 'control-chip--active' : 'control-chip--secondary'}}" bindtap="handleConnectMockLocationBridge">连接模拟源</view>
  293. <view class="control-chip control-chip--secondary" bindtap="handleDisconnectMockLocationBridge">断开模拟源</view>
  294. </view>
  295. </view>
  296. </view>
  297. <view class="info-panel__row info-panel__row--stack">
  298. <text class="info-panel__label">Mock Coord</text>
  299. <text class="info-panel__value">{{mockCoordText}}</text>
  300. </view>
  301. <view class="info-panel__row">
  302. <text class="info-panel__label">Mock Speed</text>
  303. <text class="info-panel__value">{{mockSpeedText}}</text>
  304. </view>
  305. <view class="info-panel__row">
  306. <text class="info-panel__label">Heart Rate</text>
  307. <text class="info-panel__value">{{heartRateStatusText}}</text>
  308. </view>
  309. <view class="info-panel__row info-panel__row--stack">
  310. <text class="info-panel__label">HR Device</text>
  311. <text class="info-panel__value">{{heartRateDeviceText}}</text>
  312. </view>
  313. <view class="info-panel__row">
  314. <text class="info-panel__label">Heading Mode</text>
  315. <text class="info-panel__value">{{orientationModeText}}</text>
  316. </view>
  317. <view class="info-panel__row">
  318. <text class="info-panel__label">Sensor Heading</text>
  319. <text class="info-panel__value">{{sensorHeadingText}}</text>
  320. </view>
  321. <view class="info-panel__row info-panel__row--stack">
  322. <text class="info-panel__label">North Ref</text>
  323. <text class="info-panel__value">{{northReferenceText}}</text>
  324. </view>
  325. <view class="control-row">
  326. <view class="control-chip {{gpsTracking ? 'control-chip--active' : 'control-chip--secondary'}}" bindtap="handleToggleGpsTracking">{{gpsTracking ? '停止定位' : '开启定位'}}</view>
  327. <view class="control-chip {{heartRateConnected ? 'control-chip--active' : 'control-chip--secondary'}}" bindtap="handleConnectHeartRate">{{heartRateConnected ? '心率带已连接' : '连接心率带'}}</view>
  328. </view>
  329. <view class="control-row">
  330. <view class="control-chip {{locationSourceMode === 'real' ? 'control-chip--active' : 'control-chip--secondary'}}" bindtap="handleSetRealLocationMode">真实定位</view>
  331. <view class="control-chip {{locationSourceMode === 'mock' ? 'control-chip--active' : 'control-chip--secondary'}}" bindtap="handleSetMockLocationMode">模拟定位</view>
  332. </view>
  333. <view class="control-row">
  334. <view class="control-chip control-chip--secondary" bindtap="handleDisconnectHeartRate">断开心率带</view>
  335. <view class="control-chip control-chip--secondary" bindtap="handleCycleNorthReferenceMode">{{northReferenceButtonText}}</view>
  336. </view>
  337. </view>
  338. <view class="debug-section">
  339. <view class="debug-section__header">
  340. <view class="debug-section__title">Telemetry</view>
  341. <view class="debug-section__desc">HUD 派生数据与心率颜色测试</view>
  342. </view>
  343. <view class="info-panel__row">
  344. <text class="info-panel__label">HR</text>
  345. <text class="info-panel__value">{{panelHeartRateValueText}} {{panelHeartRateUnitText}}</text>
  346. </view>
  347. <view class="info-panel__row">
  348. <text class="info-panel__label">HR Zone</text>
  349. <text class="info-panel__value">{{panelHeartRateZoneNameText}} {{panelHeartRateZoneRangeText}}</text>
  350. </view>
  351. <view class="info-panel__row">
  352. <text class="info-panel__label">Calories</text>
  353. <text class="info-panel__value">{{panelCaloriesValueText}} {{panelCaloriesUnitText}}</text>
  354. </view>
  355. <view class="info-panel__row">
  356. <text class="info-panel__label">Speed</text>
  357. <text class="info-panel__value">{{panelSpeedValueText}} km/h</text>
  358. </view>
  359. <view class="info-panel__row">
  360. <text class="info-panel__label">Avg Speed</text>
  361. <text class="info-panel__value">{{panelAverageSpeedValueText}} {{panelAverageSpeedUnitText}}</text>
  362. </view>
  363. <view class="info-panel__row">
  364. <text class="info-panel__label">Target Dist</text>
  365. <text class="info-panel__value">{{panelDistanceValueText}} {{panelDistanceUnitText}}</text>
  366. </view>
  367. <view class="info-panel__row">
  368. <text class="info-panel__label">Accuracy</text>
  369. <text class="info-panel__value">{{panelAccuracyValueText}} {{panelAccuracyUnitText}}</text>
  370. </view>
  371. <view class="control-row control-row--triple">
  372. <view class="control-chip control-chip--secondary" bindtap="handleDebugHeartRateBlue">蓝</view>
  373. <view class="control-chip control-chip--secondary" bindtap="handleDebugHeartRatePurple">紫</view>
  374. <view class="control-chip control-chip--secondary" bindtap="handleDebugHeartRateGreen">绿</view>
  375. </view>
  376. <view class="control-row control-row--triple">
  377. <view class="control-chip control-chip--secondary" bindtap="handleDebugHeartRateYellow">黄</view>
  378. <view class="control-chip control-chip--secondary" bindtap="handleDebugHeartRateOrange">橙</view>
  379. <view class="control-chip control-chip--secondary" bindtap="handleDebugHeartRateRed">红</view>
  380. </view>
  381. <view class="control-row">
  382. <view class="control-chip control-chip--secondary" bindtap="handleClearDebugHeartRate">清除</view>
  383. </view>
  384. </view>
  385. <view class="debug-section">
  386. <view class="debug-section__header">
  387. <view class="debug-section__title">Rendering</view>
  388. <view class="debug-section__desc">地图渲染、视角与参考图层</view>
  389. </view>
  390. <view class="info-panel__row">
  391. <text class="info-panel__label">Renderer</text>
  392. <text class="info-panel__value">{{renderMode}}</text>
  393. </view>
  394. <view class="info-panel__row info-panel__row--stack">
  395. <text class="info-panel__label">Projection</text>
  396. <text class="info-panel__value">{{projectionMode}}</text>
  397. </view>
  398. <view class="info-panel__row">
  399. <text class="info-panel__label">Zoom</text>
  400. <text class="info-panel__value">{{zoom}}</text>
  401. </view>
  402. <view class="info-panel__row">
  403. <text class="info-panel__label">Rotation</text>
  404. <text class="info-panel__value">{{rotationText}}</text>
  405. </view>
  406. <view class="info-panel__row">
  407. <text class="info-panel__label">Auto Source</text>
  408. <text class="info-panel__value">{{autoRotateSourceText}}</text>
  409. </view>
  410. <view class="info-panel__row">
  411. <text class="info-panel__label">Calibration</text>
  412. <text class="info-panel__value">{{autoRotateCalibrationText}}</text>
  413. </view>
  414. <view class="control-row">
  415. <view class="control-chip {{osmReferenceEnabled ? 'control-chip--active' : 'control-chip--secondary'}}" bindtap="handleToggleOsmReference">{{osmReferenceText}}</view>
  416. <view class="control-chip" wx:if="{{orientationMode === 'manual'}}" bindtap="handleRotateStep">旋转 +15°</view>
  417. </view>
  418. <view class="control-row control-row--triple">
  419. <view class="control-chip {{orientationMode === 'manual' ? 'control-chip--active' : ''}}" bindtap="handleSetManualMode">手动</view>
  420. <view class="control-chip {{orientationMode === 'north-up' ? 'control-chip--active' : ''}}" bindtap="handleSetNorthUpMode">北朝上</view>
  421. <view class="control-chip {{orientationMode === 'heading-up' ? 'control-chip--active' : ''}}" bindtap="handleSetHeadingUpMode">朝向朝上</view>
  422. </view>
  423. <view class="control-row" wx:if="{{orientationMode === 'heading-up'}}">
  424. <view class="control-chip" bindtap="handleAutoRotateCalibrate">按当前方向校准</view>
  425. </view>
  426. </view>
  427. <view class="debug-section">
  428. <view class="debug-section__header">
  429. <view class="debug-section__title">Diagnostics</view>
  430. <view class="debug-section__desc">配置、瓦片缓存与运行状态</view>
  431. </view>
  432. <view class="info-panel__row info-panel__row--stack">
  433. <text class="info-panel__label">Config</text>
  434. <text class="info-panel__value">{{configStatusText}}</text>
  435. </view>
  436. <view class="info-panel__row info-panel__row--stack">
  437. <text class="info-panel__label">Status</text>
  438. <text class="info-panel__value">{{statusText}}</text>
  439. </view>
  440. <view class="info-panel__row info-panel__row--stack">
  441. <text class="info-panel__label">Tile URL</text>
  442. <text class="info-panel__value">{{tileSource}}</text>
  443. </view>
  444. <view class="info-panel__row">
  445. <text class="info-panel__label">Center Tile</text>
  446. <text class="info-panel__value">{{centerText}}</text>
  447. </view>
  448. <view class="info-panel__row">
  449. <text class="info-panel__label">Tile Size</text>
  450. <text class="info-panel__value">{{tileSizePx}}px</text>
  451. </view>
  452. <view class="info-panel__row">
  453. <text class="info-panel__label">Visible Tiles</text>
  454. <text class="info-panel__value">{{visibleTileCount}}</text>
  455. </view>
  456. <view class="info-panel__row">
  457. <text class="info-panel__label">Ready Tiles</text>
  458. <text class="info-panel__value">{{readyTileCount}}</text>
  459. </view>
  460. <view class="info-panel__row">
  461. <text class="info-panel__label">Memory Tiles</text>
  462. <text class="info-panel__value">{{memoryTileCount}}</text>
  463. </view>
  464. <view class="info-panel__row">
  465. <text class="info-panel__label">Disk Tiles</text>
  466. <text class="info-panel__value">{{diskTileCount}}</text>
  467. </view>
  468. <view class="info-panel__row">
  469. <text class="info-panel__label">Cache Hit</text>
  470. <text class="info-panel__value">{{cacheHitRateText}}</text>
  471. </view>
  472. <view class="info-panel__row">
  473. <text class="info-panel__label">Disk Hits</text>
  474. <text class="info-panel__value">{{diskHitCount}}</text>
  475. </view>
  476. <view class="info-panel__row">
  477. <text class="info-panel__label">Net Fetches</text>
  478. <text class="info-panel__value">{{networkFetchCount}}</text>
  479. </view>
  480. </view>
  481. </scroll-view>
  482. </view>
  483. </view>
  484. </view>