style: 💄 优化PC首页展示以及店铺中搜索商品未携带id问题

This commit is contained in:
Yer
2023-07-11 11:45:29 +08:00
parent b89f81e5d6
commit 34cb3b4a29
4 changed files with 20 additions and 16 deletions

View File

@@ -21,10 +21,6 @@
<Icon type="ios-search" size="21"/>
</div>
</i-input>
<div v-if="store" class="btn-div">
<Button class="store-search" type="warning" @click="searchStore">搜本店</Button>
<Button class="store-search" type="primary" @click="search">搜全站</Button>
</div>
<template v-if="showTag">
<div style="height:12px" v-if="promotionTags.length === 0"></div>
<div v-else class="history-list flex">
@@ -57,9 +53,9 @@ export default {
type: Boolean,
default: true
},
store: { // 是否为店铺页面
type: Boolean,
default: false
storeId: { // 是否为店铺页面
type: String,
default: ""
},
hover: {
type: Boolean,
@@ -85,10 +81,14 @@ export default {
if(url == '/goodsList'){
this.$emit('search', this.searchData)
}else{
this.$router.push({
path: '/goodsList',
query: { keyword: this.searchData }
});
const pushData = {
path:'/goodsList',
query: { keyword: this.searchData },
}
if(this.storeId) pushData.query.storeId = this.storeId
this.$router.push(pushData);
}
},
searchStore() { // 店铺搜索商品
@@ -130,6 +130,10 @@ export default {
height: 113px;
background: #fff;
}
.search-icon{
width: 100%;
height: 100%;
}
.small-search-box{
height: 60px;