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

352 lines
6.3 KiB

  1. .detail-page {
  2. min-height: 100vh;
  3. background: transparent;
  4. position: relative;
  5. font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  6. }
  7. .bg-blur {
  8. position: fixed;
  9. top: 0;
  10. left: 0;
  11. width: 100%;
  12. height: 100%;
  13. background: linear-gradient(145deg, #f8fafd 0%, #f1f5f9 100%);
  14. z-index: 0;
  15. pointer-events: none;
  16. }
  17. /* 加载状态 */
  18. .loading-container {
  19. position: fixed;
  20. top: 50%;
  21. left: 50%;
  22. transform: translate(-50%, -50%);
  23. display: flex;
  24. flex-direction: column;
  25. align-items: center;
  26. gap: 24rpx;
  27. color: #64748b;
  28. font-size: 28rpx;
  29. }
  30. .loading-spinner {
  31. width: 80rpx;
  32. height: 80rpx;
  33. border: 4rpx solid #e2e8f0;
  34. border-top-color: #3b82f6;
  35. border-radius: 50%;
  36. animation: spin 1s linear infinite;
  37. }
  38. @keyframes spin {
  39. to { transform: rotate(360deg); }
  40. }
  41. /* 滚动内容 */
  42. .detail-scroll {
  43. height: 100vh;
  44. position: relative;
  45. z-index: 2;
  46. }
  47. .detail-content {
  48. padding: 24rpx 32rpx 40rpx;
  49. }
  50. /* 卡片通用样式 */
  51. .title-card,
  52. .info-card,
  53. .content-card,
  54. .measures-card {
  55. background: rgba(255, 255, 255, 0.9);
  56. backdrop-filter: blur(20px);
  57. -webkit-backdrop-filter: blur(20px);
  58. border-radius: 32rpx;
  59. padding: 32rpx;
  60. margin-bottom: 24rpx;
  61. box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.02), 0 2rpx 4rpx rgba(0, 0, 0, 0.02);
  62. border: 1rpx solid rgba(255, 255, 255, 0.8);
  63. }
  64. /* 标题卡片 */
  65. .title-card {
  66. margin-top: 8rpx;
  67. }
  68. .category-wrap {
  69. display: flex;
  70. align-items: center;
  71. gap: 16rpx;
  72. margin-bottom: 24rpx;
  73. }
  74. .category-tag,
  75. .level-tag {
  76. display: inline-block;
  77. padding: 8rpx 24rpx;
  78. border-radius: 60rpx;
  79. font-size: 24rpx;
  80. font-weight: 500;
  81. background: #eef2ff;
  82. }
  83. .title {
  84. font-size: 44rpx;
  85. font-weight: 700;
  86. color: #0f172a;
  87. line-height: 1.4;
  88. margin-bottom: 24rpx;
  89. display: block;
  90. letter-spacing: 0.5rpx;
  91. }
  92. .time-info {
  93. display: flex;
  94. align-items: center;
  95. gap: 8rpx;
  96. padding-top: 24rpx;
  97. border-top: 1rpx solid #e2e8f0;
  98. }
  99. .time-icon {
  100. font-size: 32rpx;
  101. opacity: 0.6;
  102. }
  103. .time-text {
  104. font-size: 26rpx;
  105. color: #64748b;
  106. }
  107. /* 卡片头部 */
  108. .info-header,
  109. .content-header,
  110. .measures-header {
  111. display: flex;
  112. align-items: center;
  113. gap: 12rpx;
  114. margin-bottom: 24rpx;
  115. }
  116. .info-icon,
  117. .content-icon,
  118. .measures-icon {
  119. font-size: 36rpx;
  120. }
  121. .info-title,
  122. .content-title,
  123. .measures-title {
  124. font-size: 32rpx;
  125. font-weight: 600;
  126. color: #1e293b;
  127. }
  128. /* 影响区域 */
  129. .region-tags {
  130. display: flex;
  131. flex-wrap: wrap;
  132. gap: 16rpx;
  133. }
  134. .region-tag {
  135. font-size: 28rpx;
  136. display: block;
  137. }
  138. /* 内容卡片 */
  139. .brief-content,
  140. .detail-body {
  141. font-size: 32rpx;
  142. color: #334155;
  143. line-height: 1.7;
  144. background: #f8fafc;
  145. padding: 28rpx;
  146. border-radius: 24rpx;
  147. border: 1rpx solid #e2e8f0;
  148. }
  149. /* 应对措施卡片 */
  150. .measures-list {
  151. display: flex;
  152. flex-direction: column;
  153. gap: 20rpx;
  154. }
  155. .measure-item {
  156. display: flex;
  157. align-items: flex-start;
  158. gap: 16rpx;
  159. background: #f8fafc;
  160. padding: 24rpx;
  161. border-radius: 20rpx;
  162. border: 1rpx solid #e2e8f0;
  163. }
  164. .measure-number {
  165. width: 40rpx;
  166. height: 40rpx;
  167. background: #3b82f6;
  168. color: white;
  169. font-size: 24rpx;
  170. font-weight: 600;
  171. border-radius: 50%;
  172. display: flex;
  173. align-items: center;
  174. justify-content: center;
  175. flex-shrink: 0;
  176. }
  177. .measure-text {
  178. flex: 1;
  179. font-size: 30rpx;
  180. color: #334155;
  181. line-height: 1.5;
  182. }
  183. /* 底部留白 */
  184. .bottom-space {
  185. height: 40rpx;
  186. }
  187. /* 错误状态 */
  188. .error-state {
  189. position: fixed;
  190. top: 50%;
  191. left: 50%;
  192. transform: translate(-50%, -50%);
  193. display: flex;
  194. flex-direction: column;
  195. align-items: center;
  196. justify-content: center;
  197. background: rgba(255, 255, 255, 0.9);
  198. backdrop-filter: blur(20px);
  199. -webkit-backdrop-filter: blur(20px);
  200. padding: 60rpx 80rpx;
  201. border-radius: 48rpx;
  202. border: 1rpx solid rgba(255, 255, 255, 0.8);
  203. box-shadow: 0 20rpx 40rpx rgba(0, 0, 0, 0.02);
  204. min-width: 500rpx;
  205. }
  206. .error-emoji {
  207. font-size: 120rpx;
  208. margin-bottom: 24rpx;
  209. opacity: 0.8;
  210. }
  211. .error-text {
  212. font-size: 32rpx;
  213. color: #475569;
  214. margin-bottom: 48rpx;
  215. }
  216. .back-btn {
  217. background: #3b82f6;
  218. color: white;
  219. font-size: 30rpx;
  220. padding: 20rpx 60rpx;
  221. border-radius: 48rpx;
  222. border: none;
  223. box-shadow: 0 8rpx 24rpx rgba(59, 130, 246, 0.3);
  224. }
  225. .back-btn:active {
  226. opacity: 0.8;
  227. transform: scale(0.98);
  228. }
  229. /* 富文本样式 */
  230. rich-text {
  231. width: 100%;
  232. }
  233. rich-text p {
  234. margin-bottom: 16rpx;
  235. }
  236. rich-text h1,
  237. rich-text h2,
  238. rich-text h3,
  239. rich-text h4 {
  240. font-weight: 600;
  241. color: #0f172a;
  242. margin: 24rpx 0 16rpx;
  243. }
  244. rich-text h1 { font-size: 40rpx; }
  245. rich-text h2 { font-size: 36rpx; }
  246. rich-text h3 { font-size: 34rpx; }
  247. rich-text h4 { font-size: 32rpx; }
  248. rich-text ul,
  249. rich-text ol {
  250. padding-left: 40rpx;
  251. margin: 16rpx 0;
  252. }
  253. rich-text li {
  254. margin-bottom: 8rpx;
  255. color: #334155;
  256. }
  257. rich-text a {
  258. color: #3b82f6;
  259. text-decoration: underline;
  260. }
  261. rich-text img {
  262. max-width: 100%;
  263. border-radius: 20rpx;
  264. margin: 20rpx 0;
  265. box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.05);
  266. }
  267. rich-text blockquote {
  268. border-left: 6rpx solid #3b82f6;
  269. background: #f1f5f9;
  270. padding: 20rpx 24rpx;
  271. margin: 20rpx 0;
  272. border-radius: 12rpx;
  273. color: #475569;
  274. font-style: italic;
  275. }
  276. rich-text table {
  277. width: 100%;
  278. border-collapse: collapse;
  279. margin: 20rpx 0;
  280. background: white;
  281. border-radius: 16rpx;
  282. overflow: hidden;
  283. }
  284. rich-text td,
  285. rich-text th {
  286. border: 1rpx solid #e2e8f0;
  287. padding: 16rpx;
  288. text-align: left;
  289. }
  290. rich-text th {
  291. background: #f8fafc;
  292. font-weight: 600;
  293. color: #1e293b;
  294. }
  295. rich-text code {
  296. background: #f1f5f9;
  297. padding: 4rpx 12rpx;
  298. border-radius: 8rpx;
  299. font-family: monospace;
  300. color: #dc2626;
  301. }
  302. rich-text pre {
  303. background: #1e293b;
  304. color: #e2e8f0;
  305. padding: 24rpx;
  306. border-radius: 20rpx;
  307. overflow-x: auto;
  308. margin: 20rpx 0;
  309. }