<template>
|
<view class="box">
|
<view class="head" :style="{ height: 'calc(' + (navHeight + statusbarHeight + 'px + 112rpx)') }">
|
<view class="head-bar" :style="{ height: navHeight + statusbarHeight + 'px' }">
|
<view :style="{ width: '100%', height: statusbarHeight + 'px' }"></view>
|
<view class="head-bar-nav" :style="{ height: navHeight + 'px' }">
|
<text>社区</text>
|
</view>
|
</view>
|
<view class="search">
|
<u-search placeholder="请输入关键词" height="36" searchIconColor="#999999" borderColor="#eeeeee"
|
bgColor="rgba(255,255,255,0.9)" :showAction="false" v-model="keyword" />
|
<view class="search-shai" @click="show = true">
|
<text>筛选</text>
|
<image src="/static/icon/ic_shaixuan@2x.png" mode="widthFix"></image>
|
</view>
|
</view>
|
</view>
|
<view class="list">
|
<view class="list-item" v-for="(item, index) in 10" :key="index">
|
<view class="info">
|
<view class="info-title">挖掘机在冬季起动为什么困难?</view>
|
<view class="info-desc">挖掘机在冬季起动为什么困难?不仅决定于本身的技术状况,还受外界气温的影响</view>
|
<view class="info-data">
|
<view class="tips">维修</view>
|
<text>100 阅读|2025-10-10 21:00</text>
|
</view>
|
</view>
|
<view class="image">
|
<image src="/static/logo.png" mode="widthFix"></image>
|
</view>
|
</view>
|
</view>
|
<!-- 筛选 -->
|
<u-popup :show="show" mode="bottom" :safeAreaInsetBottom="false" round="15" :closeable="true" @close="show = false">
|
<view class="sear">
|
<view class="sear-title">筛选</view>
|
<view class="sear-item">
|
<view class="sear-item-label">分类</view>
|
<view class="sear-item-list">
|
<view class="sear-item-list-item active">维修</view>
|
<view class="sear-item-list-item">保养</view>
|
<view style="width: 216rpx; height: 0;"></view>
|
</view>
|
</view>
|
<view class="sear-item">
|
<view class="sear-item-label">所属品牌</view>
|
<view class="sear-item-list">
|
<view class="sear-item-list-item active">品牌名称</view>
|
<view class="sear-item-list-item">品牌名称</view>
|
<view style="width: 216rpx; height: 0;"></view>
|
</view>
|
</view>
|
<view class="sear-footer">
|
<view class="sear-footer-btn1">重置</view>
|
<view class="sear-footer-btn2">确认</view>
|
</view>
|
</view>
|
</u-popup>
|
</view>
|
</template>
|
|
<script>
|
import { mapState } from 'vuex'
|
export default {
|
computed: {
|
...mapState(['navHeight', 'statusbarHeight'])
|
},
|
data() {
|
return {
|
show: false,
|
keyword: ''
|
};
|
}
|
}
|
</script>
|
|
<style lang="scss" scoped>
|
.box {
|
width: 100%;
|
.sear {
|
width: 100%;
|
padding: 30rpx;
|
box-sizing: border-box;
|
.sear-title {
|
width: 100%;
|
text-align: center;
|
font-weight: 500;
|
font-size: 32rpx;
|
color: #111111;
|
}
|
.sear-item {
|
width: 100%;
|
display: flex;
|
flex-direction: column;
|
margin-top: 48rpx;
|
.sear-item-label {
|
font-weight: 500;
|
font-size: 32rpx;
|
color: #111111;
|
}
|
.sear-item-list {
|
margin-top: 30rpx;
|
display: flex;
|
align-items: center;
|
justify-content: space-between;
|
flex-wrap: wrap;
|
.active {
|
background: rgba(0,64,150,0.1) !important;
|
color: #004096 !important;
|
}
|
.sear-item-list-item {
|
width: 216rpx;
|
height: 72rpx;
|
line-height: 72rpx;
|
text-align: center;
|
background: #F7F7F7;
|
border-radius: 8rpx;
|
font-weight: 400;
|
font-size: 28rpx;
|
color: #333333;
|
}
|
}
|
}
|
.sear-footer {
|
width: 100%;
|
height: 88rpx;
|
margin-top: 80rpx;
|
display: flex;
|
align-items: center;
|
justify-content: space-between;
|
.sear-footer-btn1 {
|
width: 334rpx;
|
height: 88rpx;
|
line-height: 88rpx;
|
text-align: center;
|
background: #E5E5E5;
|
border-radius: 44rpx;
|
font-weight: 500;
|
font-size: 32rpx;
|
color: #333333;
|
}
|
.sear-footer-btn2 {
|
width: 334rpx;
|
height: 88rpx;
|
line-height: 88rpx;
|
text-align: center;
|
background: #004096;
|
border-radius: 44rpx;
|
font-weight: 500;
|
font-size: 32rpx;
|
color: #FFFFFF;
|
}
|
}
|
}
|
.list {
|
width: 100%;
|
padding: 0 30rpx;
|
box-sizing: border-box;
|
display: flex;
|
flex-direction: column;
|
.list-item {
|
width: 100%;
|
padding: 30rpx 0;
|
box-sizing: border-box;
|
display: flex;
|
align-items: flex-start;
|
border-bottom: 1rpx solid #E5E5E5;
|
.info {
|
flex: 1;
|
display: flex;
|
flex-direction: column;
|
.info-title {
|
font-weight: 600;
|
font-size: 32rpx;
|
color: #222222;
|
}
|
.info-desc {
|
font-weight: 400;
|
font-size: 26rpx;
|
color: #777777;
|
margin-top: 16rpx;
|
}
|
.info-data {
|
display: flex;
|
align-items: center;
|
margin-top: 20rpx;
|
.tips {
|
height: 40rpx;
|
line-height: 40rpx;
|
padding: 0 8rpx;
|
box-sizing: border-box;
|
background: rgba(0,183,117,0.1);
|
border-radius: 8rpx;
|
|
font-weight: 400;
|
font-size: 22rpx;
|
color: #00B775;
|
margin-right: 20rpx;
|
}
|
text {
|
font-weight: 400;
|
font-size: 24rpx;
|
color: #999999;
|
}
|
}
|
}
|
.image {
|
flex-shrink: 0;
|
width: 200rpx;
|
height: 150rpx;
|
border-radius: 8rpx;
|
margin-left: 30rpx;
|
overflow: hidden;
|
image {
|
width: 100%;
|
}
|
}
|
}
|
}
|
.head {
|
width: 100%;
|
height: 424rpx;
|
padding: 0 30rpx;
|
position: sticky;
|
top: 0;
|
left: 0;
|
z-index: 999;
|
box-sizing: border-box;
|
background: linear-gradient(180deg, #C8F3FF 0%, #ffffff 100%);
|
|
.head-bar {
|
width: 100%;
|
|
.head-bar-nav {
|
width: 100%;
|
display: flex;
|
align-items: center;
|
|
text {
|
font-weight: 500;
|
font-size: 40rpx;
|
color: #111111;
|
}
|
}
|
}
|
|
.search {
|
width: 100%;
|
margin-top: 20rpx;
|
display: flex;
|
align-items: center;
|
justify-content: space-between;
|
.search-shai {
|
margin-left: 30rpx;
|
flex-shrink: 0;
|
display: flex;
|
align-items: center;
|
text {
|
font-weight: 400;
|
font-size: 28rpx;
|
color: #666666;
|
}
|
image {
|
width: 28rpx;
|
height: 28rpx;
|
margin-left: 8rpx;
|
}
|
}
|
}
|
}
|
}
|
</style>
|