<template>
|
<view class="search-card">
|
<image class="background-image" src="https://ai-public.mastergo.com/ai/img_res/6a226f9e9652c51cd535c3490535dfeb.jpg" mode="aspectFill" />
|
|
<!-- 右上角搜索按钮 -->
|
<view class="search-btn">
|
<u-icon name="search" size="30" color="#333" />
|
<text class="search-text">搜索目的地</text>
|
</view>
|
|
<!-- 中间圆形图标 -->
|
<view class="center-icon">
|
<view class="icon-circle">
|
<u-icon name="/static/common/geo-earth.png" size="100" color="#fff" />
|
</view>
|
</view>
|
</view>
|
</template>
|
|
<script>
|
export default {
|
name: 'SearchCard'
|
}
|
</script>
|
|
|
<style scoped>
|
.search-card {
|
position: relative;
|
height: 500rpx;
|
border-radius: 50rpx;
|
overflow: hidden;
|
}
|
|
.background-image {
|
width: 100%;
|
height: 100%;
|
border-radius: 20rpx;
|
}
|
|
.search-btn {
|
position: absolute;
|
top: 16rpx;
|
right: 32rpx;
|
background-color: #fff;
|
border-radius: 10rpx;
|
padding: 8rpx 16rpx;
|
display: flex;
|
align-items: center;
|
box-shadow: 0 2rpx 6rpx rgba(0, 0, 0, 0.1);
|
height: 50rpx;
|
line-height: 50rpx;
|
}
|
|
.search-text {
|
margin-left: 8rpx;
|
font-size: 24rpx;
|
color: #333;
|
}
|
|
.center-icon {
|
position: absolute;
|
top: 50%;
|
left: 50%;
|
transform: translate(-50%, -50%);
|
}
|
|
.icon-circle {
|
background-color: rgba(0, 0, 0, 0.5);
|
width: 180rpx;
|
height: 180rpx;
|
border-radius: 50%;
|
display: flex;
|
align-items: center;
|
justify-content: center;
|
}
|
</style>
|
|