|
|
|
@ -9,22 +9,27 @@ |
|
|
|
|
</view> |
|
|
|
|
<view class="find"> |
|
|
|
|
<view class="findTitle"> |
|
|
|
|
<text>搜索发现</text> |
|
|
|
|
<image src="/static/search/openEye.png" mode="widthFix" class="findIcon" v-if="showEye" |
|
|
|
|
<text>搜索历史</text> |
|
|
|
|
<!-- <image src="/static/search/openEye.png" mode="widthFix" class="findIcon" v-if="showEye" |
|
|
|
|
@click="showEye=!showEye"> |
|
|
|
|
</image> |
|
|
|
|
<image src="/static/search/closeEye.png" mode="widthFix" class="findIcon" v-if="!showEye" |
|
|
|
|
@click="showEye=!showEye"> |
|
|
|
|
</image> |
|
|
|
|
</image> --> |
|
|
|
|
<view class="others" v-if="searchList && searchList.length > 0"> |
|
|
|
|
<u-icon size="40" color="#999" name="trash" @click="toDo(0)" v-if="isHot"></u-icon> |
|
|
|
|
<view class="do" v-else> |
|
|
|
|
<view class="red" @click="toDo(1)">全部删除</view> |
|
|
|
|
<view class="suc" @click="toDo(2)">完成</view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<!-- <view class="others" @click="getHot"> |
|
|
|
|
换一批 |
|
|
|
|
</view> --> |
|
|
|
|
|
|
|
|
|
</view> |
|
|
|
|
<view class="hotSearch" v-if="showEye"> |
|
|
|
|
<view v-for="(item,index) in searchList" :key="index" class="hotItem" @click="searchGoods(item)"> |
|
|
|
|
<image src="/static/user/hot.png" mode="" class="hotImg" v-if="index==0"></image> |
|
|
|
|
<text>{{item}}</text> |
|
|
|
|
<view v-for="(item,index) in searchList" :key="index" class="hotItem"> |
|
|
|
|
<text @click="searchGoods(item)">{{item}}</text> |
|
|
|
|
<view v-if="isHot == false" class="del" @click="toDo(3,index)"><u-icon size="30" color="#999" name="close-circle"></u-icon></view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="hotSuggest"> |
|
|
|
@ -79,7 +84,8 @@ |
|
|
|
|
searchFindList: [], |
|
|
|
|
page: 1, |
|
|
|
|
goodsList: [], |
|
|
|
|
category_id:0 |
|
|
|
|
category_id:0, |
|
|
|
|
isHot: true, |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
@ -98,6 +104,18 @@ |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
methods: { |
|
|
|
|
toDo(index,idx){ |
|
|
|
|
if(index == 0){ |
|
|
|
|
this.isHot = false |
|
|
|
|
}else if(index == 1){ |
|
|
|
|
this.searchList = [] |
|
|
|
|
uni.removeStorageSync("searchList") |
|
|
|
|
}else if(index == 2){ |
|
|
|
|
this.isHot = true |
|
|
|
|
}else if(index == 3){ |
|
|
|
|
this.searchList.splice(idx,1) |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
// 跳转到秒杀商品详情 |
|
|
|
|
handleTargetGoods(sharpGoodsId) { |
|
|
|
|
uni.navigateTo({ |
|
|
|
@ -212,22 +230,36 @@ |
|
|
|
|
margin-top: 44rpx; |
|
|
|
|
|
|
|
|
|
.findTitle { |
|
|
|
|
|
|
|
|
|
// width: 200rpx; |
|
|
|
|
// height: 44rpx; |
|
|
|
|
// font-size: 32rpx; |
|
|
|
|
// font-family: PingFang SC, PingFang SC; |
|
|
|
|
// font-weight: 500; |
|
|
|
|
// color: #000000; |
|
|
|
|
// line-height: 44rpx; |
|
|
|
|
// margin-left: 40rpx; |
|
|
|
|
width: 100%; |
|
|
|
|
display: flex; |
|
|
|
|
align-items: center; |
|
|
|
|
justify-content: space-between; |
|
|
|
|
&>text { |
|
|
|
|
font-size: 32rpx; |
|
|
|
|
font-family: PingFang SC, PingFang SC; |
|
|
|
|
font-weight: 500; |
|
|
|
|
color: #000000; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.do{ |
|
|
|
|
display: flex; |
|
|
|
|
align-items: center; |
|
|
|
|
padding: 0 20rpx; |
|
|
|
|
white-space: nowrap; |
|
|
|
|
} |
|
|
|
|
.red{ |
|
|
|
|
font-size: 24rpx; |
|
|
|
|
color: #ff0000; |
|
|
|
|
} |
|
|
|
|
.suc{ |
|
|
|
|
border-left: 1px solid #ececec; |
|
|
|
|
padding-left: 20rpx; |
|
|
|
|
margin-left: 20rpx; |
|
|
|
|
height: 30rpx; |
|
|
|
|
display: flex; |
|
|
|
|
align-items: center; |
|
|
|
|
font-size: 24rpx; |
|
|
|
|
color: #9B9B9B; |
|
|
|
|
} |
|
|
|
|
.findIcon { |
|
|
|
|
width: 36rpx; |
|
|
|
|
height: auto; |
|
|
|
@ -256,7 +288,6 @@ |
|
|
|
|
flex-wrap: wrap; |
|
|
|
|
margin: 0 40rpx; |
|
|
|
|
margin-top: 20rpx; |
|
|
|
|
// justify-content: space-between; |
|
|
|
|
|
|
|
|
|
.hotItem { |
|
|
|
|
padding: 10rpx 30rpx; |
|
|
|
@ -266,21 +297,22 @@ |
|
|
|
|
display: flex; |
|
|
|
|
align-items: center; |
|
|
|
|
margin-left: 12rpx; |
|
|
|
|
// margin:0 20rpx; |
|
|
|
|
margin-bottom: 24rpx; |
|
|
|
|
// height: 64rpx; |
|
|
|
|
// background: #FFFFFF; |
|
|
|
|
// border-radius: 68rpx 68rpx 68rpx 68rpx; |
|
|
|
|
// opacity: 1; |
|
|
|
|
// font-size: 28rpx; |
|
|
|
|
// font-family: PingFang SC, PingFang SC; |
|
|
|
|
// font-weight: 400; |
|
|
|
|
// color: #000000; |
|
|
|
|
// line-height: 64rpx; |
|
|
|
|
// padding-right: 22rpx; |
|
|
|
|
// margin-right: 12rpx; |
|
|
|
|
// margin-bottom: 24rpx; |
|
|
|
|
// padding-left: 30rpx; |
|
|
|
|
text{ |
|
|
|
|
display: block; |
|
|
|
|
max-width: 200rpx; |
|
|
|
|
text-overflow: ellipsis; |
|
|
|
|
overflow: hidden; |
|
|
|
|
white-space: nowrap; |
|
|
|
|
} |
|
|
|
|
.del{ |
|
|
|
|
border-left: 1px solid #ececec; |
|
|
|
|
padding-left: 20rpx; |
|
|
|
|
margin-left: 20rpx; |
|
|
|
|
height: 30rpx; |
|
|
|
|
display: flex; |
|
|
|
|
align-items: center; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.hotImg { |
|
|
|
|
width: 25rpx; |
|
|
|
|