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

449 lines
7.2 KiB

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-rating {
  212. display: flex;
  213. align-items: center;
  214. color: #ff9900;
  215. }
  216. .rating-value {
  217. font-size: 28rpx;
  218. font-weight: bold;
  219. margin-right: 5rpx;
  220. }
  221. .rating-star {
  222. font-size: 24rpx;
  223. }
  224. .store-info {
  225. margin-bottom: 20rpx;
  226. }
  227. .info-item {
  228. display: flex;
  229. align-items: flex-start;
  230. margin-bottom: 15rpx;
  231. font-size: 26rpx;
  232. color: #666;
  233. line-height: 1.5;
  234. }
  235. .info-icon {
  236. margin-right: 15rpx;
  237. flex-shrink: 0;
  238. font-size: 28rpx;
  239. }
  240. .info-text {
  241. flex: 1;
  242. }
  243. .store-distance {
  244. color: #3a7ff3;
  245. font-size: 24rpx;
  246. margin-left: 20rpx;
  247. flex-shrink: 0;
  248. }
  249. /* 店铺图片 */
  250. .store-images {
  251. margin-bottom: 20rpx;
  252. }
  253. .store-images-scroll {
  254. white-space: nowrap;
  255. height: 200rpx;
  256. }
  257. .store-image-item {
  258. display: inline-block;
  259. width: 300rpx;
  260. height: 200rpx;
  261. border-radius: 10rpx;
  262. overflow: hidden;
  263. margin-right: 20rpx;
  264. }
  265. .store-image {
  266. width: 100%;
  267. height: 100%;
  268. }
  269. /* 店铺操作按钮 */
  270. .store-actions {
  271. display: flex;
  272. gap: 20rpx;
  273. }
  274. .action-btn {
  275. flex: 1;
  276. height: 80rpx;
  277. border-radius: 10rpx;
  278. font-size: 26rpx;
  279. display: flex;
  280. align-items: center;
  281. justify-content: center;
  282. }
  283. .map-btn {
  284. background-color: #3a7ff3;
  285. color: white;
  286. }
  287. .call-btn {
  288. background-color: #4CAF50;
  289. color: white;
  290. }
  291. .btn-icon {
  292. margin-right: 10rpx;
  293. font-size: 30rpx;
  294. }
  295. /* 药品详细信息网格 */
  296. .details-grid {
  297. display: grid;
  298. grid-template-columns: repeat(2, 1fr);
  299. gap: 20rpx;
  300. margin-top: 20rpx;
  301. }
  302. .detail-item {
  303. background-color: #f8f9fa;
  304. border-radius: 10rpx;
  305. padding: 20rpx;
  306. }
  307. .item-label {
  308. font-size: 26rpx;
  309. color: #999;
  310. margin-bottom: 10rpx;
  311. }
  312. .item-value {
  313. font-size: 26rpx;
  314. color: #333;
  315. line-height: 1.5;
  316. }
  317. /* 加载状态 */
  318. .loading-container {
  319. display: flex;
  320. flex-direction: column;
  321. align-items: center;
  322. justify-content: center;
  323. height: 60vh;
  324. }
  325. .loading-spinner {
  326. width: 80rpx;
  327. height: 80rpx;
  328. border: 8rpx solid #f3f3f3;
  329. border-top: 8rpx solid #3a7ff3;
  330. border-radius: 50%;
  331. animation: spin 1s linear infinite;
  332. margin-bottom: 30rpx;
  333. }
  334. @keyframes spin {
  335. 0% { transform: rotate(0deg); }
  336. 100% { transform: rotate(360deg); }
  337. }
  338. /* 错误状态 */
  339. .error-container {
  340. display: flex;
  341. flex-direction: column;
  342. align-items: center;
  343. justify-content: center;
  344. height: 60vh;
  345. padding: 0 50rpx;
  346. }
  347. .error-icon {
  348. font-size: 120rpx;
  349. color: #ff4444;
  350. margin-bottom: 30rpx;
  351. }
  352. .error-text {
  353. font-size: 32rpx;
  354. color: #666;
  355. margin-bottom: 40rpx;
  356. text-align: center;
  357. }
  358. .error-btn {
  359. width: 300rpx;
  360. height: 80rpx;
  361. line-height: 80rpx;
  362. background-color: #3a7ff3;
  363. color: white;
  364. border-radius: 12rpx;
  365. font-size: 30rpx;
  366. }
  367. /* 响应式调整 */
  368. @media (max-width: 700rpx) {
  369. .details-grid {
  370. grid-template-columns: 1fr;
  371. }
  372. .bottom-action-bar {
  373. padding: 15rpx 20rpx;
  374. }
  375. .action-bar-btn {
  376. font-size: 26rpx;
  377. height: 80rpx;
  378. }
  379. }