|
|
@ -27,7 +27,7 @@
|
|
|
|
<div class="bar-header-wrap__icons flex flex-middle">
|
|
|
|
<div class="bar-header-wrap__icons flex flex-middle">
|
|
|
|
<img
|
|
|
|
<img
|
|
|
|
src="~/assets/img/layout/icon-search-sticky.png"
|
|
|
|
src="~/assets/img/layout/icon-search-sticky.png"
|
|
|
|
@click="$router.push('/goods/list')"
|
|
|
|
@click="onEnterSearch"
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
<div class="header-wrap-icons__shop" @click="onOpenCartPage">
|
|
|
|
<div class="header-wrap-icons__shop" @click="onOpenCartPage">
|
|
|
|
<img src="~/assets/img/layout/icon-shop-sticky.png" />
|
|
|
|
<img src="~/assets/img/layout/icon-shop-sticky.png" />
|
|
|
@ -69,6 +69,7 @@
|
|
|
|
<div class="box-wrap-right__search flex">
|
|
|
|
<div class="box-wrap-right__search flex">
|
|
|
|
<div class="search-input">
|
|
|
|
<div class="search-input">
|
|
|
|
<el-input
|
|
|
|
<el-input
|
|
|
|
|
|
|
|
ref="searchInput"
|
|
|
|
v-model="searchContent"
|
|
|
|
v-model="searchContent"
|
|
|
|
clearable
|
|
|
|
clearable
|
|
|
|
placeholder="请输入商品名称"
|
|
|
|
placeholder="请输入商品名称"
|
|
|
@ -174,6 +175,12 @@ export default {
|
|
|
|
this.getSeckillData();
|
|
|
|
this.getSeckillData();
|
|
|
|
},
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
methods: {
|
|
|
|
|
|
|
|
onEnterSearch() {
|
|
|
|
|
|
|
|
document.querySelector("body").scrollIntoView({ behavior: "smooth" });
|
|
|
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
|
|
|
this.$refs.searchInput.focus();
|
|
|
|
|
|
|
|
}, 500);
|
|
|
|
|
|
|
|
},
|
|
|
|
async getSeckillData() {
|
|
|
|
async getSeckillData() {
|
|
|
|
const { result } = await ApiGetHomeSeckill();
|
|
|
|
const { result } = await ApiGetHomeSeckill();
|
|
|
|
if (result && result.activityTimeVO) {
|
|
|
|
if (result && result.activityTimeVO) {
|
|
|
@ -197,6 +204,9 @@ export default {
|
|
|
|
});
|
|
|
|
});
|
|
|
|
},
|
|
|
|
},
|
|
|
|
onOpenCartPage() {
|
|
|
|
onOpenCartPage() {
|
|
|
|
|
|
|
|
if (!this.$isLoginValidate()) {
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
window.open(`${location.origin}/cart`);
|
|
|
|
window.open(`${location.origin}/cart`);
|
|
|
|
},
|
|
|
|
},
|
|
|
|
onOpenHomePage() {
|
|
|
|
onOpenHomePage() {
|
|
|
|