You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

263 lines
5.0 KiB

2 years ago
<template>
<view class="container-main">
<view class="search-multiple">
<view class="multiple-item" v-for="(item, index) in multipleList" :key="index">
<view class="item-child" @click="clickMultiple(item, index)"
:class="item.active == true ? 'multipleActive' : ''">
<text>{{ item.name }}</text>
</view>
</view>
</view>
<view class="search-main">
<view class="search-input">
<view class="input-icon">
<image :src="baseImgUrl+'/liao-ning/icon_search.png'" mode=""></image>
</view>
<view class="input-middle">
<u-input v-model="form.keyWord" type="text" placeholder-style="color:#C4CCD8;font-size:30rpx"
:border="false" placeholder="请输入关键字搜索" />
</view>
<view class="input-btn" @click="searchName()"></view>
</view>
<view class="search-result">
<view class="result-total">为您搜索到1条结果</view>
<view class="result-list">
<view class="result-item" @click="getInfo()">
<view class="item-icon">
<image :src="baseImgUrl +'liao-ning/icon_qyzhcx.png'" mode=""></image>
</view>
<view class="item-data">
<view class="data-title">asdf</view>
<view class="data-subtitle">asdf</view>
</view>
<view class="item-arrow">
<u-icon name="arrow-right" color="#D5D5D5"></u-icon>
</view>
</view>
</view>
<!-- <u-loadmore :status="status" :load-text="loadText" color="#C4CCD8" font-size="24" /> -->
<u-loadmore :status="status" :load-text="loadText" color="#C4CCD8" font-size="24" />
</view>
</view>
</view>
</template>
<script>
import {
getStreetList
} from "@/api/shianliaoning/enterpriseSEARCH.js";
export default {
data() {
return {
baseImgUrl: getApp().globalData.config.iamgeBaseUrl,
//搜索后的骨架屏
loadText: {
nomore: "已经到底了~",
loading: "努力加载中",
},
status: 'nomore',
statusFlag: false,
multipleList: [{
name: "食品生产",
active: false,
},
{
name: "食品经营",
active: false,
},
{
name: "小作坊",
active: false,
},
{
name: "小餐饮",
active: false,
},
{
name: "小摊贩",
active: false,
},
],
form: {
pageSize: 10,
pageNum: 1,
keyWord: "",
typeList: [1, 2, 3, 4, 5],
},
//总数
total: 0,
//总条数
list: [],
//id
id: "",
};
},
onLoad() {
this.searchList();
},
onReachBottom() {
},
methods: {
//下拉加载效果
reachStart(){
},
//下拉结束效果
reachEnd(){
},
//下拉请求
searchList() {
this.reachStart()
},
//搜索
searchName() {
},
clickMultiple(item, index) {
},
//清空数组
empty() {
},
getInfo() {
uni.navigateTo({
url: `/sub-public/enterprise-new-info/enterprise-new-info`,
});
},
},
};
</script>
<style lang="scss" scoped>
.search-multiple {
height: 220rpx;
background: #ffffff;
box-sizing: border-box;
padding: 30rpx 20rpx;
display: flex;
flex-wrap: wrap;
.multiple-item {
width: 25%;
height: 68rpx;
display: flex;
align-items: center;
justify-content: center;
.item-child {
width: 160rpx;
height: 68rpx;
background: #ffffff;
border-radius: 64rpx;
border: 1rpx solid #dce3ec;
display: flex;
align-items: center;
justify-content: center;
font-size: 28rpx;
font-weight: 520;
color: #616367;
}
.multipleActive {
background: #3976f1;
color: #fff;
border: 0;
}
}
}
.search-main {
box-sizing: border-box;
padding: 20rpx;
.search-input {
display: flex;
align-items: center;
background: #fff;
box-shadow: 0px 0px 10rpx 0px rgba(57, 118, 241, 0.0588);
border-radius: 16rpx;
box-sizing: border-box;
padding: 10rpx 25rpx;
.input-icon {
height: 30rpx;
width: 30rpx;
margin-right: 20rpx;
image {
height: 100%;
width: 100%;
}
}
.input-middle {
flex: 1;
}
.input-btn {
font-size: 32rpx;
font-weight: 500;
color: #3976f1;
}
}
.search-result {
margin-top: 30rpx;
.result-total {
margin-bottom: 20rpx;
font-size: 24rpx;
font-weight: 500;
color: #c4ccd8;
}
.result-list {
.result-item {
display: flex;
align-items: center;
background: #fff;
border-radius: 16rpx;
box-sizing: border-box;
padding: 25rpx 20rpx;
margin-bottom: 20rpx;
.item-icon {
height: 82rpx;
width: 82rpx;
image {
height: 100%;
width: 100%;
}
}
.item-data {
flex: 1;
box-sizing: border-box;
padding-left: 20rpx;
.data-title {
font-size: 36rpx;
font-weight: 550;
color: #34373b;
}
.data-subtitle {
margin-top: 10rpx;
font-size: 28rpx;
font-weight: 400;
color: #b0b4bb;
}
}
}
}
}
}
</style>