Compare commits

...
3 Commits
Author SHA1 Message Date
jacobxu666 381e609001 Merge branch 'master' into xuchao 2026-09-03 16:29:20 +08:00
jacobxu666 41a380562a 添加.gitignore,忽略构建产物和node_modules 2026-07-17 11:09:59 +08:00
jacobxu666 476cb64ee2 优化首页、场馆、折扣页面卡片布局及宽屏适配
- 首页:banner限制最大高度300px,页面支持滚动
- 场馆/折扣:卡片结构统一,地址和距离合并容器靠右对齐
- 卡片宽度自适应屏幕,间距统一margin 12px
- card-name填充容器,超长截断
2026-07-17 11:08:57 +08:00
2 changed files with 32 additions and 12 deletions
+7 -1
View File
@@ -150,11 +150,17 @@
.page { .page {
height: 100vh; height: 100vh;
background-color: #f5f5f5; background-color: #f5f5f5;
overflow: hidden; overflow-y: auto;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
} }
.banner {
width: 100%;
max-height: 300px;
overflow: hidden;
}
.banner-img { .banner-img {
width: 100%; width: 100%;
display: block; display: block;
+25 -11
View File
@@ -22,11 +22,13 @@
<view class="card-info"> <view class="card-info">
<text class="card-name">{{ item.name }}</text> <text class="card-name">{{ item.name }}</text>
<text class="card-category">{{ item.category }}</text> <text class="card-category">{{ item.category }}</text>
<text class="card-address">{{ item.address }}</text> <view class="card-bottom">
</view> <text class="card-address">{{ item.address }}</text>
<view class="card-distance" v-if="item.distance !== null"> <view class="card-distance" v-if="item.distance !== null">
<u-icon name="map" color="#999999" size="24"></u-icon> <u-icon name="map" color="#999999" size="24"></u-icon>
<text class="distance-text">{{ item.distance < 1 ? Math.round(item.distance * 1000) + 'm' : Math.round(item.distance) + 'km' }}</text> <text class="distance-text">{{ item.distance < 1 ? Math.round(item.distance * 1000) + 'm' : Math.round(item.distance) + 'km' }}</text>
</view>
</view>
</view> </view>
</view> </view>
<view v-if="hasScrolled" class="nomore-area"> <view v-if="hasScrolled" class="nomore-area">
@@ -194,7 +196,6 @@ export default {
} }
.list-area { .list-area {
padding: 12px;
} }
.venue-card { .venue-card {
@@ -203,11 +204,10 @@ export default {
background-color: #ffffff; background-color: #ffffff;
border: 1px solid #f2f2f7; border: 1px solid #f2f2f7;
border-radius: 6px; border-radius: 6px;
width: 702rpx; padding: 12px;
padding: 24px 12px;
gap: 12px; gap: 12px;
box-shadow: 0 2px 3px #f2f2f7; box-shadow: 0 2px 3px #f2f2f7;
margin-bottom: 12px; margin: 12px;
} }
.card-img { .card-img {
@@ -222,12 +222,18 @@ export default {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 0; gap: 0;
width: 100%;
min-width: 0;
} }
.card-name { .card-name {
font-size: 16px; font-size: 16px;
font-weight: 500; font-weight: 500;
color: #000000; color: #000000;
width: 100%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
} }
.card-category { .card-category {
@@ -236,14 +242,22 @@ export default {
margin-top: 8px; margin-top: 8px;
} }
.card-bottom {
display: flex;
align-items: center;
justify-content: flex-end;
margin-top: 8px;
gap: 8px;
}
.card-address { .card-address {
flex: 1;
font-size: 14px; font-size: 14px;
color: #727272; color: #727272;
margin-top: 8px;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
max-width: 200px; min-width: 0;
} }
.card-distance { .card-distance {