123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644 |
- /* 全局样式 */
- page {
- background-color: #f5f5f5;
- font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei UI', 'Microsoft YaHei', Arial, sans-serif;
- }
- .container {
- padding: 20rpx;
- }
- /* 搜索栏样式 */
- .search-container {
- display: flex;
- align-items: center;
- margin-bottom: 20rpx;
- }
- .search-box {
- flex: 1;
- height: 80rpx;
- background-color: #fff;
- border-radius: 40rpx;
- display: flex;
- align-items: center;
- padding: 0 20rpx;
- margin-right: 20rpx;
- }
- .search-icon {
- width: 36rpx;
- height: 36rpx;
- margin-right: 10rpx;
- }
- .search-input {
- flex: 1;
- height: 100%;
- font-size: 28rpx;
- }
- .voice-icon {
- width: 36rpx;
- height: 36rpx;
- margin-left: 10rpx;
- }
- .search-btn {
- width: 160rpx;
- height: 80rpx;
- background-color: #1677ff;
- color: #fff;
- text-align: center;
- line-height: 80rpx;
- border-radius: 40rpx;
- font-size: 30rpx;
- }
- /* 热门搜索样式 */
- .hot-search {
- margin-bottom: 30rpx;
- }
- .hot-title {
- font-size: 28rpx;
- color: #333;
- margin-bottom: 15rpx;
- }
- .hot-tags {
- display: flex;
- flex-wrap: wrap;
- }
- .tag {
- padding: 10rpx 20rpx;
- background-color: #f0f0f0;
- border-radius: 20rpx;
- font-size: 26rpx;
- color: #666;
- margin-right: 20rpx;
- margin-bottom: 15rpx;
- }
- .tag:hover {
- background-color: #e6f4ff;
- color: #1677ff;
- }
- /* 药品分类样式 */
- .category-container {
- margin-bottom: 30rpx;
- }
- .category-title {
- font-size: 28rpx;
- color: #333;
- margin-bottom: 15rpx;
- }
- .category-scroll {
- white-space: nowrap;
- padding-bottom: 10rpx;
- }
- .category-item {
- display: inline-block;
- text-align: center;
- margin-right: 40rpx;
- }
- .category-item.active text {
- color: #1677ff;
- }
- .category-icon {
- width: 80rpx;
- height: 15rpx;
- background-color: #f5f5f5;
- border-radius: 40rpx;
- display: flex;
- align-items: center;
- justify-content: center;
- margin-bottom: 10rpx;
- }
- .category-icon image {
- width: 48rpx;
- height: 48rpx;
- }
- .category-item text {
- font-size: 24rpx;
- color: #666;
- }
- /* 药品列表样式 */
- .medicine-list {
- margin-bottom: 30rpx;
- }
- .list-header {
- display: flex;
- justify-content: space-between;
- align-items: center;
- margin-bottom: 20rpx;
- }
- .list-title {
- font-size: 30rpx;
- font-weight: bold;
- color: #333;
- }
- .view-all {
- font-size: 26rpx;
- color: #1677ff;
- }
- .medicine-cards {
- display: flex;
- flex-wrap: wrap;
- justify-content: space-between;
- }
- .medicine-card {
- width: 345rpx;
- background-color: #fff;
- border-radius: 16rpx;
- margin-bottom: 20rpx;
- overflow: hidden;
- box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
- }
- .card-image {
- position: relative;
- width: 100%;
- height: 345rpx;
- overflow: hidden;
- }
- .card-image image {
- width: 100%;
- height: 100%;
- object-fit: cover;
- }
- .badge {
- position: absolute;
- top: 15rpx;
- left: 15rpx;
- background-color: #ff4d4f;
- color: #fff;
- font-size: 22rpx;
- padding: 5rpx 10rpx;
- border-radius: 8rpx;
- }
- .card-content {
- padding: 15rpx;
- }
- .card-title {
- font-size: 28rpx;
- font-weight: bold;
- color: #333;
- margin-bottom: 8rpx;
- display: -webkit-box;
- -webkit-box-orient: vertical;
- -webkit-line-clamp: 1;
- overflow: hidden;
- }
- .card-subtitle {
- font-size: 24rpx;
- color: #666;
- margin-bottom: 12rpx;
- }
- .card-info {
- display: flex;
- justify-content: space-between;
- align-items: center;
- }
- .card-price {
- font-size: 30rpx;
- font-weight: bold;
- color: #ff4d4f;
- }
- .card-rating {
- display: flex;
- align-items: center;
- font-size: 24rpx;
- color: #ff7d00;
- }
- .card-rating image {
- width: 24rpx;
- height: 24rpx;
- margin-right: 5rpx;
- }
- /* 搜索结果样式 */
- .search-results {
- position: fixed;
- top: 260rpx;
- left: 0;
- right: 0;
- bottom: 0;
- background-color: #fff;
- z-index: 100;
- padding: 20rpx;
- overflow-y: auto;
- }
- .result-header {
- display: flex;
- justify-content: space-between;
- align-items: center;
- margin-bottom: 20rpx;
- padding-bottom: 20rpx;
- border-bottom: 1rpx solid #eee;
- }
- .result-count {
- font-size: 28rpx;
- color: #333;
- }
- .close-results {
- font-size: 26rpx;
- color: #999;
- }
- .result-list {
- padding-bottom: 20rpx;
- }
- .result-item {
- display: flex;
- align-items: center;
- padding: 20rpx 0;
- border-bottom: 1rpx solid #eee;
- }
- .result-image {
- width: 120rpx;
- height: 120rpx;
- border-radius: 12rpx;
- margin-right: 20rpx;
- }
- .result-content {
- flex: 1;
- }
- .result-title {
- font-size: 28rpx;
- font-weight: bold;
- color: #333;
- margin-bottom: 8rpx;
- }
- .result-subtitle {
- font-size: 24rpx;
- color: #666;
- margin-bottom: 10rpx;
- }
- .result-price {
- font-size: 30rpx;
- font-weight: bold;
- color: #ff4d4f;
- }
- /* 语音搜索对话框样式 */
- .voice-dialog {
- position: fixed;
- top: 0;
- left: 0;
- right: 0;
- bottom: 0;
- z-index: 200;
- }
- .dialog-mask {
- position: absolute;
- top: 0;
- left: 0;
- right: 0;
- bottom: 0;
- background-color: rgba(0, 0, 0, 0.5);
- }
- .dialog-content {
- position: absolute;
- top: 50%;
- left: 50%;
- -webkit-transform: translate(-50%, -50%);
- transform: translate(-50%, -50%);
- width: 600rpx;
- background-color: #fff;
- border-radius: 24rpx;
- padding: 40rpx;
- text-align: center;
- }
- .dialog-title {
- font-size: 32rpx;
- font-weight: bold;
- color: #333;
- margin-bottom: 40rpx;
- }
- .voice-icon-container {
- width: 180rpx;
- height: 180rpx;
- background-color: #e6f4ff;
- border-radius: 90rpx;
- display: flex;
- align-items: center;
- justify-content: center;
- margin: 0 auto 40rpx;
- }
- .voice-mic {
- width: 80rpx;
- height: 80rpx;
- }
- .dialog-text {
- font-size: 30rpx;
- color: #666;
- margin-bottom: 60rpx;
- }
- .dialog-buttons {
- display: flex;
- justify-content: space-between;
- align-items: center;
- }
- .cancel-btn {
- width: 250rpx;
- height: 80rpx;
- background-color: #f0f0f0;
- color: #666;
- text-align: center;
- line-height: 80rpx;
- border-radius: 40rpx;
- font-size: 30rpx;
- }
- .confirm-btn {
- width: 250rpx;
- height: 80rpx;
- background-color: #1677ff;
- color: #fff;
- text-align: center;
- line-height: 80rpx;
- border-radius: 40rpx;
- font-size: 30rpx;
- }
|