|
|
|
@ -1,6 +1,20 @@ |
|
|
|
<template> |
|
|
|
<view class="container"> |
|
|
|
<view class="secondary"> |
|
|
|
<!-- 搜索 --> |
|
|
|
<view class="search"> |
|
|
|
<view class="search-wrapper"> |
|
|
|
<view class="index-search"> |
|
|
|
<view class="index-cont-search t-c"> |
|
|
|
<text class="search-icon iconfont icon-search"></text> |
|
|
|
<text class="search-text"> |
|
|
|
<input type="text" placeholder="请输入搜索关键字" v-model="searchValue"> |
|
|
|
</text> |
|
|
|
<button class="search-text-bu" @click="onSearch">搜索</button> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<!-- 二级分类 20 --> |
|
|
|
<view class="cate-content"> |
|
|
|
<!-- 左侧 一级分类 --> |
|
|
|
@ -82,8 +96,8 @@ export default { |
|
|
|
// 分类列表 |
|
|
|
informationList: [], |
|
|
|
// 分类列表 |
|
|
|
list: [], |
|
|
|
// list: readmore.data, |
|
|
|
// list: [], |
|
|
|
list: readmore.data, |
|
|
|
// 分类模板设置 |
|
|
|
setting: {}, |
|
|
|
// 正在加载中 |
|
|
|
@ -129,6 +143,15 @@ export default { |
|
|
|
this.setListHeight() |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
// 搜索 |
|
|
|
async onSearch() { |
|
|
|
if (this.searchValue == '') { |
|
|
|
this.$error('请输入搜索关键词'); |
|
|
|
} else { |
|
|
|
await this.getGoodsList() |
|
|
|
await this.getHomeListImage() |
|
|
|
} |
|
|
|
}, |
|
|
|
previewImage(){ |
|
|
|
// 富文本全部内容 |
|
|
|
let richText = this.list.context |
|
|
|
@ -306,4 +329,65 @@ page { |
|
|
|
overflow: hidden; |
|
|
|
} |
|
|
|
|
|
|
|
// 搜索 |
|
|
|
.search { |
|
|
|
position: fixed; |
|
|
|
float: top; |
|
|
|
top: var(--window-top); |
|
|
|
left: var(--window-left); |
|
|
|
right: var(--window-right); |
|
|
|
z-index: 19; |
|
|
|
|
|
|
|
.search-wrapper { |
|
|
|
background: #1c223b; |
|
|
|
padding: 0rpx 20rpx 20rpx 20rpx; |
|
|
|
} |
|
|
|
|
|
|
|
.index-search { |
|
|
|
border-bottom: 0; |
|
|
|
background: #fff; |
|
|
|
border-radius: 50rpx; |
|
|
|
overflow: hidden; |
|
|
|
font-size: 28rpx; |
|
|
|
color: #6d6d6d; |
|
|
|
box-sizing: border-box; |
|
|
|
height: 74rpx; |
|
|
|
line-height: 74rpx; |
|
|
|
|
|
|
|
.index-cont-search { |
|
|
|
width: 100%; |
|
|
|
font-size: 28rpx; |
|
|
|
background: #f7f7f7; |
|
|
|
display: flex; |
|
|
|
justify-content: center; |
|
|
|
align-items: center; |
|
|
|
|
|
|
|
.search-icon { |
|
|
|
font-size: 34rpx; |
|
|
|
margin-left: 50rpx; |
|
|
|
} |
|
|
|
|
|
|
|
.search-text { |
|
|
|
text-align: left; |
|
|
|
float: left; |
|
|
|
margin-left: 20rpx; |
|
|
|
width: 100%; |
|
|
|
|
|
|
|
input { |
|
|
|
font-size: 20rpx; |
|
|
|
} |
|
|
|
} |
|
|
|
.search-text-bu { |
|
|
|
margin-right: 20rpx; |
|
|
|
color: #ffffff; |
|
|
|
background-color: #1c223b; |
|
|
|
font-size: 20rpx; |
|
|
|
width: 120rpx; |
|
|
|
height: 50rpx; |
|
|
|
text-align: center; |
|
|
|
border-radius: 50rpx; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
</style> |
|
|
|
|