|
@@ -12,7 +12,7 @@ import { getHomeBrandListApi } from '~/api/model/brand'
|
|
const userStore = useUserStore()
|
|
const userStore = useUserStore()
|
|
const { isLogin } = storeToRefs(userStore)
|
|
const { isLogin } = storeToRefs(userStore)
|
|
const modules = [Navigation, Pagination]
|
|
const modules = [Navigation, Pagination]
|
|
-const brandList = ref<any>([])
|
|
|
|
|
|
+const categoryList = ref<any>([])
|
|
const swiperVertical = ref<any>(null)
|
|
const swiperVertical = ref<any>(null)
|
|
|
|
|
|
getHomeBrandList()
|
|
getHomeBrandList()
|
|
@@ -23,7 +23,7 @@ async function getHomeBrandList() {
|
|
pageSize: 8,
|
|
pageSize: 8,
|
|
}
|
|
}
|
|
const data: any = await getHomeBrandListApi(params)
|
|
const data: any = await getHomeBrandListApi(params)
|
|
- brandList.value = data.records
|
|
|
|
|
|
+ categoryList.value = data.records
|
|
}
|
|
}
|
|
catch (error) {
|
|
catch (error) {
|
|
console.log('error', error)
|
|
console.log('error', error)
|
|
@@ -48,12 +48,12 @@ function onClickRight() {
|
|
<div class="w-1200-auto pos-relative h-800px">
|
|
<div class="w-1200-auto pos-relative h-800px">
|
|
<div class="text-center pos-absolute top-200px left-50% translate-x--50%">
|
|
<div class="text-center pos-absolute top-200px left-50% translate-x--50%">
|
|
<div class="pos-relative">
|
|
<div class="pos-relative">
|
|
- <div class="text-58px text-#fff fw-800 ls-2">
|
|
|
|
|
|
+ <h1 class="text-58px text-#fff fw-800 ls-2">
|
|
Spark The Trend
|
|
Spark The Trend
|
|
- </div>
|
|
|
|
- <div class="text-58px text-#fff fw-800 ls-2">
|
|
|
|
|
|
+ </h1>
|
|
|
|
+ <h1 class="text-58px text-#fff fw-800 ls-2">
|
|
Ignite Sales
|
|
Ignite Sales
|
|
- </div>
|
|
|
|
|
|
+ </h1>
|
|
<div
|
|
<div
|
|
class="pos-absolute top--26px right--60px w-150px py-8px bg-#FFFF66 b-rd-20px transform-rotate-16deg"
|
|
class="pos-absolute top--26px right--60px w-150px py-8px bg-#FFFF66 b-rd-20px transform-rotate-16deg"
|
|
>
|
|
>
|
|
@@ -77,9 +77,9 @@ function onClickRight() {
|
|
@click="onClickLeft()"
|
|
@click="onClickLeft()"
|
|
>
|
|
>
|
|
<img
|
|
<img
|
|
- src="~/assets/images/arrow_left.png"
|
|
|
|
|
|
+ src="~/assets/images/swiper_icon_l.png"
|
|
alt=""
|
|
alt=""
|
|
- class="w-26px h-26px"
|
|
|
|
|
|
+ class="!w-24px !h-24px"
|
|
srcset=""
|
|
srcset=""
|
|
>
|
|
>
|
|
</div>
|
|
</div>
|
|
@@ -88,16 +88,16 @@ function onClickRight() {
|
|
@click="onClickRight()"
|
|
@click="onClickRight()"
|
|
>
|
|
>
|
|
<img
|
|
<img
|
|
- src="~/assets/images/arrow_right.png"
|
|
|
|
|
|
+ src="~/assets/images/swiper_icon_r.png"
|
|
alt=""
|
|
alt=""
|
|
- class="w-26px h-26px"
|
|
|
|
|
|
+ class="!w-24px !h-24px"
|
|
srcset=""
|
|
srcset=""
|
|
>
|
|
>
|
|
</div>
|
|
</div>
|
|
<Swiper
|
|
<Swiper
|
|
- v-if="brandList.length"
|
|
|
|
|
|
+ v-if="categoryList.length"
|
|
:slides-per-view="3"
|
|
:slides-per-view="3"
|
|
- :space-between="40"
|
|
|
|
|
|
+ :space-between="30"
|
|
:modules="modules"
|
|
:modules="modules"
|
|
:centered-slides="true"
|
|
:centered-slides="true"
|
|
:loop="true"
|
|
:loop="true"
|
|
@@ -106,8 +106,8 @@ function onClickRight() {
|
|
class="pos-relative"
|
|
class="pos-relative"
|
|
@swiper="onVerticalSwiper"
|
|
@swiper="onVerticalSwiper"
|
|
>
|
|
>
|
|
- <SwiperSlide v-for="(item, index) in brandList" :key="index">
|
|
|
|
- <common-brand-item :item="item" />
|
|
|
|
|
|
+ <SwiperSlide v-for="(item, index) in categoryList" :key="index">
|
|
|
|
+ <common-category-item :item="item" />
|
|
</SwiperSlide>
|
|
</SwiperSlide>
|
|
</Swiper>
|
|
</Swiper>
|
|
</div>
|
|
</div>
|
|
@@ -119,8 +119,6 @@ function onClickRight() {
|
|
.swiper-slide {
|
|
.swiper-slide {
|
|
text-align: center;
|
|
text-align: center;
|
|
font-size: 18px;
|
|
font-size: 18px;
|
|
- background: #fff;
|
|
|
|
-
|
|
|
|
/* Center slide text vertically */
|
|
/* Center slide text vertically */
|
|
display: -webkit-box;
|
|
display: -webkit-box;
|
|
display: -ms-flexbox;
|
|
display: -ms-flexbox;
|