与牧同行-小程序用户端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

274 lines
5.3 KiB

2 months ago
2 months ago
2 months ago
  1. /* 页面容器 */
  2. .page-container {
  3. width: 100%;
  4. min-height: 100vh;
  5. padding: 10rpx 0;
  6. background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  7. }
  8. /* 按钮组样式 */
  9. .button-group {
  10. width: 92%;
  11. margin: 24rpx auto;
  12. display: flex;
  13. background: #ffffff;
  14. border-radius: 20rpx;
  15. padding: 8rpx;
  16. box-shadow: 0 8rpx 24rpx rgba(0, 0, 0, 0.08);
  17. position: relative;
  18. z-index: 10;
  19. }
  20. /* 按钮基础样式 */
  21. .button {
  22. flex: 1;
  23. height: 88rpx;
  24. display: flex;
  25. align-items: center;
  26. justify-content: center;
  27. font-size: 32rpx;
  28. font-weight: 500;
  29. color: #666;
  30. background: transparent;
  31. border-radius: 16rpx;
  32. transition: all 0.3s ease;
  33. position: relative;
  34. overflow: hidden;
  35. }
  36. /* 激活状态按钮 */
  37. .button.active {
  38. background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
  39. color: #ffffff;
  40. font-weight: 600;
  41. box-shadow: 0 4rpx 16rpx rgba(106, 17, 203, 0.3);
  42. }
  43. /* 按钮点击效果 */
  44. .button:active {
  45. transform: scale(0.98);
  46. }
  47. /* 地图容器 */
  48. .map-container {
  49. width: 92%;
  50. margin: 0 auto;
  51. border-radius: 24rpx;
  52. overflow: hidden;
  53. box-shadow: 0 12rpx 48rpx rgba(0, 0, 0, 0.15);
  54. height: calc(100vh - 200rpx);
  55. position: relative;
  56. }
  57. /* 地图本身样式 */
  58. .map-container map {
  59. width: 100%;
  60. height: 100%;
  61. border-radius: 24rpx;
  62. display: block; /* 确保正确显示 */
  63. }
  64. /* 问题修复:移除或修改覆盖层 */
  65. /* 原来的 ::before 伪元素会覆盖地图,阻挡交互 */
  66. /* 如果你需要加载状态,可以这样修改: */
  67. .map-container.loading::before {
  68. content: '';
  69. position: absolute;
  70. top: 0;
  71. left: 0;
  72. right: 0;
  73. bottom: 0;
  74. background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  75. opacity: 0.3; /* 降低不透明度 */
  76. transition: opacity 0.3s;
  77. border-radius: 24rpx;
  78. z-index: -1; /* 放到地图后面 */
  79. pointer-events: none; /* 关键:不阻挡点击事件 */
  80. }
  81. /* 或者完全移除加载状态样式,因为地图有自己的加载状态 */
  82. /* 地图控制按钮样式(如果需要添加) */
  83. .map-controls {
  84. position: absolute;
  85. right: 24rpx;
  86. bottom: 40rpx;
  87. display: flex;
  88. flex-direction: column;
  89. gap: 16rpx;
  90. z-index: 100;
  91. }
  92. .map-control-btn {
  93. width: 80rpx;
  94. height: 80rpx;
  95. background: rgba(255, 255, 255, 0.95);
  96. border-radius: 50%;
  97. display: flex;
  98. align-items: center;
  99. justify-content: center;
  100. box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.15);
  101. font-size: 36rpx;
  102. font-weight: bold;
  103. color: #333;
  104. transition: all 0.2s;
  105. border: 1rpx solid rgba(0, 0, 0, 0.1);
  106. }
  107. .map-control-btn:active {
  108. background: rgba(240, 240, 240, 0.95);
  109. transform: scale(0.95);
  110. }
  111. .map-control-btn.location {
  112. background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
  113. color: white;
  114. }
  115. /* 地图详情卡片样式 - 添加在地图容器内部 */
  116. .marker-detail-card {
  117. position: absolute;
  118. bottom: 30rpx;
  119. left: 50%;
  120. transform: translateX(-50%);
  121. width: 90%;
  122. background: rgba(255, 255, 255, 0.95);
  123. border-radius: 16rpx;
  124. padding: 24rpx;
  125. box-shadow: 0 8rpx 32rpx rgba(0, 0, 0, 0.15);
  126. z-index: 100;
  127. backdrop-filter: blur(10rpx);
  128. border: 1rpx solid rgba(255, 255, 255, 0.2);
  129. animation: slideUp 0.3s ease;
  130. }
  131. @keyframes slideUp {
  132. from {
  133. transform: translateX(-50%) translateY(100%);
  134. opacity: 0;
  135. }
  136. to {
  137. transform: translateX(-50%) translateY(0);
  138. opacity: 1;
  139. }
  140. }
  141. .detail-header {
  142. display: flex;
  143. justify-content: space-between;
  144. align-items: center;
  145. margin-bottom: 20rpx;
  146. border-bottom: 1rpx solid #f0f0f0;
  147. padding-bottom: 16rpx;
  148. }
  149. .detail-title {
  150. font-size: 30rpx;
  151. font-weight: 600;
  152. color: #333;
  153. flex: 1;
  154. overflow: hidden;
  155. text-overflow: ellipsis;
  156. white-space: nowrap;
  157. margin-right: 16rpx;
  158. }
  159. .detail-close {
  160. font-size: 32rpx;
  161. color: #999;
  162. width: 40rpx;
  163. height: 40rpx;
  164. display: flex;
  165. align-items: center;
  166. justify-content: center;
  167. border-radius: 50%;
  168. cursor: pointer;
  169. transition: background-color 0.2s;
  170. }
  171. .detail-close:active {
  172. background-color: #f5f5f5;
  173. }
  174. .detail-info {
  175. margin-bottom: 20rpx;
  176. }
  177. .info-item {
  178. display: flex;
  179. margin-bottom: 12rpx;
  180. line-height: 1.4;
  181. }
  182. .info-item:last-child {
  183. margin-bottom: 0;
  184. }
  185. .info-label {
  186. font-size: 26rpx;
  187. color: #666;
  188. width: 100rpx;
  189. flex-shrink: 0;
  190. }
  191. .info-value {
  192. font-size: 26rpx;
  193. color: #333;
  194. flex: 1;
  195. }
  196. .detail-actions {
  197. display: flex;
  198. justify-content: center;
  199. }
  200. .action-btn {
  201. background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
  202. color: white;
  203. border: none;
  204. border-radius: 8rpx;
  205. padding: 0rpx 40rpx;
  206. font-size: 28rpx;
  207. font-weight: 500;
  208. transition: transform 0.2s;
  209. box-shadow: 0 4rpx 12rpx rgba(106, 17, 203, 0.2);
  210. }
  211. .action-btn::after {
  212. border: none;
  213. }
  214. .action-btn:active {
  215. transform: scale(0.95);
  216. }
  217. /* 响应式适配 */
  218. @media (max-width: 480px) {
  219. .button-group {
  220. width: 94%;
  221. margin: 20rpx auto;
  222. }
  223. .map-container {
  224. width: 94%;
  225. height: calc(100vh - 180rpx);
  226. }
  227. .button {
  228. height: 80rpx;
  229. font-size: 28rpx;
  230. }
  231. .map-controls {
  232. right: 16rpx;
  233. bottom: 30rpx;
  234. }
  235. .map-control-btn {
  236. width: 70rpx;
  237. height: 70rpx;
  238. font-size: 32rpx;
  239. }
  240. }