medicine.wxss 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644
  1. /* 全局样式 */
  2. page {
  3. background-color: #f5f5f5;
  4. font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei UI', 'Microsoft YaHei', Arial, sans-serif;
  5. }
  6. .container {
  7. padding: 20rpx;
  8. }
  9. /* 搜索栏样式 */
  10. .search-container {
  11. display: flex;
  12. align-items: center;
  13. margin-bottom: 20rpx;
  14. }
  15. .search-box {
  16. flex: 1;
  17. height: 80rpx;
  18. background-color: #fff;
  19. border-radius: 40rpx;
  20. display: flex;
  21. align-items: center;
  22. padding: 0 20rpx;
  23. margin-right: 20rpx;
  24. }
  25. .search-icon {
  26. width: 36rpx;
  27. height: 36rpx;
  28. margin-right: 10rpx;
  29. }
  30. .search-input {
  31. flex: 1;
  32. height: 100%;
  33. font-size: 28rpx;
  34. }
  35. .voice-icon {
  36. width: 36rpx;
  37. height: 36rpx;
  38. margin-left: 10rpx;
  39. }
  40. .search-btn {
  41. width: 160rpx;
  42. height: 80rpx;
  43. background-color: #1677ff;
  44. color: #fff;
  45. text-align: center;
  46. line-height: 80rpx;
  47. border-radius: 40rpx;
  48. font-size: 30rpx;
  49. }
  50. /* 热门搜索样式 */
  51. .hot-search {
  52. margin-bottom: 30rpx;
  53. }
  54. .hot-title {
  55. font-size: 28rpx;
  56. color: #333;
  57. margin-bottom: 15rpx;
  58. }
  59. .hot-tags {
  60. display: flex;
  61. flex-wrap: wrap;
  62. }
  63. .tag {
  64. padding: 10rpx 20rpx;
  65. background-color: #f0f0f0;
  66. border-radius: 20rpx;
  67. font-size: 26rpx;
  68. color: #666;
  69. margin-right: 20rpx;
  70. margin-bottom: 15rpx;
  71. }
  72. .tag:hover {
  73. background-color: #e6f4ff;
  74. color: #1677ff;
  75. }
  76. /* 药品分类样式 */
  77. .category-container {
  78. margin-bottom: 30rpx;
  79. }
  80. .category-title {
  81. font-size: 28rpx;
  82. color: #333;
  83. margin-bottom: 15rpx;
  84. }
  85. .category-scroll {
  86. white-space: nowrap;
  87. padding-bottom: 10rpx;
  88. }
  89. .category-item {
  90. display: inline-block;
  91. text-align: center;
  92. margin-right: 40rpx;
  93. }
  94. .category-item.active text {
  95. color: #1677ff;
  96. }
  97. .category-icon {
  98. width: 80rpx;
  99. height: 15rpx;
  100. background-color: #f5f5f5;
  101. border-radius: 40rpx;
  102. display: flex;
  103. align-items: center;
  104. justify-content: center;
  105. margin-bottom: 10rpx;
  106. }
  107. .category-icon image {
  108. width: 48rpx;
  109. height: 48rpx;
  110. }
  111. .category-item text {
  112. font-size: 24rpx;
  113. color: #666;
  114. }
  115. /* 药品列表样式 */
  116. .medicine-list {
  117. margin-bottom: 30rpx;
  118. }
  119. .list-header {
  120. display: flex;
  121. justify-content: space-between;
  122. align-items: center;
  123. margin-bottom: 20rpx;
  124. }
  125. .list-title {
  126. font-size: 30rpx;
  127. font-weight: bold;
  128. color: #333;
  129. }
  130. .view-all {
  131. font-size: 26rpx;
  132. color: #1677ff;
  133. }
  134. .medicine-cards {
  135. display: flex;
  136. flex-wrap: wrap;
  137. justify-content: space-between;
  138. }
  139. .medicine-card {
  140. width: 345rpx;
  141. background-color: #fff;
  142. border-radius: 16rpx;
  143. margin-bottom: 20rpx;
  144. overflow: hidden;
  145. box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
  146. }
  147. .card-image {
  148. position: relative;
  149. width: 100%;
  150. height: 345rpx;
  151. overflow: hidden;
  152. }
  153. .card-image image {
  154. width: 100%;
  155. height: 100%;
  156. object-fit: cover;
  157. }
  158. .badge {
  159. position: absolute;
  160. top: 15rpx;
  161. left: 15rpx;
  162. background-color: #ff4d4f;
  163. color: #fff;
  164. font-size: 22rpx;
  165. padding: 5rpx 10rpx;
  166. border-radius: 8rpx;
  167. }
  168. .card-content {
  169. padding: 15rpx;
  170. }
  171. .card-title {
  172. font-size: 28rpx;
  173. font-weight: bold;
  174. color: #333;
  175. margin-bottom: 8rpx;
  176. display: -webkit-box;
  177. -webkit-box-orient: vertical;
  178. -webkit-line-clamp: 1;
  179. overflow: hidden;
  180. }
  181. .card-subtitle {
  182. font-size: 24rpx;
  183. color: #666;
  184. margin-bottom: 12rpx;
  185. }
  186. .card-info {
  187. display: flex;
  188. justify-content: space-between;
  189. align-items: center;
  190. }
  191. .card-price {
  192. font-size: 30rpx;
  193. font-weight: bold;
  194. color: #ff4d4f;
  195. }
  196. .card-rating {
  197. display: flex;
  198. align-items: center;
  199. font-size: 24rpx;
  200. color: #ff7d00;
  201. }
  202. .card-rating image {
  203. width: 24rpx;
  204. height: 24rpx;
  205. margin-right: 5rpx;
  206. }
  207. /* 搜索结果样式 */
  208. .search-results {
  209. position: fixed;
  210. top: 260rpx;
  211. left: 0;
  212. right: 0;
  213. bottom: 0;
  214. background-color: #fff;
  215. z-index: 100;
  216. padding: 20rpx;
  217. overflow-y: auto;
  218. }
  219. .result-header {
  220. display: flex;
  221. justify-content: space-between;
  222. align-items: center;
  223. margin-bottom: 20rpx;
  224. padding-bottom: 20rpx;
  225. border-bottom: 1rpx solid #eee;
  226. }
  227. .result-count {
  228. font-size: 28rpx;
  229. color: #333;
  230. }
  231. .close-results {
  232. font-size: 26rpx;
  233. color: #999;
  234. }
  235. .result-list {
  236. padding-bottom: 20rpx;
  237. }
  238. .result-item {
  239. display: flex;
  240. align-items: center;
  241. padding: 20rpx 0;
  242. border-bottom: 1rpx solid #eee;
  243. }
  244. .result-image {
  245. width: 120rpx;
  246. height: 120rpx;
  247. border-radius: 12rpx;
  248. margin-right: 20rpx;
  249. }
  250. .result-content {
  251. flex: 1;
  252. }
  253. .result-title {
  254. font-size: 28rpx;
  255. font-weight: bold;
  256. color: #333;
  257. margin-bottom: 8rpx;
  258. }
  259. .result-subtitle {
  260. font-size: 24rpx;
  261. color: #666;
  262. margin-bottom: 10rpx;
  263. }
  264. .result-price {
  265. font-size: 30rpx;
  266. font-weight: bold;
  267. color: #ff4d4f;
  268. }
  269. /* 语音搜索对话框样式 */
  270. .voice-dialog {
  271. position: fixed;
  272. top: 0;
  273. left: 0;
  274. right: 0;
  275. bottom: 0;
  276. z-index: 200;
  277. }
  278. .dialog-mask {
  279. position: absolute;
  280. top: 0;
  281. left: 0;
  282. right: 0;
  283. bottom: 0;
  284. background-color: rgba(0, 0, 0, 0.5);
  285. }
  286. .dialog-content {
  287. position: absolute;
  288. top: 50%;
  289. left: 50%;
  290. -webkit-transform: translate(-50%, -50%);
  291. transform: translate(-50%, -50%);
  292. width: 600rpx;
  293. background-color: #fff;
  294. border-radius: 24rpx;
  295. padding: 40rpx;
  296. text-align: center;
  297. }
  298. .dialog-title {
  299. font-size: 32rpx;
  300. font-weight: bold;
  301. color: #333;
  302. margin-bottom: 40rpx;
  303. }
  304. .voice-icon-container {
  305. width: 180rpx;
  306. height: 180rpx;
  307. background-color: #e6f4ff;
  308. border-radius: 90rpx;
  309. display: flex;
  310. align-items: center;
  311. justify-content: center;
  312. margin: 0 auto 40rpx;
  313. }
  314. .voice-mic {
  315. width: 80rpx;
  316. height: 80rpx;
  317. }
  318. .dialog-text {
  319. font-size: 30rpx;
  320. color: #666;
  321. margin-bottom: 60rpx;
  322. }
  323. .dialog-buttons {
  324. display: flex;
  325. justify-content: space-between;
  326. align-items: center;
  327. }
  328. .cancel-btn {
  329. width: 250rpx;
  330. height: 80rpx;
  331. background-color: #f0f0f0;
  332. color: #666;
  333. text-align: center;
  334. line-height: 80rpx;
  335. border-radius: 40rpx;
  336. font-size: 30rpx;
  337. }
  338. .confirm-btn {
  339. width: 250rpx;
  340. height: 80rpx;
  341. background-color: #1677ff;
  342. color: #fff;
  343. text-align: center;
  344. line-height: 80rpx;
  345. border-radius: 40rpx;
  346. font-size: 30rpx;
  347. }