map.wxml 54 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897
  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__map-pulse {{mapPulseFxClass}}" wx:if="{{mapPulseVisible}}" style="left: {{mapPulseLeftPx}}px; top: {{mapPulseTopPx}}px;"></view>
  28. <view class="map-stage__stage-fx {{stageFxClass}}" wx:if="{{stageFxVisible}}"></view>
  29. <view class="game-punch-feedback game-punch-feedback--{{punchFeedbackTone}} {{punchFeedbackFxClass}}" wx:if="{{punchFeedbackVisible}}">{{punchFeedbackText}}</view>
  30. <view class="map-stage__overlay-center-layer" wx:if="{{!showDebugPanel && !showGameInfoPanel && !showResultScene && !showSystemSettingsPanel}}">
  31. <view class="center-scale-ruler" wx:if="{{centerScaleRulerVisible}}" style="left: {{centerScaleRulerCenterXPx}}px; top: {{centerScaleRulerZeroYPx}}px; height: {{centerScaleRulerHeightPx}}px;">
  32. <view class="center-scale-ruler__axis" style="bottom: {{centerScaleRulerAxisBottomPx}}px;"></view>
  33. <view class="center-scale-ruler__arrow"></view>
  34. <view wx:if="{{centerScaleRulerZeroVisible}}" class="center-scale-ruler__tick center-scale-ruler__tick--major center-scale-ruler__tick--zero" style="top: {{centerScaleRulerHeightPx}}px;"></view>
  35. <view wx:if="{{centerScaleRulerZeroVisible}}" class="center-scale-ruler__label center-scale-ruler__label--zero" style="top: {{centerScaleRulerHeightPx}}px;">{{centerScaleRulerZeroLabel}}</view>
  36. <view wx:for="{{centerScaleRulerMinorTicks}}" wx:key="key" class="center-scale-ruler__tick {{item.long ? 'center-scale-ruler__tick--major' : ''}}" style="top: {{item.topPx}}px;"></view>
  37. <view wx:for="{{centerScaleRulerMajorMarks}}" wx:key="key" class="center-scale-ruler__label" style="top: {{item.topPx}}px;">{{item.label}}</view>
  38. </view>
  39. </view>
  40. <view class="map-stage__overlay" wx:if="{{!showResultScene}}">
  41. <view class="map-stage__bottom">
  42. <view class="compass-widget">
  43. <view class="compass-widget__heading-wrap">
  44. <view class="compass-widget__heading">{{sensorHeadingText}}</view>
  45. <view class="compass-widget__edge-arrow-wrap">
  46. <view class="compass-widget__edge-arrow"></view>
  47. </view>
  48. </view>
  49. <view class="compass-widget__dial {{orientationMode === 'heading-up' ? 'compass-widget__dial--active' : ''}}">
  50. <view class="compass-widget__glass"></view>
  51. <view class="compass-widget__inner-shadow"></view>
  52. <view class="compass-widget__card" style="transform: rotate({{rotationDeg}}deg);">
  53. <image class="compass-widget__north-arrow" src="../../assets/compass-north-arrow.svg" mode="aspectFit"></image>
  54. <view wx:for="{{compassTicks}}" wx:key="angle" class="compass-widget__tick-anchor" style="transform: translate(-50%, -50%) rotate({{item.angle}}deg);">
  55. <view class="compass-widget__tick {{item.long ? 'compass-widget__tick--long' : 'compass-widget__tick--short'}} {{item.major ? 'compass-widget__tick--major' : ''}}"></view>
  56. </view>
  57. <view wx:for="{{compassLabels}}" wx:key="text" class="compass-widget__mark-anchor" style="transform: translate(-50%, -50%) rotate({{item.angle}}deg);">
  58. <view class="compass-widget__mark {{item.className}}" style="transform: translate(-50%, -50%) translateY(-{{item.radius}}rpx) rotate({{item.rotateBack}}deg);">{{item.text}}</view>
  59. </view>
  60. </view>
  61. <view class="compass-widget__needle-anchor" style="transform: translate(-50%, -50%) rotate({{compassNeedleDeg}}deg);">
  62. <view class="compass-widget__needle-north"></view>
  63. <view class="compass-widget__needle-south"></view>
  64. </view>
  65. <view class="compass-widget__hub"></view>
  66. <view class="compass-widget__hub-core"></view>
  67. </view>
  68. <view class="compass-widget__hint" wx:if="{{compassDeclinationText}}">{{compassDeclinationText}}</view>
  69. </view>
  70. </view>
  71. </view>
  72. </view>
  73. <view
  74. class="game-content-card game-content-card--{{contentCardTemplate}} {{contentCardFxClass}}"
  75. wx:if="{{contentCardVisible}}"
  76. catchtap="handleContentCardTap"
  77. >
  78. <view class="game-content-card__title">{{contentCardTitle}}</view>
  79. <view class="game-content-card__body">{{contentCardBody}}</view>
  80. <view class="game-content-card__action-row {{contentCardActionVisible ? 'game-content-card__action-row--split' : ''}}">
  81. <view
  82. wx:if="{{contentCardActionVisible}}"
  83. class="game-content-card__action"
  84. catchtap="handleOpenContentCardDetail"
  85. >{{contentCardActionText}}</view>
  86. <view class="game-content-card__close" catchtap="handleCloseContentCard">关闭</view>
  87. </view>
  88. </view>
  89. <view class="game-punch-hint" wx:if="{{!showResultScene && showPunchHintBanner && punchHintText}}" style="top: {{topInsetHeight}}px;" catchtouchstart="handlePunchHintTap" catchtouchmove="handlePunchHintTap" catchtouchend="handlePunchHintTap">
  90. <view class="game-punch-hint__text">{{punchHintText}}</view>
  91. <view class="game-punch-hint__close" catchtouchstart="handlePunchHintTap" catchtouchmove="handlePunchHintTap" catchtouchend="handlePunchHintTap" catchtap="handleClosePunchHint">×</view>
  92. </view>
  93. <cover-view class="map-side-toggle {{sideButtonPlacement === 'right' ? 'map-side-toggle--right' : 'map-side-toggle--left'}}" wx:if="{{!showDebugPanel && !showGameInfoPanel && !showResultScene && !showSystemSettingsPanel}}" style="top: {{topInsetHeight}}px;" bindtap="handleCycleSideButtons">
  94. <cover-view class="map-side-button map-side-button--icon">
  95. <cover-image class="map-side-button__image" src="{{sideToggleIconSrc}}"></cover-image>
  96. </cover-view>
  97. </cover-view>
  98. <cover-view class="map-side-column {{sideButtonPlacement === 'right' ? 'map-side-column--right-group' : 'map-side-column--left'}} map-side-column--left-group" wx:if="{{!showDebugPanel && !showGameInfoPanel && !showResultScene && !showSystemSettingsPanel && showLeftButtonGroup}}" style="top: {{topInsetHeight}}px;">
  99. <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>
  100. <cover-view class="{{sideButton2Class}}" bindtap="handleToggleGpsLock">
  101. <cover-image
  102. wx:if="{{gpsLockEnabled}}"
  103. class="map-side-button__action-image"
  104. src="../../assets/btn_locked.png"
  105. ></cover-image>
  106. <cover-image
  107. wx:else
  108. class="map-side-button__action-image"
  109. src="../../assets/btn_unlock.png"
  110. ></cover-image>
  111. </cover-view>
  112. <cover-view class="{{sideButton16Class}}" bindtap="handleSkipAction"><cover-image class="map-side-button__action-image" src="../../assets/btn_skip_cp.png"></cover-image></cover-view>
  113. <cover-view class="{{sideButton11Class}}" bindtap="handleOpenGameInfoPanel"><cover-image class="map-side-button__action-image" src="../../assets/btn_info.png"></cover-image></cover-view>
  114. <cover-view class="{{sideButton12Class}}" bindtap="handleOpenSystemSettingsPanel"><cover-image class="map-side-button__action-image" src="../../assets/btn_settings.png"></cover-image></cover-view>
  115. <cover-view class="{{sideButton4Class}}" bindtap="handleForceExitGame"><cover-image class="map-side-button__action-image" src="../../assets/btn_exit.png"></cover-image></cover-view>
  116. </cover-view>
  117. <cover-view class="map-punch-button {{punchButtonEnabled ? 'map-punch-button--active' : ''}} {{punchButtonFxClass}}" wx:if="{{!showDebugPanel && !showGameInfoPanel && !showResultScene && !showSystemSettingsPanel}}" bindtap="handlePunchAction">
  118. <cover-view class="map-punch-button__text">{{punchButtonText}}</cover-view>
  119. </cover-view>
  120. <cover-view class="map-content-entry" wx:if="{{!showDebugPanel && !showGameInfoPanel && !showResultScene && !showSystemSettingsPanel && pendingContentEntryVisible}}" bindtap="handleOpenPendingContentCard">
  121. <cover-view class="map-content-entry__text">{{pendingContentEntryText}}</cover-view>
  122. </cover-view>
  123. <cover-view class="screen-button-layer screen-button-layer--start-left" wx:if="{{!showDebugPanel && !showGameInfoPanel && !showResultScene && !showSystemSettingsPanel && showBottomDebugButton && gameSessionStatus !== 'running'}}" bindtap="handleStartGame">
  124. <cover-view class="screen-button-layer__text screen-button-layer__text--start">开始</cover-view>
  125. </cover-view>
  126. <cover-view class="screen-button-layer screen-button-layer--bottom-left" wx:if="{{!showDebugPanel && !showGameInfoPanel && !showResultScene && !showSystemSettingsPanel && showBottomDebugButton}}" bindtap="handleToggleDebugPanel">
  127. <cover-view class="screen-button-layer__icon">
  128. <cover-view class="screen-button-layer__line"></cover-view>
  129. <cover-view class="screen-button-layer__stand"></cover-view>
  130. </cover-view>
  131. <cover-view class="screen-button-layer__text">调试</cover-view>
  132. </cover-view>
  133. <swiper wx:if="{{!showGameInfoPanel && !showResultScene && !showSystemSettingsPanel}}" class="race-panel-swiper" current="{{hudPanelIndex}}" bindchange="handleHudPanelChange" duration="220" easing-function="easeOutCubic">
  134. <swiper-item>
  135. <view class="race-panel race-panel--tone-{{panelTelemetryTone}}">
  136. <view class="race-panel__tag race-panel__tag--top-left">{{panelActionTagText}}</view>
  137. <view class="race-panel__tag race-panel__tag--top-right">里程</view>
  138. <view class="race-panel__tag race-panel__tag--bottom-left">{{panelDistanceTagText}}</view>
  139. <view class="race-panel__tag race-panel__tag--bottom-right">速度</view>
  140. <view class="race-panel__line race-panel__line--center"></view>
  141. <view class="race-panel__line race-panel__line--left-mid"></view>
  142. <view class="race-panel__line race-panel__line--right-mid"></view>
  143. <view class="race-panel__line race-panel__line--left-top"></view>
  144. <view class="race-panel__line race-panel__line--left-bottom"></view>
  145. <view class="race-panel__line race-panel__line--right-top"></view>
  146. <view class="race-panel__line race-panel__line--right-bottom"></view>
  147. <view class="race-panel__grid">
  148. <view class="race-panel__cell race-panel__cell--action">
  149. <view class="race-panel__action-button"><!-- status only -->
  150. <view class="race-panel__action-button-text">{{punchButtonText}}</view>
  151. </view>
  152. </view>
  153. <view class="race-panel__cell race-panel__cell--timer">
  154. <text class="race-panel__timer {{panelTimerFxClass}}">{{panelTimerText}}</text>
  155. </view>
  156. <view class="race-panel__cell race-panel__cell--mileage">
  157. <view class="race-panel__mileage-wrap {{panelMileageFxClass}}">
  158. <text class="race-panel__mileage">{{panelMileageText}}</text>
  159. <view class="race-panel__chevrons">
  160. <view class="race-panel__chevron"></view>
  161. <view class="race-panel__chevron race-panel__chevron--offset"></view>
  162. </view>
  163. </view>
  164. </view>
  165. <view class="race-panel__cell race-panel__cell--distance">
  166. <view class="race-panel__metric-group race-panel__metric-group--left {{panelDistanceFxClass}}">
  167. <text class="race-panel__metric-value race-panel__metric-value--distance">{{panelDistanceValueText}}</text>
  168. <text class="race-panel__metric-unit race-panel__metric-unit--distance">{{panelDistanceUnitText}}</text>
  169. </view>
  170. </view>
  171. <view class="race-panel__cell race-panel__cell--progress">
  172. <text class="race-panel__progress {{panelProgressFxClass}}">{{panelProgressText}}</text>
  173. </view>
  174. <view class="race-panel__cell race-panel__cell--speed">
  175. <view class="race-panel__metric-group race-panel__metric-group--right {{panelSpeedFxClass}}">
  176. <text class="race-panel__metric-value race-panel__metric-value--speed">{{panelSpeedValueText}}</text>
  177. <text class="race-panel__metric-unit race-panel__metric-unit--speed">km/h</text>
  178. </view>
  179. </view>
  180. </view>
  181. </view>
  182. </swiper-item>
  183. <swiper-item>
  184. <view class="race-panel race-panel--tone-{{panelTelemetryTone}}">
  185. <view class="race-panel__tag race-panel__tag--top-left">心率</view>
  186. <view class="race-panel__tag race-panel__tag--top-right">卡路里</view>
  187. <view class="race-panel__tag race-panel__tag--bottom-left">均速</view>
  188. <view class="race-panel__tag race-panel__tag--bottom-right">精度</view>
  189. <view class="race-panel__line race-panel__line--center"></view>
  190. <view class="race-panel__line race-panel__line--left-mid"></view>
  191. <view class="race-panel__line race-panel__line--right-mid"></view>
  192. <view class="race-panel__line race-panel__line--left-top"></view>
  193. <view class="race-panel__line race-panel__line--left-bottom"></view>
  194. <view class="race-panel__line race-panel__line--right-top"></view>
  195. <view class="race-panel__line race-panel__line--right-bottom"></view>
  196. <view class="race-panel__grid">
  197. <view class="race-panel__cell race-panel__cell--action">
  198. <view class="race-panel__metric-group race-panel__metric-group--left race-panel__metric-group--panel {{panelHeartRateFxClass}}">
  199. <text class="race-panel__metric-value race-panel__metric-value--telemetry">{{panelHeartRateValueText}}</text>
  200. <text class="race-panel__metric-unit race-panel__metric-unit--telemetry">{{panelHeartRateUnitText}}</text>
  201. </view>
  202. </view>
  203. <view class="race-panel__cell race-panel__cell--timer">
  204. <text class="race-panel__timer {{panelTimerFxClass}}">{{panelTimerText}}</text>
  205. </view>
  206. <view class="race-panel__cell race-panel__cell--mileage">
  207. <view class="race-panel__metric-group race-panel__metric-group--right race-panel__metric-group--panel">
  208. <text class="race-panel__metric-value race-panel__metric-value--telemetry">{{panelCaloriesValueText}}</text>
  209. <text class="race-panel__metric-unit race-panel__metric-unit--telemetry">{{panelCaloriesUnitText}}</text>
  210. </view>
  211. </view>
  212. <view class="race-panel__cell race-panel__cell--distance">
  213. <view class="race-panel__metric-group race-panel__metric-group--left race-panel__metric-group--panel">
  214. <text class="race-panel__metric-value race-panel__metric-value--telemetry-secondary">{{panelAverageSpeedValueText}}</text>
  215. <text class="race-panel__metric-unit race-panel__metric-unit--telemetry">{{panelAverageSpeedUnitText}}</text>
  216. </view>
  217. </view>
  218. <view class="race-panel__cell race-panel__cell--progress">
  219. <view class="race-panel__zone">
  220. <text class="race-panel__zone-name">{{panelHeartRateZoneNameText}}</text>
  221. <text class="race-panel__zone-range">{{panelHeartRateZoneRangeText}}</text>
  222. </view>
  223. </view>
  224. <view class="race-panel__cell race-panel__cell--speed">
  225. <view class="race-panel__metric-group race-panel__metric-group--right race-panel__metric-group--panel">
  226. <text class="race-panel__metric-value race-panel__metric-value--telemetry-secondary">{{panelAccuracyValueText}}</text>
  227. <text class="race-panel__metric-unit race-panel__metric-unit--telemetry">{{panelAccuracyUnitText}}</text>
  228. </view>
  229. </view>
  230. </view>
  231. </view>
  232. </swiper-item>
  233. </swiper>
  234. <view class="race-panel-pager" wx:if="{{!showDebugPanel && !showGameInfoPanel && !showResultScene && !showSystemSettingsPanel}}">
  235. <view class="race-panel-pager__dot {{hudPanelIndex === 0 ? 'race-panel-pager__dot--active' : ''}}"></view>
  236. <view class="race-panel-pager__dot {{hudPanelIndex === 1 ? 'race-panel-pager__dot--active' : ''}}"></view>
  237. </view>
  238. <view class="game-info-modal" wx:if="{{showGameInfoPanel}}" bindtap="handleCloseGameInfoPanel">
  239. <view class="game-info-modal__dialog" catchtap="handleGameInfoPanelTap">
  240. <view class="game-info-modal__header">
  241. <view class="game-info-modal__header-main">
  242. <view class="game-info-modal__eyebrow">GAME INFO</view>
  243. <view class="game-info-modal__title">{{gameInfoTitle}}</view>
  244. <view class="game-info-modal__subtitle">{{gameInfoSubtitle}}</view>
  245. </view>
  246. <view class="game-info-modal__header-actions">
  247. <view class="game-info-modal__close" bindtap="handleCloseGameInfoPanel">关闭</view>
  248. </view>
  249. </view>
  250. <scroll-view class="game-info-modal__content" scroll-y enhanced show-scrollbar="true">
  251. <view class="debug-section debug-section--info">
  252. <view class="debug-section__header">
  253. <view class="debug-section__title">Local</view>
  254. <view class="debug-section__desc">当前设备、本地玩法与实时运行状态</view>
  255. </view>
  256. <view class="info-panel__row" wx:for="{{gameInfoLocalRows}}" wx:key="label">
  257. <text class="info-panel__label">{{item.label}}</text>
  258. <text class="info-panel__value">{{item.value}}</text>
  259. </view>
  260. </view>
  261. <view class="debug-section debug-section--info">
  262. <view class="debug-section__header">
  263. <view class="debug-section__title">Global</view>
  264. <view class="debug-section__desc">联网后接入全局赛事数据,这里先占位</view>
  265. </view>
  266. <view class="info-panel__row" wx:for="{{gameInfoGlobalRows}}" wx:key="label">
  267. <text class="info-panel__label">{{item.label}}</text>
  268. <text class="info-panel__value">{{item.value}}</text>
  269. </view>
  270. </view>
  271. </scroll-view>
  272. </view>
  273. </view>
  274. <view class="result-scene-modal" wx:if="{{showResultScene}}" bindtap="handleCloseResultScene">
  275. <view class="result-scene-modal__dialog" catchtap="handleResultSceneTap">
  276. <view class="result-scene-modal__eyebrow">RESULT</view>
  277. <view class="result-scene-modal__title">{{resultSceneTitle}}</view>
  278. <view class="result-scene-modal__subtitle">{{resultSceneSubtitle}}</view>
  279. <view class="result-scene-modal__hero">
  280. <view class="result-scene-modal__hero-label">{{resultSceneHeroLabel}}</view>
  281. <view class="result-scene-modal__hero-value">{{resultSceneHeroValue}}</view>
  282. </view>
  283. <view class="result-scene-modal__rows">
  284. <view class="result-scene-modal__row" wx:for="{{resultSceneRows}}" wx:key="label">
  285. <text class="result-scene-modal__row-label">{{item.label}}</text>
  286. <text class="result-scene-modal__row-value">{{item.value}}</text>
  287. </view>
  288. </view>
  289. <view class="result-scene-modal__actions">
  290. <view class="result-scene-modal__action result-scene-modal__action--secondary" bindtap="handleCloseResultScene">返回地图</view>
  291. <view class="result-scene-modal__action result-scene-modal__action--primary" bindtap="handleRestartFromResult">再来一局</view>
  292. </view>
  293. </view>
  294. </view>
  295. <view class="game-info-modal" wx:if="{{showSystemSettingsPanel}}" bindtap="handleCloseSystemSettingsPanel">
  296. <view class="game-info-modal__dialog" catchtap="handleSystemSettingsPanelTap">
  297. <view class="game-info-modal__header">
  298. <view class="game-info-modal__header-main">
  299. <view class="game-info-modal__eyebrow">SYSTEM SETTINGS</view>
  300. <view class="game-info-modal__title">系统设置</view>
  301. <view class="game-info-modal__subtitle">用户端偏好与设备级选项</view>
  302. </view>
  303. <view class="game-info-modal__header-actions">
  304. <view class="game-info-modal__close" bindtap="handleCloseSystemSettingsPanel">关闭</view>
  305. </view>
  306. </view>
  307. <scroll-view class="game-info-modal__content" scroll-y enhanced show-scrollbar="true">
  308. <view class="debug-section debug-section--info">
  309. <view class="debug-section__header">
  310. <view class="debug-section__header-row">
  311. <view class="debug-section__header-main">
  312. <view class="debug-section__title">01. 动画性能</view>
  313. <view class="debug-section__desc">根据设备性能切换动画强度,低端机建议精简</view>
  314. </view>
  315. <view class="debug-section__lock {{lockAnimationLevel ? 'debug-section__lock--active' : ''}}" data-key="lockAnimationLevel" bindtap="handleToggleSettingLock">
  316. <text class="debug-section__lock-text">{{lockAnimationLevel ? '已锁' : '可改'}}</text>
  317. </view>
  318. </view>
  319. </view>
  320. <view class="info-panel__row">
  321. <text class="info-panel__label">当前级别</text>
  322. <text class="info-panel__value">{{animationLevel === 'lite' ? '精简' : '标准'}}{{lockAnimationLevel ? ' · 已锁定' : ' · 可编辑'}}</text>
  323. </view>
  324. <view class="control-row">
  325. <view class="control-chip {{animationLevel === 'standard' ? 'control-chip--active' : 'control-chip--secondary'}} {{lockAnimationLevel ? 'control-chip--disabled' : ''}}" bindtap="handleSetAnimationLevelStandard">标准</view>
  326. <view class="control-chip {{animationLevel === 'lite' ? 'control-chip--active' : 'control-chip--secondary'}} {{lockAnimationLevel ? 'control-chip--disabled' : ''}}" bindtap="handleSetAnimationLevelLite">精简</view>
  327. </view>
  328. </view>
  329. <view class="debug-section debug-section--info">
  330. <view class="debug-section__header">
  331. <view class="debug-section__header-row">
  332. <view class="debug-section__header-main">
  333. <view class="debug-section__title">02. 按钮习惯</view>
  334. <view class="debug-section__desc">切换功能按钮显示在左侧还是右侧,适配左手/右手操作习惯</view>
  335. </view>
  336. <view class="debug-section__lock {{lockSideButtonPlacement ? 'debug-section__lock--active' : ''}}" data-key="lockSideButtonPlacement" bindtap="handleToggleSettingLock">
  337. <text class="debug-section__lock-text">{{lockSideButtonPlacement ? '已锁' : '可改'}}</text>
  338. </view>
  339. </view>
  340. </view>
  341. <view class="info-panel__row">
  342. <text class="info-panel__label">当前习惯</text>
  343. <text class="info-panel__value">{{sideButtonPlacement === 'right' ? '右手' : '左手'}}{{lockSideButtonPlacement ? ' · 已锁定' : ' · 可编辑'}}</text>
  344. </view>
  345. <view class="control-row">
  346. <view class="control-chip {{sideButtonPlacement === 'left' ? 'control-chip--active' : 'control-chip--secondary'}} {{lockSideButtonPlacement ? 'control-chip--disabled' : ''}}" bindtap="handleSetSideButtonPlacementLeft">左手</view>
  347. <view class="control-chip {{sideButtonPlacement === 'right' ? 'control-chip--active' : 'control-chip--secondary'}} {{lockSideButtonPlacement ? 'control-chip--disabled' : ''}}" bindtap="handleSetSideButtonPlacementRight">右手</view>
  348. </view>
  349. </view>
  350. <view class="debug-section debug-section--info">
  351. <view class="debug-section__header">
  352. <view class="debug-section__header-row">
  353. <view class="debug-section__header-main">
  354. <view class="debug-section__title">03. 自动转图</view>
  355. <view class="debug-section__desc">控制地图是否跟随朝向自动旋转,外部按钮与这里保持同步</view>
  356. </view>
  357. <view class="debug-section__lock {{lockAutoRotate ? 'debug-section__lock--active' : ''}}" data-key="lockAutoRotate" bindtap="handleToggleSettingLock">
  358. <text class="debug-section__lock-text">{{lockAutoRotate ? '已锁' : '可改'}}</text>
  359. </view>
  360. </view>
  361. </view>
  362. <view class="info-panel__row">
  363. <text class="info-panel__label">当前状态</text>
  364. <text class="info-panel__value">{{autoRotateEnabled ? '开启' : '关闭'}}{{lockAutoRotate ? ' · 已锁定' : ' · 可编辑'}}</text>
  365. </view>
  366. <view class="control-row">
  367. <view class="control-chip {{autoRotateEnabled ? 'control-chip--active' : 'control-chip--secondary'}} {{lockAutoRotate ? 'control-chip--disabled' : ''}}" bindtap="handleSetAutoRotateEnabledOn">开启</view>
  368. <view class="control-chip {{!autoRotateEnabled ? 'control-chip--active' : 'control-chip--secondary'}} {{lockAutoRotate ? 'control-chip--disabled' : ''}}" bindtap="handleSetAutoRotateEnabledOff">关闭</view>
  369. </view>
  370. </view>
  371. <view class="debug-section debug-section--info">
  372. <view class="debug-section__header">
  373. <view class="debug-section__header-row">
  374. <view class="debug-section__header-main">
  375. <view class="debug-section__title">04. 指北针响应</view>
  376. <view class="debug-section__desc">切换指针的平滑与跟手程度,影响指北针响应手感</view>
  377. </view>
  378. <view class="debug-section__lock {{lockCompassTuning ? 'debug-section__lock--active' : ''}}" data-key="lockCompassTuning" bindtap="handleToggleSettingLock">
  379. <text class="debug-section__lock-text">{{lockCompassTuning ? '已锁' : '可改'}}</text>
  380. </view>
  381. </view>
  382. </view>
  383. <view class="info-panel__row">
  384. <text class="info-panel__label">当前档位</text>
  385. <text class="info-panel__value">{{compassTuningProfileText}}{{lockCompassTuning ? ' · 已锁定' : ' · 可编辑'}}</text>
  386. </view>
  387. <view class="control-row control-row--triple">
  388. <view class="control-chip {{compassTuningProfile === 'smooth' ? 'control-chip--active' : 'control-chip--secondary'}} {{lockCompassTuning ? 'control-chip--disabled' : ''}}" bindtap="handleSetCompassTuningSmooth">顺滑</view>
  389. <view class="control-chip {{compassTuningProfile === 'balanced' ? 'control-chip--active' : 'control-chip--secondary'}} {{lockCompassTuning ? 'control-chip--disabled' : ''}}" bindtap="handleSetCompassTuningBalanced">平衡</view>
  390. <view class="control-chip {{compassTuningProfile === 'responsive' ? 'control-chip--active' : 'control-chip--secondary'}} {{lockCompassTuning ? 'control-chip--disabled' : ''}}" bindtap="handleSetCompassTuningResponsive">跟手</view>
  391. </view>
  392. </view>
  393. <view class="debug-section debug-section--info">
  394. <view class="debug-section__header">
  395. <view class="debug-section__header-row">
  396. <view class="debug-section__header-main">
  397. <view class="debug-section__title">05. 比例尺显示</view>
  398. <view class="debug-section__desc">控制比例尺显示与否,默认沿用你的本地偏好</view>
  399. </view>
  400. <view class="debug-section__lock {{lockScaleRulerVisible ? 'debug-section__lock--active' : ''}}" data-key="lockScaleRulerVisible" bindtap="handleToggleSettingLock">
  401. <text class="debug-section__lock-text">{{lockScaleRulerVisible ? '已锁' : '可改'}}</text>
  402. </view>
  403. </view>
  404. </view>
  405. <view class="info-panel__row">
  406. <text class="info-panel__label">当前状态</text>
  407. <text class="info-panel__value">{{showCenterScaleRuler ? '显示' : '隐藏'}}{{lockScaleRulerVisible ? ' · 已锁定' : ' · 可编辑'}}</text>
  408. </view>
  409. <view class="control-row">
  410. <view class="control-chip {{showCenterScaleRuler ? 'control-chip--active' : 'control-chip--secondary'}} {{lockScaleRulerVisible ? 'control-chip--disabled' : ''}}" bindtap="handleSetCenterScaleRulerVisibleOn">显示</view>
  411. <view class="control-chip {{!showCenterScaleRuler ? 'control-chip--active' : 'control-chip--secondary'}} {{lockScaleRulerVisible ? 'control-chip--disabled' : ''}}" bindtap="handleSetCenterScaleRulerVisibleOff">隐藏</view>
  412. </view>
  413. </view>
  414. <view class="debug-section debug-section--info">
  415. <view class="debug-section__header">
  416. <view class="debug-section__header-row">
  417. <view class="debug-section__header-main">
  418. <view class="debug-section__title">06. 比例尺基准点</view>
  419. <view class="debug-section__desc">设置比例尺零点锚定位置,可跟随屏幕中心或指北针圆心</view>
  420. </view>
  421. <view class="debug-section__lock {{lockScaleRulerAnchor ? 'debug-section__lock--active' : ''}}" data-key="lockScaleRulerAnchor" bindtap="handleToggleSettingLock">
  422. <text class="debug-section__lock-text">{{lockScaleRulerAnchor ? '已锁' : '可改'}}</text>
  423. </view>
  424. </view>
  425. </view>
  426. <view class="info-panel__row">
  427. <text class="info-panel__label">当前锚点</text>
  428. <text class="info-panel__value">{{centerScaleRulerAnchorMode === 'compass-center' ? '指北针圆心' : '屏幕中心'}}{{lockScaleRulerAnchor ? ' · 已锁定' : ' · 可编辑'}}</text>
  429. </view>
  430. <view class="control-row">
  431. <view class="control-chip {{centerScaleRulerAnchorMode === 'screen-center' ? 'control-chip--active' : 'control-chip--secondary'}} {{lockScaleRulerAnchor ? 'control-chip--disabled' : ''}}" bindtap="handleSetCenterScaleRulerAnchorScreenCenter">屏幕中心</view>
  432. <view class="control-chip {{centerScaleRulerAnchorMode === 'compass-center' ? 'control-chip--active' : 'control-chip--secondary'}} {{lockScaleRulerAnchor ? 'control-chip--disabled' : ''}}" bindtap="handleSetCenterScaleRulerAnchorCompassCenter">指北针圆心</view>
  433. </view>
  434. </view>
  435. <view class="debug-section debug-section--info">
  436. <view class="debug-section__header">
  437. <view class="debug-section__header-row">
  438. <view class="debug-section__header-main">
  439. <view class="debug-section__title">07. 北参考</view>
  440. <view class="debug-section__desc">切换磁北/真北作为地图与指北针参考</view>
  441. </view>
  442. <view class="debug-section__lock {{lockNorthReference ? 'debug-section__lock--active' : ''}}" data-key="lockNorthReference" bindtap="handleToggleSettingLock">
  443. <text class="debug-section__lock-text">{{lockNorthReference ? '已锁' : '可改'}}</text>
  444. </view>
  445. </view>
  446. </view>
  447. <view class="info-panel__row">
  448. <text class="info-panel__label">当前参考</text>
  449. <text class="info-panel__value">{{northReferenceText}}{{lockNorthReference ? ' · 已锁定' : ' · 可编辑'}}</text>
  450. </view>
  451. <view class="control-row">
  452. <view class="control-chip {{northReferenceMode === 'magnetic' ? 'control-chip--active' : 'control-chip--secondary'}} {{lockNorthReference ? 'control-chip--disabled' : ''}}" bindtap="handleSetNorthReferenceMagnetic">磁北</view>
  453. <view class="control-chip {{northReferenceMode === 'true' ? 'control-chip--active' : 'control-chip--secondary'}} {{lockNorthReference ? 'control-chip--disabled' : ''}}" bindtap="handleSetNorthReferenceTrue">真北</view>
  454. </view>
  455. </view>
  456. <view class="debug-section debug-section--info">
  457. <view class="debug-section__header">
  458. <view class="debug-section__header-row">
  459. <view class="debug-section__header-main">
  460. <view class="debug-section__title">08. 心率设备</view>
  461. <view class="debug-section__desc">清除已记住的首选心率带设备,下次重新选择</view>
  462. </view>
  463. <view class="debug-section__lock {{lockHeartRateDevice ? 'debug-section__lock--active' : ''}}" data-key="lockHeartRateDevice" bindtap="handleToggleSettingLock">
  464. <text class="debug-section__lock-text">{{lockHeartRateDevice ? '已锁' : '可改'}}</text>
  465. </view>
  466. </view>
  467. </view>
  468. <view class="control-row">
  469. <view class="control-chip control-chip--secondary {{lockHeartRateDevice ? 'control-chip--disabled' : ''}}" bindtap="handleClearPreferredHeartRateDevice">清除首选设备</view>
  470. </view>
  471. </view>
  472. </scroll-view>
  473. </view>
  474. </view>
  475. <view class="debug-modal" wx:if="{{showDebugPanel}}" bindtap="handleCloseDebugPanel">
  476. <view class="debug-modal__dialog" catchtap="handleDebugPanelTap">
  477. <view class="debug-modal__header">
  478. <view class="debug-modal__header-main">
  479. <view class="debug-modal__eyebrow">DEBUG PANEL</view>
  480. <view class="debug-modal__build">{{buildVersion}}</view>
  481. </view>
  482. <view class="debug-modal__header-actions">
  483. <view class="debug-modal__close" bindtap="handleCloseDebugPanel">关闭</view>
  484. </view>
  485. </view>
  486. <scroll-view class="debug-modal__content" scroll-y enhanced show-scrollbar="true">
  487. <view class="debug-section">
  488. <view class="debug-section__header">
  489. <view class="debug-section__title">Session</view>
  490. <view class="debug-section__desc">当前局状态与主流程控制</view>
  491. </view>
  492. <view class="info-panel__row">
  493. <text class="info-panel__label">Mode</text>
  494. <text class="info-panel__value">{{gameModeText}}</text>
  495. </view>
  496. <view class="info-panel__row">
  497. <text class="info-panel__label">Config</text>
  498. <text class="info-panel__value">{{configSourceText}}</text>
  499. </view>
  500. <view class="info-panel__row">
  501. <text class="info-panel__label">Game</text>
  502. <text class="info-panel__value">{{gameSessionStatus}}</text>
  503. </view>
  504. <view class="info-panel__row">
  505. <text class="info-panel__label">Progress</text>
  506. <text class="info-panel__value">{{panelProgressText}}</text>
  507. </view>
  508. <view class="info-panel__row">
  509. <text class="info-panel__label">Timer</text>
  510. <text class="info-panel__value">{{panelTimerText}}</text>
  511. </view>
  512. <view class="info-panel__row info-panel__row--stack">
  513. <text class="info-panel__label">Punch Hint</text>
  514. <text class="info-panel__value">{{punchHintText}}</text>
  515. </view>
  516. <view class="control-row">
  517. <view class="control-chip {{configSourceText === '顺序赛配置' ? 'control-chip--active' : 'control-chip--secondary'}}" bindtap="handleLoadClassicConfig">顺序赛配置</view>
  518. <view class="control-chip {{configSourceText === '积分赛配置' ? 'control-chip--active' : 'control-chip--secondary'}}" bindtap="handleLoadScoreOConfig">积分赛配置</view>
  519. </view>
  520. <view class="control-row">
  521. <view class="control-chip control-chip--primary" bindtap="handleRecenter">回到首屏</view>
  522. <view class="control-chip control-chip--secondary" bindtap="handleRotationReset">旋转归零</view>
  523. </view>
  524. <view class="control-row">
  525. <view class="control-chip control-chip--secondary" bindtap="handleClearMapTestArtifacts">清空测试痕迹</view>
  526. </view>
  527. </view>
  528. <view class="debug-section">
  529. <view class="debug-section__header">
  530. <view class="debug-section__title">Sensors</view>
  531. <view class="debug-section__desc">定位、罗盘与心率带连接状态</view>
  532. </view>
  533. <view class="control-row">
  534. <view class="control-chip control-chip--primary" bindtap="handleConnectAllMockSources">一键连接模拟源</view>
  535. <view class="control-chip control-chip--secondary" bindtap="handleOpenWebViewTest">测试 H5</view>
  536. </view>
  537. <view class="debug-group-title">定位</view>
  538. <view class="info-panel__row">
  539. <text class="info-panel__label">GPS</text>
  540. <text class="info-panel__value">{{gpsTrackingText}}</text>
  541. </view>
  542. <view class="info-panel__row">
  543. <text class="info-panel__label">Location Source</text>
  544. <text class="info-panel__value">{{locationSourceText}}</text>
  545. </view>
  546. <view class="info-panel__row info-panel__row--stack">
  547. <text class="info-panel__label">GPS Coord</text>
  548. <text class="info-panel__value">{{gpsCoordText}}</text>
  549. </view>
  550. <view class="info-panel__row info-panel__row--stack">
  551. <text class="info-panel__label">Mock Bridge</text>
  552. <text class="info-panel__value">{{mockBridgeStatusText}}</text>
  553. </view>
  554. <view class="info-panel__row info-panel__row--stack">
  555. <text class="info-panel__label">Mock URL</text>
  556. <view class="debug-inline-stack">
  557. <input
  558. class="debug-input"
  559. value="{{mockBridgeUrlDraft}}"
  560. placeholder="ws://192.168.x.x:17865/mock-gps"
  561. bindinput="handleMockBridgeUrlInput"
  562. />
  563. <view class="control-row control-row--compact">
  564. <view class="control-chip control-chip--secondary" bindtap="handleSaveMockBridgeUrl">保存地址</view>
  565. <view class="control-chip {{mockBridgeConnected ? 'control-chip--active' : 'control-chip--secondary'}}" bindtap="handleConnectMockLocationBridge">连接模拟源</view>
  566. <view class="control-chip control-chip--secondary" bindtap="handleDisconnectMockLocationBridge">断开模拟源</view>
  567. </view>
  568. </view>
  569. </view>
  570. <view class="info-panel__row info-panel__row--stack">
  571. <text class="info-panel__label">Mock Coord</text>
  572. <text class="info-panel__value">{{mockCoordText}}</text>
  573. </view>
  574. <view class="info-panel__row">
  575. <text class="info-panel__label">Mock Speed</text>
  576. <text class="info-panel__value">{{mockSpeedText}}</text>
  577. </view>
  578. <view class="control-row">
  579. <view class="control-chip {{gpsTracking ? 'control-chip--active' : 'control-chip--secondary'}}" bindtap="handleToggleGpsTracking">{{gpsTracking ? '停止定位' : '开启定位'}}</view>
  580. </view>
  581. <view class="control-row">
  582. <view class="control-chip {{locationSourceMode === 'real' ? 'control-chip--active' : 'control-chip--secondary'}}" bindtap="handleSetRealLocationMode">真实定位</view>
  583. <view class="control-chip {{locationSourceMode === 'mock' ? 'control-chip--active' : 'control-chip--secondary'}}" bindtap="handleSetMockLocationMode">模拟定位</view>
  584. </view>
  585. <view class="debug-group-title">心率</view>
  586. <view class="info-panel__row">
  587. <text class="info-panel__label">Heart Rate</text>
  588. <text class="info-panel__value">{{heartRateStatusText}}</text>
  589. </view>
  590. <view class="info-panel__row">
  591. <text class="info-panel__label">Heart Source</text>
  592. <text class="info-panel__value">{{heartRateSourceText}}</text>
  593. </view>
  594. <view class="info-panel__row info-panel__row--stack">
  595. <text class="info-panel__label">HR Device</text>
  596. <text class="info-panel__value">{{heartRateDeviceText}}</text>
  597. </view>
  598. <view class="control-row">
  599. <view class="control-chip {{heartRateSourceMode === 'real' ? 'control-chip--active' : 'control-chip--secondary'}}" bindtap="handleSetRealHeartRateMode">真实心率</view>
  600. <view class="control-chip {{heartRateSourceMode === 'mock' ? 'control-chip--active' : 'control-chip--secondary'}}" bindtap="handleSetMockHeartRateMode">模拟心率</view>
  601. </view>
  602. <view class="info-panel__row" wx:if="{{heartRateSourceMode === 'real'}}">
  603. <text class="info-panel__label">HR Scan</text>
  604. <text class="info-panel__value">{{heartRateScanText}}</text>
  605. </view>
  606. <view class="debug-device-list" wx:if="{{heartRateSourceMode === 'real' && heartRateDiscoveredDevices.length}}">
  607. <view class="debug-device-card" wx:for="{{heartRateDiscoveredDevices}}" wx:key="deviceId">
  608. <view class="debug-device-card__main">
  609. <view class="debug-device-card__title-row">
  610. <text class="debug-device-card__name">{{item.name}}</text>
  611. <text class="debug-device-card__badge" wx:if="{{item.preferred}}">首选</text>
  612. </view>
  613. <text class="debug-device-card__meta">{{item.rssiText}}</text>
  614. </view>
  615. <view class="debug-device-card__action {{item.connected ? 'debug-device-card__action--active' : ''}}" data-device-id="{{item.deviceId}}" bindtap="handleConnectHeartRateDevice">{{item.connected ? '已连接' : '连接'}}</view>
  616. </view>
  617. </view>
  618. <view class="control-row" wx:if="{{heartRateSourceMode === 'real'}}">
  619. <view class="control-chip {{heartRateConnected ? 'control-chip--active' : 'control-chip--secondary'}}" bindtap="handleConnectHeartRate">{{heartRateConnected ? '心率带已连接' : '连接心率带'}}</view>
  620. <view class="control-chip control-chip--secondary" bindtap="handleDisconnectHeartRate">断开心率带</view>
  621. </view>
  622. <view class="control-row" wx:if="{{heartRateSourceMode === 'real'}}">
  623. <view class="control-chip control-chip--secondary" bindtap="handleClearPreferredHeartRateDevice">清除首选</view>
  624. </view>
  625. <view class="info-panel__row info-panel__row--stack" wx:if="{{heartRateSourceMode === 'mock'}}">
  626. <text class="info-panel__label">Mock HR Bridge</text>
  627. <text class="info-panel__value">{{mockHeartRateBridgeStatusText}}</text>
  628. </view>
  629. <view class="info-panel__row info-panel__row--stack" wx:if="{{heartRateSourceMode === 'mock'}}">
  630. <text class="info-panel__label">Mock HR URL</text>
  631. <view class="debug-inline-stack">
  632. <input
  633. class="debug-input"
  634. value="{{mockHeartRateBridgeUrlDraft}}"
  635. placeholder="ws://192.168.x.x:17865/mock-gps"
  636. bindinput="handleMockHeartRateBridgeUrlInput"
  637. />
  638. <view class="control-row control-row--compact">
  639. <view class="control-chip control-chip--secondary" bindtap="handleSaveMockHeartRateBridgeUrl">保存地址</view>
  640. <view class="control-chip {{mockHeartRateBridgeConnected ? 'control-chip--active' : 'control-chip--secondary'}}" bindtap="handleConnectMockHeartRateBridge">连接模拟心率源</view>
  641. <view class="control-chip control-chip--secondary" bindtap="handleDisconnectMockHeartRateBridge">断开模拟心率源</view>
  642. </view>
  643. </view>
  644. </view>
  645. <view class="info-panel__row" wx:if="{{heartRateSourceMode === 'mock'}}">
  646. <text class="info-panel__label">Mock BPM</text>
  647. <text class="info-panel__value">{{mockHeartRateText}}</text>
  648. </view>
  649. <view class="debug-group-title">方向</view>
  650. <view class="info-panel__row">
  651. <text class="info-panel__label">Heading Mode</text>
  652. <text class="info-panel__value">{{orientationModeText}}</text>
  653. </view>
  654. <view class="info-panel__row">
  655. <text class="info-panel__label">Sensor Heading</text>
  656. <text class="info-panel__value">{{sensorHeadingText}}</text>
  657. </view>
  658. <view class="info-panel__row">
  659. <text class="info-panel__label">Device Heading</text>
  660. <text class="info-panel__value">{{deviceHeadingText}}</text>
  661. </view>
  662. <view class="info-panel__row">
  663. <text class="info-panel__label">Pose</text>
  664. <text class="info-panel__value">{{devicePoseText}}</text>
  665. </view>
  666. <view class="info-panel__row">
  667. <text class="info-panel__label">Heading Confidence</text>
  668. <text class="info-panel__value">{{headingConfidenceText}}</text>
  669. </view>
  670. <view class="info-panel__row">
  671. <text class="info-panel__label">Compass Source</text>
  672. <text class="info-panel__value">{{compassSourceText}}</text>
  673. </view>
  674. <view class="info-panel__row">
  675. <text class="info-panel__label">Compass Tune</text>
  676. <text class="info-panel__value">{{compassTuningProfileText}}</text>
  677. </view>
  678. <view class="info-panel__row info-panel__row--stack">
  679. <text class="info-panel__label">Accel</text>
  680. <text class="info-panel__value">{{accelerometerText}}</text>
  681. </view>
  682. <view class="info-panel__row info-panel__row--stack">
  683. <text class="info-panel__label">Gyro</text>
  684. <text class="info-panel__value">{{gyroscopeText}}</text>
  685. </view>
  686. <view class="info-panel__row info-panel__row--stack">
  687. <text class="info-panel__label">Motion</text>
  688. <text class="info-panel__value">{{deviceMotionText}}</text>
  689. </view>
  690. <view class="info-panel__row info-panel__row--stack">
  691. <text class="info-panel__label">North Ref</text>
  692. <text class="info-panel__value">{{northReferenceText}}</text>
  693. </view>
  694. <view class="control-row">
  695. <view class="control-chip control-chip--secondary" bindtap="handleCycleNorthReferenceMode">{{northReferenceButtonText}}</view>
  696. </view>
  697. </view>
  698. <view class="debug-section">
  699. <view class="debug-section__header">
  700. <view class="debug-section__title">Telemetry</view>
  701. <view class="debug-section__desc">HUD 派生数据与心率颜色测试</view>
  702. </view>
  703. <view class="info-panel__row">
  704. <text class="info-panel__label">HR</text>
  705. <text class="info-panel__value">{{panelHeartRateValueText}} {{panelHeartRateUnitText}}</text>
  706. </view>
  707. <view class="info-panel__row">
  708. <text class="info-panel__label">HR Zone</text>
  709. <text class="info-panel__value">{{panelHeartRateZoneNameText}} {{panelHeartRateZoneRangeText}}</text>
  710. </view>
  711. <view class="info-panel__row">
  712. <text class="info-panel__label">Calories</text>
  713. <text class="info-panel__value">{{panelCaloriesValueText}} {{panelCaloriesUnitText}}</text>
  714. </view>
  715. <view class="info-panel__row">
  716. <text class="info-panel__label">Speed</text>
  717. <text class="info-panel__value">{{panelSpeedValueText}} km/h</text>
  718. </view>
  719. <view class="info-panel__row">
  720. <text class="info-panel__label">Avg Speed</text>
  721. <text class="info-panel__value">{{panelAverageSpeedValueText}} {{panelAverageSpeedUnitText}}</text>
  722. </view>
  723. <view class="info-panel__row">
  724. <text class="info-panel__label">Target Dist</text>
  725. <text class="info-panel__value">{{panelDistanceValueText}} {{panelDistanceUnitText}}</text>
  726. </view>
  727. <view class="info-panel__row">
  728. <text class="info-panel__label">Accuracy</text>
  729. <text class="info-panel__value">{{panelAccuracyValueText}} {{panelAccuracyUnitText}}</text>
  730. </view>
  731. <view class="control-row control-row--triple">
  732. <view class="control-chip control-chip--secondary" bindtap="handleDebugHeartRateBlue">蓝</view>
  733. <view class="control-chip control-chip--secondary" bindtap="handleDebugHeartRatePurple">紫</view>
  734. <view class="control-chip control-chip--secondary" bindtap="handleDebugHeartRateGreen">绿</view>
  735. </view>
  736. <view class="control-row control-row--triple">
  737. <view class="control-chip control-chip--secondary" bindtap="handleDebugHeartRateYellow">黄</view>
  738. <view class="control-chip control-chip--secondary" bindtap="handleDebugHeartRateOrange">橙</view>
  739. <view class="control-chip control-chip--secondary" bindtap="handleDebugHeartRateRed">红</view>
  740. </view>
  741. <view class="control-row">
  742. <view class="control-chip control-chip--secondary" bindtap="handleClearDebugHeartRate">清除</view>
  743. </view>
  744. </view>
  745. <view class="debug-section">
  746. <view class="debug-section__header">
  747. <view class="debug-section__title">Rendering</view>
  748. <view class="debug-section__desc">地图渲染、视角与参考图层</view>
  749. </view>
  750. <view class="info-panel__row">
  751. <text class="info-panel__label">Renderer</text>
  752. <text class="info-panel__value">{{renderMode}}</text>
  753. </view>
  754. <view class="info-panel__row info-panel__row--stack">
  755. <text class="info-panel__label">Projection</text>
  756. <text class="info-panel__value">{{projectionMode}}</text>
  757. </view>
  758. <view class="info-panel__row">
  759. <text class="info-panel__label">Zoom</text>
  760. <text class="info-panel__value">{{zoom}}</text>
  761. </view>
  762. <view class="info-panel__row">
  763. <text class="info-panel__label">Rotation</text>
  764. <text class="info-panel__value">{{rotationText}}</text>
  765. </view>
  766. <view class="info-panel__row">
  767. <text class="info-panel__label">Auto Source</text>
  768. <text class="info-panel__value">{{autoRotateSourceText}}</text>
  769. </view>
  770. <view class="info-panel__row">
  771. <text class="info-panel__label">Calibration</text>
  772. <text class="info-panel__value">{{autoRotateCalibrationText}}</text>
  773. </view>
  774. <view class="control-row">
  775. <view class="control-chip {{osmReferenceEnabled ? 'control-chip--active' : 'control-chip--secondary'}}" bindtap="handleToggleOsmReference">{{osmReferenceText}}</view>
  776. <view class="control-chip" wx:if="{{orientationMode === 'manual'}}" bindtap="handleRotateStep">旋转 +15°</view>
  777. </view>
  778. <view class="control-row control-row--triple">
  779. <view class="control-chip {{orientationMode === 'manual' ? 'control-chip--active' : ''}}" bindtap="handleSetManualMode">手动</view>
  780. <view class="control-chip {{orientationMode === 'north-up' ? 'control-chip--active' : ''}}" bindtap="handleSetNorthUpMode">北朝上</view>
  781. <view class="control-chip {{orientationMode === 'heading-up' ? 'control-chip--active' : ''}}" bindtap="handleSetHeadingUpMode">朝向朝上</view>
  782. </view>
  783. <view class="control-row" wx:if="{{orientationMode === 'heading-up'}}">
  784. <view class="control-chip" bindtap="handleAutoRotateCalibrate">按当前方向校准</view>
  785. </view>
  786. </view>
  787. <view class="debug-section">
  788. <view class="debug-section__header">
  789. <view class="debug-section__title">Diagnostics</view>
  790. <view class="debug-section__desc">配置、瓦片缓存与运行状态</view>
  791. </view>
  792. <view class="info-panel__row info-panel__row--stack">
  793. <text class="info-panel__label">Config</text>
  794. <text class="info-panel__value">{{configStatusText}}</text>
  795. </view>
  796. <view class="info-panel__row info-panel__row--stack">
  797. <text class="info-panel__label">Status</text>
  798. <text class="info-panel__value">{{statusText}}</text>
  799. </view>
  800. <view class="info-panel__row info-panel__row--stack">
  801. <text class="info-panel__label">Tile URL</text>
  802. <text class="info-panel__value">{{tileSource}}</text>
  803. </view>
  804. <view class="info-panel__row">
  805. <text class="info-panel__label">Center Tile</text>
  806. <text class="info-panel__value">{{centerText}}</text>
  807. </view>
  808. <view class="info-panel__row">
  809. <text class="info-panel__label">Tile Size</text>
  810. <text class="info-panel__value">{{tileSizePx}}px</text>
  811. </view>
  812. <view class="info-panel__row">
  813. <text class="info-panel__label">Visible Tiles</text>
  814. <text class="info-panel__value">{{visibleTileCount}}</text>
  815. </view>
  816. <view class="info-panel__row">
  817. <text class="info-panel__label">Ready Tiles</text>
  818. <text class="info-panel__value">{{readyTileCount}}</text>
  819. </view>
  820. <view class="info-panel__row">
  821. <text class="info-panel__label">Memory Tiles</text>
  822. <text class="info-panel__value">{{memoryTileCount}}</text>
  823. </view>
  824. <view class="info-panel__row">
  825. <text class="info-panel__label">Disk Tiles</text>
  826. <text class="info-panel__value">{{diskTileCount}}</text>
  827. </view>
  828. <view class="info-panel__row">
  829. <text class="info-panel__label">Cache Hit</text>
  830. <text class="info-panel__value">{{cacheHitRateText}}</text>
  831. </view>
  832. <view class="info-panel__row">
  833. <text class="info-panel__label">Disk Hits</text>
  834. <text class="info-panel__value">{{diskHitCount}}</text>
  835. </view>
  836. <view class="info-panel__row">
  837. <text class="info-panel__label">Net Fetches</text>
  838. <text class="info-panel__value">{{networkFetchCount}}</text>
  839. </view>
  840. </view>
  841. </scroll-view>
  842. </view>
  843. </view>
  844. </view>