提交 17c12bdd 作者: 廖在望

feat: app页面效果调整。

上级 b4b30b49
...@@ -685,6 +685,8 @@ ...@@ -685,6 +685,8 @@
"pageOrientation": "portrait", "pageOrientation": "portrait",
"app-plus": { "app-plus": {
"scrollIndicator": "none", "scrollIndicator": "none",
"popGesture": "close",
"bounce": "none",
"titleNView": { "titleNView": {
"titleSize": "18" "titleSize": "18"
} }
......
...@@ -291,7 +291,7 @@ ...@@ -291,7 +291,7 @@
<fui-icon name="search" color="#999" :size="32"></fui-icon> <fui-icon name="search" color="#999" :size="32"></fui-icon>
<input class="search-input" v-model="model.searchText" placeholder="搜地点、技能..." placeholder-style="color:#ccc" @confirm="onSearch" /> <input class="search-input" v-model="model.searchText" placeholder="搜地点、技能..." placeholder-style="color:#ccc" @confirm="onSearch" />
</view> </view>
<scroll-view scroll-x class="tab-scroll" v-if="model.currentEmploymentId != 2"> <scroll-view scroll-x class="tab-scroll">
<view class="tabs-row"> <view class="tabs-row">
<view <view
v-for="tab in model.categoryTabs" v-for="tab in model.categoryTabs"
...@@ -310,16 +310,17 @@ ...@@ -310,16 +310,17 @@
<view class="map-container"> <view class="map-container">
<Mapbox @register="registerMap" /> <Mapbox @register="registerMap" />
<!-- 回到当前位置 --> <!-- 悬浮控制按钮组 -->
<view class="map-ctrl-group">
<view class="map-ctrl location" @click="backToUserLocation"> <view class="map-ctrl location" @click="backToUserLocation">
<fui-icon name="location" color="#5db66f" :size="44"></fui-icon> <fui-icon name="location" color="#5db66f" :size="28"></fui-icon>
<text class="ctrl-text">定位</text>
</view>
<view class="map-ctrl list-btn" @click="onListModeClick">
<fui-icon name="list" color="#fff" :size="28"></fui-icon>
<text class="ctrl-text">列表</text>
</view> </view>
</view> </view>
<!-- 模式切换胶囊 (沉浸式风格) -->
<view class="view-toggle-pill" @tap="onListModeClick">
<fui-icon name="list" :size="32" color="#5db66f"></fui-icon>
<text class="toggle-text">返回列表</text>
</view> </view>
<RegisterDialog ref="registerDialogRef" /> <RegisterDialog ref="registerDialogRef" />
...@@ -397,43 +398,50 @@ ...@@ -397,43 +398,50 @@
position: relative; position: relative;
} }
.map-ctrl { .map-ctrl-group {
position: absolute; position: absolute;
right: 30rpx; right: 24rpx;
bottom: 200rpx; bottom: 100rpx;
display: flex;
flex-direction: column;
gap: 16rpx;
z-index: 200;
.map-ctrl {
position: relative;
width: 88rpx; width: 88rpx;
height: 88rpx; height: 88rpx;
background-color: #fff; background-color: #fff;
border-radius: 50%; border-radius: 50%;
display: flex; display: flex;
flex-direction: column;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
box-shadow: 0 8rpx 24rpx rgba(0,0,0,0.12); box-shadow: 0 6rpx 20rpx rgba(0, 0, 0, 0.15);
z-index: 200; transition: all 0.2s;
&:active { transform: scale(0.92); }
&:active {
transform: scale(0.92);
} }
.view-toggle-pill { .ctrl-text {
position: fixed; font-size: 18rpx;
left: 50%; color: #fff;
transform: translateX(-50%); margin-top: 2rpx;
bottom: 60rpx; }
background-color: rgba(255, 255, 255, 0.95);
backdrop-filter: blur(12px); &.location {
padding: 20rpx 48rpx; .ctrl-text {
border-radius: 100rpx; color: #5db66f;
display: flex; }
align-items: center; }
box-shadow: 0 12rpx 40rpx rgba(0, 0, 0, 0.15);
border: 1rpx solid rgba(255,255,255,0.5); &.list-btn {
z-index: 110; width: 100rpx;
transition: all 0.3s; height: 100rpx;
&:active { transform: translateX(-50%) scale(0.95); } background: linear-gradient(135deg, #1890ff 0%, #096dd9 100%);
.toggle-text { box-shadow: 0 6rpx 20rpx rgba(24, 144, 255, 0.4);
font-size: 28rpx; }
color: #1a1a1a;
font-weight: bold;
margin-left: 16rpx;
} }
} }
......
...@@ -161,21 +161,27 @@ ...@@ -161,21 +161,27 @@
<!-- 干农活 (具体服务列表) --> <!-- 干农活 (具体服务列表) -->
<template v-else> <template v-else>
<view class="service-grid">
<view v-for="item in farmMachineList" :key="item.id" class="service-card" @click="handleItemClick(item)"> <view v-for="item in farmMachineList" :key="item.id" class="service-card" @click="handleItemClick(item)">
<view class="card-main"> <view class="card-media">
<image class="thumb" :src="item.picture || '/static/images/nongjifuwu/default-service.png'" mode="aspectFill" /> <image class="thumb" :src="item.picture || '/static/images/nongjifuwu/default-service.png'" mode="aspectFill" />
<view class="info"> <view class="status-tag">服务中</view>
</view>
<view class="card-content">
<text class="title">{{ item.name }}</text> <text class="title">{{ item.name }}</text>
<text class="desc">范围:{{ getText(item.scope, ' / ') }}</text> <view class="scope-row">
<fui-icon name="location" :size="20" color="#999"></fui-icon>
<text class="scope-text">{{ getText(item.scope, ' / ') || '全国' }}</text>
</view>
<view class="price-row"> <view class="price-row">
<text class="price">{{ item.price }}</text> <view class="price-box">
<text class="unit">元/亩</text> <text class="price-symbol">¥</text>
<text class="price-value">{{ item.price }}</text>
<text class="price-unit">/亩</text>
</view> </view>
<view class="book-btn" @click.stop="handleApply(item)">预约</view>
</view> </view>
</view> </view>
<view class="card-footer">
<view class="status">服务中</view>
<view class="btn orange" @click.stop="handleApply(item)">立即预约</view>
</view> </view>
</view> </view>
</template> </template>
...@@ -260,42 +266,59 @@ ...@@ -260,42 +266,59 @@
.enterprise-card { .enterprise-card {
background-color: #fff; background-color: #fff;
border-radius: 20rpx; border-radius: 16rpx;
padding: 24rpx; padding: 24rpx;
margin-bottom: 24rpx; margin-bottom: 20rpx;
box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.04);
.card-main { .card-main {
display: flex; display: flex;
align-items: center;
.logo { .logo {
width: 140rpx; width: 120rpx;
height: 140rpx; height: 120rpx;
border-radius: 12rpx; border-radius: 12rpx;
background-color: #f8f8f8; background-color: #f8f8f8;
flex-shrink: 0;
} }
.info { .info {
flex: 1; flex: 1;
margin-left: 20rpx; margin-left: 20rpx;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
.name { .name {
font-size: 30rpx; font-size: 30rpx;
font-weight: bold; font-weight: 600;
color: #333; color: #333;
margin-bottom: 8rpx;
} }
.scope { .scope {
font-size: 24rpx; font-size: 24rpx;
color: #999; color: #999;
margin-top: 10rpx; line-height: 1.4;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 1;
overflow: hidden;
} }
.tags { .tags {
display: flex; display: flex;
margin-top: 12rpx; margin-top: 12rpx;
.tag { .tag {
font-size: 20rpx; font-size: 20rpx;
padding: 2rpx 12rpx; padding: 4rpx 12rpx;
background-color: #e6f5e8; background-color: #e6f5e8;
color: #5db66f; color: #5db66f;
border-radius: 4rpx; border-radius: 6rpx;
margin-right: 10rpx; margin-right: 10rpx;
font-weight: 500;
&.orange { &.orange {
background-color: #fff7e6; background-color: #fff7e6;
color: #fa8c16; color: #fa8c16;
...@@ -304,93 +327,137 @@ ...@@ -304,93 +327,137 @@
} }
} }
} }
.card-footer { .card-footer {
margin-top: 20rpx; margin-top: 16rpx;
padding-top: 20rpx; padding-top: 16rpx;
border-top: 1rpx solid #f5f5f5; border-top: 1rpx solid #f5f5f5;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
.addr { .addr {
display: flex; display: flex;
align-items: center; align-items: center;
font-size: 22rpx; font-size: 22rpx;
color: #999; color: #999;
} }
.btn { .btn {
padding: 8rpx 24rpx; padding: 10rpx 24rpx;
background-color: #5db66f; background: linear-gradient(135deg, #5db66f 0%, #3da553 100%);
color: #fff; color: #fff;
font-size: 24rpx; font-size: 24rpx;
border-radius: 26rpx; font-weight: 500;
border-radius: 24rpx;
} }
} }
} }
.service-grid {
display: flex;
flex-wrap: wrap;
margin: 0 -10rpx;
}
.service-card { .service-card {
width: calc(50% - 20rpx);
margin: 10rpx;
background-color: #fff; background-color: #fff;
border-radius: 20rpx; border-radius: 16rpx;
padding: 24rpx; overflow: hidden;
margin-bottom: 24rpx; box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.04);
.card-main {
display: flex; .card-media {
position: relative;
width: 100%;
height: 260rpx;
background-color: #f5f5f5;
.thumb { .thumb {
width: 160rpx; width: 100%;
height: 160rpx; height: 100%;
border-radius: 12rpx;
} }
.info {
flex: 1; .status-tag {
margin-left: 20rpx; position: absolute;
display: flex; top: 16rpx;
flex-direction: column; left: 16rpx;
.title { font-size: 20rpx;
font-size: 30rpx; color: #fff;
font-weight: bold; background: linear-gradient(135deg, #5db66f 0%, #3da553 100%);
color: #333; padding: 4rpx 14rpx;
border-radius: 6rpx;
font-weight: 500;
} }
.desc {
font-size: 24rpx;
color: #999;
margin-top: 10rpx;
} }
.price-row {
margin-top: auto; .card-content {
.price { padding: 16rpx;
font-size: 36rpx;
color: #ff4d4f; .title {
font-weight: bold; font-size: 28rpx;
font-weight: 600;
color: #333;
display: block;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
margin-bottom: 8rpx;
} }
.unit {
.scope-row {
display: flex;
align-items: center;
margin-bottom: 12rpx;
.scope-text {
font-size: 22rpx; font-size: 22rpx;
color: #999; color: #999;
margin-left: 4rpx; margin-left: 4rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
max-width: 240rpx;
} }
} }
}
} .price-row {
.card-footer {
margin-top: 20rpx;
padding-top: 20rpx;
border-top: 1rpx dashed #eee;
display: flex; display: flex;
justify-content: space-between;
align-items: center; align-items: center;
.status { justify-content: space-between;
.price-box {
display: flex;
align-items: baseline;
}
.price-symbol {
font-size: 22rpx; font-size: 22rpx;
color: #5db66f; color: #ff4d4f;
background-color: #e6f5e8; font-weight: 600;
padding: 4rpx 16rpx;
border-radius: 4rpx;
} }
.btn {
padding: 10rpx 28rpx; .price-value {
background-color: #5db66f; font-size: 34rpx;
color: #ff4d4f;
font-weight: 700;
margin-left: 2rpx;
}
.price-unit {
font-size: 20rpx;
color: #999;
margin-left: 2rpx;
}
.book-btn {
padding: 8rpx 20rpx;
background: linear-gradient(135deg, #fa8c16 0%, #fa541c 100%);
color: #fff; color: #fff;
font-size: 24rpx; font-size: 22rpx;
border-radius: 30rpx; font-weight: 500;
&.orange { border-radius: 20rpx;
background-color: #fa8c16;
} }
} }
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论