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

427 lines
6.9 KiB

1 month ago
1 month ago
  1. /* 详情页样式 */
  2. .detail-page {
  3. background-color: #f8f9fa;
  4. min-height: 100vh;
  5. padding-bottom: 120rpx;
  6. }
  7. /* 药品图片轮播 */
  8. .medicine-images {
  9. position: relative;
  10. height: 500rpx;
  11. }
  12. .detail-swiper {
  13. height: 100%;
  14. }
  15. .detail-image {
  16. width: 100%;
  17. height: 100%;
  18. }
  19. /* 药品标签 */
  20. .detail-tag {
  21. position: absolute;
  22. top: 30rpx;
  23. right: 30rpx;
  24. padding: 10rpx 20rpx;
  25. border-radius: 25rpx;
  26. font-size: 24rpx;
  27. color: white;
  28. background-color: #3a7ff3;
  29. display: flex;
  30. align-items: center;
  31. z-index: 10;
  32. }
  33. .detail-tag.prescription {
  34. background-color: #f44336;
  35. }
  36. .detail-tag.otc {
  37. background-color: #4CAF50;
  38. }
  39. .detail-tag.chinese {
  40. background-color: #FF9800;
  41. }
  42. .detail-tag.health {
  43. background-color: #9C27B0;
  44. }
  45. .hot-badge {
  46. margin-left: 10rpx;
  47. padding: 4rpx 10rpx;
  48. background-color: #ff4444;
  49. border-radius: 15rpx;
  50. font-size: 20rpx;
  51. }
  52. /* 基本信息区域 */
  53. .basic-info-section {
  54. background-color: white;
  55. padding: 30rpx;
  56. margin-bottom: 20rpx;
  57. }
  58. .medicine-name {
  59. font-size: 38rpx;
  60. font-weight: bold;
  61. color: #333;
  62. margin-bottom: 15rpx;
  63. line-height: 1.4;
  64. }
  65. .medicine-spec {
  66. font-size: 28rpx;
  67. color: #666;
  68. margin-bottom: 10rpx;
  69. }
  70. .manufacturer {
  71. font-size: 26rpx;
  72. color: #999;
  73. margin-bottom: 25rpx;
  74. }
  75. /* 价格信息 */
  76. .price-info {
  77. display: flex;
  78. align-items: center;
  79. justify-content: space-between;
  80. padding-top: 20rpx;
  81. border-top: 2rpx solid #f8f9fa;
  82. }
  83. .current-price {
  84. color: #ff4444;
  85. font-weight: bold;
  86. display: flex;
  87. align-items: baseline;
  88. }
  89. .price-symbol {
  90. font-size: 28rpx;
  91. margin-right: 4rpx;
  92. }
  93. .price-value {
  94. font-size: 48rpx;
  95. }
  96. .original-price {
  97. font-size: 26rpx;
  98. color: #999;
  99. text-decoration: line-through;
  100. }
  101. .sales-count {
  102. font-size: 26rpx;
  103. color: #666;
  104. }
  105. /* 信息区块通用样式 */
  106. .info-section,
  107. .expert-section,
  108. .store-section,
  109. .details-section,
  110. .safety-tips {
  111. background-color: white;
  112. margin-bottom: 20rpx;
  113. padding: 30rpx;
  114. }
  115. .section-title {
  116. font-size: 34rpx;
  117. font-weight: bold;
  118. color: #333;
  119. margin-bottom: 20rpx;
  120. padding-bottom: 15rpx;
  121. border-bottom: 2rpx solid #f8f9fa;
  122. }
  123. .section-content {
  124. font-size: 28rpx;
  125. color: #666;
  126. line-height: 1.6;
  127. }
  128. /* 专家卡片 */
  129. .expert-card {
  130. background-color: #f8f9fa;
  131. border-radius: 15rpx;
  132. padding: 25rpx;
  133. margin-top: 20rpx;
  134. }
  135. .expert-header {
  136. display: flex;
  137. margin-bottom: 20rpx;
  138. }
  139. .expert-avatar {
  140. width: 100rpx;
  141. height: 100rpx;
  142. border-radius: 50%;
  143. margin-right: 20rpx;
  144. }
  145. .expert-info {
  146. flex: 1;
  147. }
  148. .expert-name {
  149. font-size: 32rpx;
  150. font-weight: bold;
  151. color: #333;
  152. margin-bottom: 8rpx;
  153. }
  154. .expert-title {
  155. font-size: 26rpx;
  156. color: #666;
  157. font-weight: normal;
  158. }
  159. .expert-hospital {
  160. font-size: 26rpx;
  161. color: #3a7ff3;
  162. margin-bottom: 10rpx;
  163. }
  164. .expert-experience {
  165. font-size: 24rpx;
  166. color: #999;
  167. }
  168. .experience-label {
  169. }
  170. .expert-reason {
  171. background-color: white;
  172. border-radius: 10rpx;
  173. padding: 20rpx;
  174. margin-bottom: 15rpx;
  175. }
  176. .reason-title {
  177. font-size: 28rpx;
  178. font-weight: bold;
  179. color: #333;
  180. margin-bottom: 10rpx;
  181. }
  182. .reason-content {
  183. font-size: 26rpx;
  184. color: #666;
  185. line-height: 1.6;
  186. }
  187. .recommend-time {
  188. font-size: 24rpx;
  189. color: #999;
  190. text-align: right;
  191. }
  192. /* 店铺卡片 */
  193. .store-card {
  194. background-color: #f8f9fa;
  195. border-radius: 15rpx;
  196. padding: 25rpx;
  197. margin-top: 20rpx;
  198. }
  199. .store-header {
  200. display: flex;
  201. justify-content: space-between;
  202. align-items: center;
  203. margin-bottom: 20rpx;
  204. }
  205. .store-name {
  206. font-size: 32rpx;
  207. font-weight: bold;
  208. color: #333;
  209. flex: 1;
  210. }
  211. .store-info {
  212. margin-bottom: 20rpx;
  213. }
  214. .info-item {
  215. display: flex;
  216. align-items: flex-start;
  217. margin-bottom: 15rpx;
  218. font-size: 26rpx;
  219. color: #666;
  220. line-height: 1.5;
  221. }
  222. .info-icon {
  223. margin-right: 15rpx;
  224. flex-shrink: 0;
  225. font-size: 28rpx;
  226. }
  227. .info-text {
  228. flex: 1;
  229. }
  230. /* 店铺图片 */
  231. .store-images {
  232. margin-bottom: 20rpx;
  233. }
  234. .store-images-scroll {
  235. white-space: nowrap;
  236. height: 200rpx;
  237. }
  238. .store-image-item {
  239. display: inline-block;
  240. width: 300rpx;
  241. height: 200rpx;
  242. border-radius: 10rpx;
  243. overflow: hidden;
  244. margin-right: 20rpx;
  245. }
  246. .store-image {
  247. width: 100%;
  248. height: 100%;
  249. }
  250. /* 店铺操作按钮 */
  251. .store-actions {
  252. display: flex;
  253. gap: 20rpx;
  254. }
  255. .action-btn {
  256. flex: 1;
  257. height: 80rpx;
  258. border-radius: 10rpx;
  259. font-size: 26rpx;
  260. display: flex;
  261. align-items: center;
  262. justify-content: center;
  263. }
  264. .map-btn {
  265. background-color: #3a7ff3;
  266. color: white;
  267. }
  268. .call-btn {
  269. background-color: #4CAF50;
  270. color: white;
  271. }
  272. .btn-icon {
  273. margin-right: 10rpx;
  274. font-size: 30rpx;
  275. }
  276. /* 药品详细信息网格 */
  277. .details-grid {
  278. display: grid;
  279. grid-template-columns: repeat(2, 1fr);
  280. gap: 20rpx;
  281. margin-top: 20rpx;
  282. }
  283. .detail-item {
  284. background-color: #f8f9fa;
  285. border-radius: 10rpx;
  286. padding: 20rpx;
  287. }
  288. .item-label {
  289. font-size: 26rpx;
  290. color: #999;
  291. margin-bottom: 10rpx;
  292. }
  293. .item-value {
  294. font-size: 26rpx;
  295. color: #333;
  296. line-height: 1.5;
  297. }
  298. /* 加载状态 */
  299. .loading-container {
  300. display: flex;
  301. flex-direction: column;
  302. align-items: center;
  303. justify-content: center;
  304. height: 60vh;
  305. }
  306. .loading-spinner {
  307. width: 80rpx;
  308. height: 80rpx;
  309. border: 8rpx solid #f3f3f3;
  310. border-top: 8rpx solid #3a7ff3;
  311. border-radius: 50%;
  312. animation: spin 1s linear infinite;
  313. margin-bottom: 30rpx;
  314. }
  315. @keyframes spin {
  316. 0% { transform: rotate(0deg); }
  317. 100% { transform: rotate(360deg); }
  318. }
  319. /* 错误状态 */
  320. .error-container {
  321. display: flex;
  322. flex-direction: column;
  323. align-items: center;
  324. justify-content: center;
  325. height: 60vh;
  326. padding: 0 50rpx;
  327. }
  328. .error-icon {
  329. font-size: 120rpx;
  330. color: #ff4444;
  331. margin-bottom: 30rpx;
  332. }
  333. .error-text {
  334. font-size: 32rpx;
  335. color: #666;
  336. margin-bottom: 40rpx;
  337. text-align: center;
  338. }
  339. .error-btn {
  340. width: 300rpx;
  341. height: 80rpx;
  342. line-height: 80rpx;
  343. background-color: #3a7ff3;
  344. color: white;
  345. border-radius: 12rpx;
  346. font-size: 30rpx;
  347. }
  348. /* 响应式调整 */
  349. @media (max-width: 700rpx) {
  350. .details-grid {
  351. grid-template-columns: 1fr;
  352. }
  353. .bottom-action-bar {
  354. padding: 15rpx 20rpx;
  355. }
  356. .action-bar-btn {
  357. font-size: 26rpx;
  358. height: 80rpx;
  359. }
  360. }