From 500078714411487af00161e01bd7e0b5efdc3414 Mon Sep 17 00:00:00 2001
From: cloudroam <cloudroam>
Date: 星期四, 07 八月 2025 13:32:32 +0800
Subject: [PATCH] add:热门景点
---
pages/home/trip-card.vue | 38 ++++++++++++++++++++++++++------------
1 files changed, 26 insertions(+), 12 deletions(-)
diff --git a/pages/home/trip-card.vue b/pages/home/trip-card.vue
index 2c57369..74c5154 100644
--- a/pages/home/trip-card.vue
+++ b/pages/home/trip-card.vue
@@ -8,12 +8,14 @@
<view class="title">{{ title }}</view>
<view class="subtitle">{{ subtitle }}</view>
<view class="footer">
- <view class="rating">
- <up-icon class="star" name="star-fill" size="14" color="#FFD700" />
- <text class="score">{{ score }}</text>
- </view>
- <view class="more" @click="goToDetail">
- 查看详情 ->
+ <view class="rating-more">
+ <view class="rating-group"> <!-- 新增包裹层 -->
+ <up-icon class="star" name="star-fill" size="14" color="#FFD700" />
+ <text class="score">{{ score }}</text>
+ </view>
+ <view class="more" @click="goToDetail">
+ 查看详情 ->
+ </view>
</view>
</view>
</view>
@@ -52,7 +54,7 @@
.image-wrapper {
position: relative;
width: 100%;
- height: 260rpx;
+ height: 400rpx; // 从260rpx增加到360rpx
}
.image {
@@ -72,22 +74,23 @@
}
.content {
- padding: 24rpx;
+ padding: 10rpx; // 上下padding从24rpx减到20rpx
background-color: #121212;
}
.title {
- font-size: 16px;
+ font-size: 15px; // 从16px减小
color: #ffffff;
font-weight: 500;
- margin-bottom: 12rpx;
+ margin-bottom: 8rpx; // 从12rpx减小
line-height: 1.4;
}
.subtitle {
- font-size: 14px;
+ font-size: 13px; // 从14px减小
color: rgba(255, 255, 255, 0.8);
- margin-bottom: 20rpx;
+ margin-bottom: 16rpx; // 从20rpx减小
+ line-height: 1.3; // 添加行高控制
}
.footer {
@@ -116,5 +119,16 @@
user-select: none;
cursor: pointer;
}
+ .rating-more {
+ display: flex;
+ align-items: center;
+ width: 100%; // 添加宽度
+ justify-content: space-between; // 改为两端对齐
+ }
+ .rating-group { /* 新增样式 */
+ display: flex;
+ align-items: center;
+ gap: 8rpx; /* 图标和分数之间的间距 */
+ }
</style>
\ No newline at end of file
--
Gitblit v1.9.3