feat:app改造
This commit is contained in:
@@ -16,14 +16,8 @@
|
||||
<view class="search-bar-box">
|
||||
<view class="search-inner">
|
||||
<u-icon name="search" size="36rpx" color="#999999" class="search-icon"></u-icon>
|
||||
<input
|
||||
class="search-input"
|
||||
v-model="searchInput"
|
||||
placeholder="请输入商品关键字"
|
||||
placeholder-style="color: #999999; font-size: 28rpx;"
|
||||
confirm-type="search"
|
||||
@confirm="onSearch"
|
||||
/>
|
||||
<input class="search-input" v-model="searchInput" placeholder="请输入商品关键字"
|
||||
placeholder-style="color: #999999; font-size: 28rpx;" confirm-type="search" @confirm="onSearch" />
|
||||
<view class="search-btn flex-c" @click="onSearch">
|
||||
<text class="search-btn-text">搜索</text>
|
||||
</view>
|
||||
@@ -34,26 +28,16 @@
|
||||
<view class="history-container">
|
||||
<view class="history-header flex-r-lr">
|
||||
<text class="section-title">历史搜索</text>
|
||||
<u-icon name="trash" size="38rpx" color="#999999" @click="toggleDel"></u-icon>
|
||||
<u-icon name="trash" size="42rpx" color="#999999" @click="toggleDel"></u-icon>
|
||||
</view>
|
||||
|
||||
<!-- 历史记录标签列表 -->
|
||||
<view class="history-tags flex-r" v-if="historyList.length">
|
||||
<view
|
||||
class="history-tag-item flex-r"
|
||||
v-for="(item, index) in historyList"
|
||||
:key="index"
|
||||
@click="onText(item)"
|
||||
>
|
||||
<view class="history-tag-item flex-r" v-for="(item, index) in historyList" :key="index"
|
||||
@click="onText(item)">
|
||||
<text class="tag-text">{{ item }}</text>
|
||||
<u-icon
|
||||
name="close-circle-fill"
|
||||
size="28rpx"
|
||||
color="#999999"
|
||||
class="del-icon"
|
||||
v-if="isDel"
|
||||
@click.stop="onDel(index)"
|
||||
></u-icon>
|
||||
<u-icon name="close-circle-fill" size="28rpx" color="#999999" class="del-icon" v-if="isDel"
|
||||
@click.stop="onDel(index)"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -68,19 +52,18 @@
|
||||
<view class="recommend-header">
|
||||
<text class="section-title">猜你喜欢</text>
|
||||
</view>
|
||||
<!-- 猜你喜欢下面的列表按要求空着 -->
|
||||
<view class="recommend-list">
|
||||
<view class="product-grid" v-if="dataList && dataList.length">
|
||||
<ShopItem
|
||||
:obj="item"
|
||||
class="product-item"
|
||||
@click="onJump(item)"
|
||||
v-for="item in dataList"
|
||||
:key="item.id"
|
||||
></ShopItem>
|
||||
</view>
|
||||
<view class="recommend-content">
|
||||
<choiceness :isTitle="false" />
|
||||
</view>
|
||||
<!-- <view class="recommend-list">
|
||||
<view class="product-grid" v-if="dataList && dataList.length">
|
||||
<ShopItem :obj="item" class="product-item" @click="onJump(item)" v-for="item in dataList"
|
||||
:key="item.id"></ShopItem>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
<!-- 为您精选 -->
|
||||
|
||||
|
||||
<DownPopup></DownPopup>
|
||||
</view>
|
||||
@@ -93,10 +76,10 @@ import TopSafe from '@/components/common/top-safe.nvue';
|
||||
import DownPopup from '@/components/common/down-popup.vue';
|
||||
import { searchList } from '@/api/product.js';
|
||||
import ShopItem from './components/shop-item.vue';
|
||||
import func from '@/utils/func.js';
|
||||
import choiceness from "@/components/choiceness/choiceness.vue";
|
||||
|
||||
export default {
|
||||
components: { Header, TopSafe, DownPopup, ShopItem },
|
||||
components: { Header, TopSafe, DownPopup, ShopItem, choiceness },
|
||||
data() {
|
||||
return {
|
||||
searchInput: '',
|
||||
@@ -130,11 +113,8 @@ export default {
|
||||
return;
|
||||
}
|
||||
this.onAdd();
|
||||
let params = {
|
||||
keyword: this.searchInput.trim()
|
||||
};
|
||||
searchList(params).then((res) => {
|
||||
this.dataList = res.data || [];
|
||||
uni.navigateTo({
|
||||
url: '/pages/rwa_package/insights/search-result?keyword=' + encodeURIComponent(this.searchInput.trim())
|
||||
});
|
||||
},
|
||||
onDel(index) {
|
||||
@@ -305,9 +285,9 @@ export default {
|
||||
width: 100%;
|
||||
|
||||
.history-tag-item {
|
||||
padding: 10rpx 28rpx;
|
||||
padding: 6rpx 24rpx;
|
||||
background-color: #f5f5f7;
|
||||
border-radius: 30rpx;
|
||||
border-radius: 24rpx;
|
||||
margin-right: 20rpx;
|
||||
margin-bottom: 20rpx;
|
||||
display: flex;
|
||||
@@ -339,7 +319,7 @@ export default {
|
||||
/* 猜你喜欢 */
|
||||
.recommend-container {
|
||||
width: 100%;
|
||||
padding: 32rpx 32rpx;
|
||||
padding: 20rpx 32rpx 0;
|
||||
box-sizing: border-box;
|
||||
|
||||
.recommend-header {
|
||||
@@ -350,11 +330,17 @@ export default {
|
||||
|
||||
.section-title {
|
||||
font-size: 32rpx;
|
||||
font-weight: bold;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
|
||||
.recommend-content {
|
||||
::v-deep(.choiceness_warp) {
|
||||
margin-top: 15rpx;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.recommend-list {
|
||||
width: 100%;
|
||||
margin-top: 24rpx;
|
||||
|
||||
Reference in New Issue
Block a user