|
@@ -1,7 +1,7 @@
|
|
<template>
|
|
<template>
|
|
<div class="login-wrapper" >
|
|
<div class="login-wrapper" >
|
|
<div class="leftSlider">
|
|
<div class="leftSlider">
|
|
- <a href="javascript:void(0)" :class="anchorIndex === index?'sliderStyle':''" @click="goToAnchor('anchor'+item.id,index)" class="slider" v-for="(item,index) in categoryGoods.arr">
|
|
|
|
|
|
+ <a href="javascript:void(0)" :class="anchorIndex === index?'sliderStyle':''" @click="goToAnchor('anchor'+item.id,index)" class="slider" v-for="(item,index) in categoryGoods.arr" :key="index">
|
|
<div v-if="item.goods!=''">
|
|
<div v-if="item.goods!=''">
|
|
<div class="sliderName">{{item.name}}</div>
|
|
<div class="sliderName">{{item.name}}</div>
|
|
<div class="slider-bottom">
|
|
<div class="slider-bottom">
|
|
@@ -17,7 +17,7 @@
|
|
|
|
|
|
<div class="index-top-center" id="div1">
|
|
<div class="index-top-center" id="div1">
|
|
<div class="index-center-left" @mouseenter="indexSortSlide()" @mouseleave="indexSortOut" >
|
|
<div class="index-center-left" @mouseenter="indexSortSlide()" @mouseleave="indexSortOut" >
|
|
- <div v-for="(item,index) in categoryGoods.arr">
|
|
|
|
|
|
+ <div v-for="(item,index) in categoryGoods.arr" :key="index">
|
|
<div class="index-sort-list" v-if="item.goods!=''" :class="sortIndex==index?'colorStyles':''" @mouseenter="indexSortSlide(item,index)" >
|
|
<div class="index-sort-list" v-if="item.goods!=''" :class="sortIndex==index?'colorStyles':''" @mouseenter="indexSortSlide(item,index)" >
|
|
<div class="index-sort-name overflow2" >{{item.name}}</div>
|
|
<div class="index-sort-name overflow2" >{{item.name}}</div>
|
|
<div class="right-icon" :class="sortIndex==index?'bgRight':''">
|
|
<div class="right-icon" :class="sortIndex==index?'bgRight':''">
|
|
@@ -25,7 +25,7 @@
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="index-sort-content" v-if="sortIndex!=null" @mouseenter="indexSortSlide()" @mouseleave="indexSortOut" >
|
|
<div class="index-sort-content" v-if="sortIndex!=null" @mouseenter="indexSortSlide()" @mouseleave="indexSortOut" >
|
|
- <div class="index-sort-lists" v-for="(items,indexs) in categoryGoods.arr[sortIndex].goods" @click="routeTap('/goodsDetail',items.id)">
|
|
|
|
|
|
+ <div class="index-sort-lists" v-for="(items,indexs) in categoryGoods.arr[sortIndex].goods" :key="indexs" @click="routeTap('/goodsDetail',items.id)">
|
|
<div class="index-sort-img">
|
|
<div class="index-sort-img">
|
|
<img :src=items.logo[0] alt="">
|
|
<img :src=items.logo[0] alt="">
|
|
</div>
|
|
</div>
|
|
@@ -88,7 +88,7 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="index-right-nav">
|
|
<div class="index-right-nav">
|
|
- <div class="nav-view" v-for="(item,index) in navBar" @click="navTaps(index,item)">
|
|
|
|
|
|
+ <div class="nav-view" v-for="(item,index) in navBar" :key="index" @click="navTaps(index,item)">
|
|
<div class="nav-icon">
|
|
<div class="nav-icon">
|
|
<img :src="item.src">
|
|
<img :src="item.src">
|
|
</div>
|
|
</div>
|
|
@@ -105,7 +105,7 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="index-notice">
|
|
<div class="index-notice">
|
|
- <div class="index-notice-list" v-for="(item,index) in infoList.arr" @click="routeTap('/news/detail',item.id)">
|
|
|
|
|
|
+ <div class="index-notice-list" v-for="(item,index) in infoList.arr" :key="index" @click="routeTap('/news/detail',item.id)">
|
|
<div v-if="index<5">
|
|
<div v-if="index<5">
|
|
{{item.title}}
|
|
{{item.title}}
|
|
</div>
|
|
</div>
|
|
@@ -124,16 +124,19 @@
|
|
<div class="time-color">距结束:</div>
|
|
<div class="time-color">距结束:</div>
|
|
<CountDate v-if="timeFlag" :remain-time="remainTime.time" />
|
|
<CountDate v-if="timeFlag" :remain-time="remainTime.time" />
|
|
</div>
|
|
</div>
|
|
- <div v-if="seckillList.arr!='' && seckillList.arr.length<=3" class="seckill-lists" v-for="(item,index) in seckillList.arr" @click="routeTap('/goodsDetail',item.id)">
|
|
|
|
- <div class="seckill-img">
|
|
|
|
- <img :src="item.logo[0]" alt="">
|
|
|
|
- </div>
|
|
|
|
- <div class="seckillName overflow1">{{ item.name }}</div>
|
|
|
|
- <div class="seckillDesc overflow1">{{ item.describe }}</div>
|
|
|
|
- <div class="seckill-price">
|
|
|
|
- 秒杀价:<span>¥{{item.amount_kill}}</span> <a>¥{{item.amount}}</a>
|
|
|
|
|
|
+ <div style="display:flex;" v-if="seckillList.arr!='' && seckillList.arr.length<=3">
|
|
|
|
+ <div class="seckill-lists" v-for="(item,index) in seckillList.arr" :key="index" @click="routeTap('/goodsDetail',item.id)">
|
|
|
|
+ <div class="seckill-img">
|
|
|
|
+ <img :src="item.logo[0]" alt="">
|
|
|
|
+ </div>
|
|
|
|
+ <div class="seckillName overflow1">{{ item.name }}</div>
|
|
|
|
+ <div class="seckillDesc overflow1">{{ item.describe }}</div>
|
|
|
|
+ <div class="seckill-price">
|
|
|
|
+ 秒杀价:<span>¥{{item.amount_kill}}</span> <a>¥{{item.amount}}</a>
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
+
|
|
</div>
|
|
</div>
|
|
<div class="index-hot-sell" id="div3" >
|
|
<div class="index-hot-sell" id="div3" >
|
|
<!-- <div class="index-hot-bg" v-if="hotSelList.arr!=''">-->
|
|
<!-- <div class="index-hot-bg" v-if="hotSelList.arr!=''">-->
|
|
@@ -262,6 +265,7 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
+ <!-- <h1>{{ indexPage.c }}</h1> -->
|
|
<div class="dev-cloud" v-if="indexPage.c" @click="urlTap(indexPage.c.href)">
|
|
<div class="dev-cloud" v-if="indexPage.c" @click="urlTap(indexPage.c.href)">
|
|
<img :src="indexPage.c.bg">
|
|
<img :src="indexPage.c.bg">
|
|
</div>
|
|
</div>
|
|
@@ -291,14 +295,10 @@ const urlTap=(url)=>{
|
|
window.location.href=url
|
|
window.location.href=url
|
|
}
|
|
}
|
|
let indexPage=ref("")
|
|
let indexPage=ref("")
|
|
-let getUserPage=()=>{
|
|
|
|
getContentPage({"page":"shouye"}).then((res)=>{
|
|
getContentPage({"page":"shouye"}).then((res)=>{
|
|
indexPage.value=res.data.content
|
|
indexPage.value=res.data.content
|
|
})
|
|
})
|
|
-}
|
|
|
|
-onMounted(()=>{
|
|
|
|
- getUserPage()
|
|
|
|
-})
|
|
|
|
|
|
+
|
|
//记录访问次数
|
|
//记录访问次数
|
|
if(localStorage.getItem('USER__INFO__')){
|
|
if(localStorage.getItem('USER__INFO__')){
|
|
user_lsp().then((res)=>{
|
|
user_lsp().then((res)=>{
|
|
@@ -318,6 +318,7 @@ const bannerTap=(url)=>{
|
|
onMounted(()=>{
|
|
onMounted(()=>{
|
|
window.addEventListener("scroll",onscrolls);
|
|
window.addEventListener("scroll",onscrolls);
|
|
killGoodss()
|
|
killGoodss()
|
|
|
|
+
|
|
})
|
|
})
|
|
onUnmounted(()=>{
|
|
onUnmounted(()=>{
|
|
window.removeEventListener('scroll',onscrolls)
|
|
window.removeEventListener('scroll',onscrolls)
|