与牧同行-小程序用户端
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.

273 lines
5.3 KiB

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