首页
@ -273,6 +273,7 @@
|
|||||||
}
|
}
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin-top: 0.45rem;
|
margin-top: 0.45rem;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.active {
|
.active {
|
||||||
@ -286,22 +287,28 @@
|
|||||||
color: #444444;
|
color: #444444;
|
||||||
border: 1px solid #D7D7D7;
|
border: 1px solid #D7D7D7;
|
||||||
}
|
}
|
||||||
|
// .usermain{
|
||||||
|
// display: none;
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@media screen and (min-width: 769px)
|
@media screen and (min-width: 769px)
|
||||||
{
|
{
|
||||||
|
.rc-selection{
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
.sw-center{
|
.sw-center{
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
.useraimg{
|
.useraimg{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 29.31rem;
|
// height: 29.31rem;
|
||||||
object-fit: cover;
|
object-fit: cover;
|
||||||
}
|
}
|
||||||
.van-swipe-item {
|
.van-swipe-item {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
height: 29.31rem;
|
height: 100%;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
font-size: 1.25rem;
|
font-size: 1.25rem;
|
||||||
line-height: 9.375rem;
|
line-height: 9.375rem;
|
||||||
@ -314,13 +321,19 @@ object-fit: cover;
|
|||||||
margin-top: 2.875rem;
|
margin-top: 2.875rem;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
position: relative;
|
position: relative;
|
||||||
margin-top: 9.375rem;
|
// margin-top: 9.375rem;
|
||||||
#xxxFullScreen {
|
#xxxFullScreen {
|
||||||
background-color: white;
|
background-color: white;
|
||||||
margin-top: 100px;
|
// margin-top: 100px;
|
||||||
#swiper1 {
|
#swiper1 {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
margin-top: 2.31rem;
|
||||||
|
|
||||||
|
h2{
|
||||||
|
padding-bottom: 5rem;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.swiper-container2 {
|
.swiper-container2 {
|
||||||
@ -463,9 +476,13 @@ img{
|
|||||||
|
|
||||||
}
|
}
|
||||||
.rc-max-width--xl {
|
.rc-max-width--xl {
|
||||||
|
|
||||||
.rc-ma
|
.rc-ma
|
||||||
{
|
{
|
||||||
padding:60px 0;
|
.rc-margin-y--xl{
|
||||||
|
margin-bottom: 1.88rem;
|
||||||
|
}
|
||||||
|
// padding:60px 0;
|
||||||
|
|
||||||
.ul-zhuan{
|
.ul-zhuan{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@ -493,21 +510,71 @@ img{
|
|||||||
margin-left:1.25rem;
|
margin-left:1.25rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
margin-bottom: 0;
|
||||||
|
h2{
|
||||||
|
margin-top:2.31rem;
|
||||||
|
padding-bottom: 0.62rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
.usermain{
|
||||||
|
margin-top: 2.5rem;
|
||||||
|
padding-bottom: 2.82rem;
|
||||||
|
.ul-dog{
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
flex-direction: row;
|
||||||
|
|
||||||
|
span{
|
||||||
|
margin-top: 2.5rem;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
img{
|
||||||
|
width: 9.5rem;
|
||||||
|
height: 9.5rem;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
li{
|
||||||
|
cursor: pointer;
|
||||||
|
font-size: 16px;
|
||||||
|
width: 9.875rem;
|
||||||
|
text-align: center;
|
||||||
|
height: 9.875rem;
|
||||||
|
background: #F6F6F6;
|
||||||
|
border-radius: 50%;
|
||||||
|
margin-left:3rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.rc-main{
|
.rc-main{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin-top: 2.5rem;
|
margin-top: 2.5rem;
|
||||||
|
|
||||||
|
.rc-text--center{
|
||||||
|
margin-top: 4.8rem;
|
||||||
|
|
||||||
|
}
|
||||||
.van-tabs{
|
.van-tabs{
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
.selectionswitch{
|
.selectionswitch{
|
||||||
|
|
||||||
|
.rc-text--center{
|
||||||
|
margin-top: 4.8rem;
|
||||||
|
}
|
||||||
.van-tabs{
|
.van-tabs{
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
.rc-selection{
|
.rc-selection{
|
||||||
|
display: none;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
ol{
|
ol{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 23 KiB |
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
@ -7,12 +7,13 @@
|
|||||||
<tabs></tabs>
|
<tabs></tabs>
|
||||||
<unlogin></unlogin>
|
<unlogin></unlogin>
|
||||||
<!-- Suppose in header end -->
|
<!-- Suppose in header end -->
|
||||||
<van-swipe :autoplay="30000">
|
<van-swipe :autoplay="3000">
|
||||||
<van-swipe-item v-for="(banner, index) in banners" :key="index">
|
<van-swipe-item v-for="(banner, index) in banners" :key="index">
|
||||||
<img :src="banner.src" class="useraimg"/>
|
<img :src="banner.src" class="useraimg"/>
|
||||||
</van-swipe-item>
|
</van-swipe-item>
|
||||||
</van-swipe>
|
</van-swipe>
|
||||||
|
|
||||||
|
|
||||||
<div class="online bold rc-md-down" id="fixed-catbar-seperator"></div>
|
<div class="online bold rc-md-down" id="fixed-catbar-seperator"></div>
|
||||||
<!-- <div v-swiper:mySwiper="swiperOption" class="swiperWrap">
|
<!-- <div v-swiper:mySwiper="swiperOption" class="swiperWrap">
|
||||||
<div class="swiper-wrapper">
|
<div class="swiper-wrapper">
|
||||||
@ -40,12 +41,12 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="online bold rc-md-up"></div>
|
<div class="online bold rc-md-up" v-show="catproduct"></div>
|
||||||
|
|
||||||
<div class="rc-full-width">
|
<div class="rc-full-width">
|
||||||
<div class="rc-lunbo rc-full-width">
|
<div class="rc-lunbo rc-full-width">
|
||||||
<!-- <h2>明星猫粮</h2> -->
|
<!-- <h2>明星猫粮</h2> -->
|
||||||
<div class="pageFullScreen" id="xxxFullScreen" v-show="catproduct">
|
<div class="pageFullScreen" id="xxxFullScreen" v-show="catproduct" ref="mingxing">
|
||||||
<!-- 内容 -->
|
<!-- 内容 -->
|
||||||
<div class="swiper-container rc-full-width rc-padding-y--md" id="swiper1">
|
<div class="swiper-container rc-full-width rc-padding-y--md" id="swiper1">
|
||||||
<h2 class="rc-beta rc-text--center">{{usertitle}}</h2>
|
<h2 class="rc-beta rc-text--center">{{usertitle}}</h2>
|
||||||
@ -93,9 +94,12 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="online bold"></div>
|
|
||||||
<div class="selectionswitch rc-full-width rc-max-width--xl rc-padding-y--md">
|
|
||||||
<h2 class="rc-beta rc-text--center">全价猫湿粮</h2>
|
|
||||||
|
<div class="online bold" v-show="onemao"></div>
|
||||||
|
<div class="selectionswitch rc-full-width rc-max-width--xl rc-padding-y--md" ref="usercontent" v-show="onemao">
|
||||||
|
<h2 class="rc-beta rc-text--center" >全价猫湿粮</h2>
|
||||||
<van-tabs @change='catclick' class="van-tabs">
|
<van-tabs @change='catclick' class="van-tabs">
|
||||||
<van-tab v-for="(item,index) in discoun" :key="index" :title="item.title">
|
<van-tab v-for="(item,index) in discoun" :key="index" :title="item.title">
|
||||||
<div class="rc-contair">
|
<div class="rc-contair">
|
||||||
@ -124,7 +128,6 @@
|
|||||||
</nuxt-link>
|
</nuxt-link>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</van-tab>
|
</van-tab>
|
||||||
@ -182,8 +185,8 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="online bold"></div>
|
<div class="online bold" v-show="twomao"></div>
|
||||||
<div class="selectionswitch rc-full-width rc-max-width--xl rc-padding-y--md">
|
<div class="selectionswitch rc-full-width rc-max-width--xl rc-padding-y--md" v-show="twomao" ref="catgan">
|
||||||
<h2 class="rc-beta rc-text--center">全价猫干粮</h2>
|
<h2 class="rc-beta rc-text--center">全价猫干粮</h2>
|
||||||
<van-tabs @change='catclick' class="van-tabs">
|
<van-tabs @change='catclick' class="van-tabs">
|
||||||
<van-tab v-for="(item,index) in discoun" :key="index" :title="item.title">
|
<van-tab v-for="(item,index) in discoun" :key="index" :title="item.title">
|
||||||
@ -275,12 +278,76 @@
|
|||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="online bold"></div>
|
<div class="online bold" v-show="dogshow"></div>
|
||||||
|
<div class="pageFullScreen" id="xxxFullScreen" v-show="dogshow" ref="mingxing">
|
||||||
|
<!-- 内容 -->
|
||||||
|
<div class="swiper-container rc-full-width rc-padding-y--md" id="swiper1">
|
||||||
|
<div class="oc-top">
|
||||||
|
<h2 class="rc-beta rc-text--center">{{dogtitle}}</h2>
|
||||||
|
</div>
|
||||||
|
<!-- 轮播图 -->
|
||||||
|
<swiper :options="swiperOption">
|
||||||
|
<swiper-slide class="swiper-slide" v-for="(item, key) in doglistvideo" :key="key" >
|
||||||
|
<div class="rc-video">
|
||||||
|
<div class="uservideo">
|
||||||
|
|
||||||
<div class="selectionswitch rc-full-width rc-max-width--xl rc-padding-y--md">
|
</div>
|
||||||
|
|
||||||
|
<div class="rc-right">
|
||||||
|
<img :src=item.catimage alt="">
|
||||||
|
<span>{{item.title}}</span>
|
||||||
|
<p>{{item.detail}}</p>
|
||||||
|
<em>{{item.price}}</em>
|
||||||
|
<strong class="ts-standard-btn ts-standard-btn--two center" @click="userbuy(item,index)">立即购买</strong>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="sw-center" >
|
||||||
|
<div class="rc-click" @click="selectproduce(item,index)">
|
||||||
|
<div class="uservideo">
|
||||||
|
<video width="300px" height="251" controls="controls">
|
||||||
|
<source :src= item.video type="video/ogg" autoplay>
|
||||||
|
</video>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<img :src=item.catimage alt="">
|
||||||
|
<span>{{item.title}}</span>
|
||||||
|
<p>{{item.detail}}</p>
|
||||||
|
<em>{{item.price}}</em>
|
||||||
|
</div>
|
||||||
|
<div class="rc-full-width rc-margin-y--md">
|
||||||
|
<i @click="userbuy(item,index)" class="ts-standard-btn ts-standard-btn--two center">立即购买</i>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</swiper-slide>
|
||||||
|
</swiper>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="online bold" v-show="threemao"></div>
|
||||||
|
|
||||||
|
<div class="selectionswitch rc-full-width rc-max-width--xl rc-padding-y--md" v-show="threemao" ref="doggshi">
|
||||||
<h2 class="rc-beta rc-text--center">全价犬湿粮</h2>
|
<h2 class="rc-beta rc-text--center">全价犬湿粮</h2>
|
||||||
<van-tabs @change='userdog' class="van-tabs">
|
<van-tabs @change='userdog' class="van-tabs">
|
||||||
|
<div class="online bold rc-md-down" v-show="threemao"></div>
|
||||||
<van-tab v-for="(item,index) in dogtype" :key="index" :title="item.title">
|
<van-tab v-for="(item,index) in dogtype" :key="index" :title="item.title">
|
||||||
|
<div class="online bold" v-show="threemao"></div>
|
||||||
|
<div class="usermain">
|
||||||
|
<ul class="ul-dog usermain">
|
||||||
|
<li
|
||||||
|
v-for="(item, index) in userdoglist"
|
||||||
|
:key="index"
|
||||||
|
@click="quanshi(item, index)"
|
||||||
|
:class="activeIndex5 == index ? 'active' : 'unactive'"
|
||||||
|
>
|
||||||
|
<img :src="item.catimage" alt="">
|
||||||
|
<span>{{ item.title }}</span>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="rc-contair">
|
<div class="rc-contair">
|
||||||
<ul class="ts-product-list rc-margin-bottom--lg">
|
<ul class="ts-product-list rc-margin-bottom--lg">
|
||||||
<li v-for="(item,index) in dogshi" :key="index" class="rc-margin-top--md">
|
<li v-for="(item,index) in dogshi" :key="index" class="rc-margin-top--md">
|
||||||
@ -374,11 +441,28 @@
|
|||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="online bold"></div>
|
|
||||||
<div class="selectionswitch rc-full-width rc-max-width--xl rc-padding-y--md">
|
|
||||||
|
|
||||||
|
<div class="online bold" v-show="fourmao"></div>
|
||||||
|
<div class="selectionswitch rc-full-width rc-max-width--xl rc-padding-y--md" v-show="fourmao" ref="dogan">
|
||||||
<h2 class="rc-beta rc-text--center">全价犬干粮</h2>
|
<h2 class="rc-beta rc-text--center">全价犬干粮</h2>
|
||||||
<van-tabs @change='userdog' class="van-tabs">
|
<van-tabs @change='userdog' class="van-tabs">
|
||||||
|
<div class="online bold" v-show="fourmao"></div>
|
||||||
<van-tab v-for="(item,index) in dogtype" :key="index" :title="item.title">
|
<van-tab v-for="(item,index) in dogtype" :key="index" :title="item.title">
|
||||||
|
<div class="usermain">
|
||||||
|
<ul class="ul-dog usermain">
|
||||||
|
<li
|
||||||
|
v-for="(item, index) in userdoglist"
|
||||||
|
:key="index"
|
||||||
|
@click="userdoghot(item, index)"
|
||||||
|
:class="activeIndex6 == index ? 'active' : 'unactive'"
|
||||||
|
>
|
||||||
|
<img :src="item.catimage" alt="">
|
||||||
|
<span>{{ item.title }}</span>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
<div class="rc-contair">
|
<div class="rc-contair">
|
||||||
<ul class="ts-product-list rc-margin-bottom--lg">
|
<ul class="ts-product-list rc-margin-bottom--lg">
|
||||||
<li v-for="(item,index) in doggan" :key="index" class="rc-margin-top--md">
|
<li v-for="(item,index) in doggan" :key="index" class="rc-margin-top--md">
|
||||||
@ -470,9 +554,9 @@
|
|||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="online bold"></div>
|
<div class="online bold" v-show="fivemao"></div>
|
||||||
|
|
||||||
<div class="selectionswitch rc-full-width rc-max-width--xl rc-padding-y--md">
|
<div class="selectionswitch rc-full-width rc-max-width--xl rc-padding-y--md" v-show="fivemao" ref="chufang">
|
||||||
<h2 class="rc-beta rc-text--center">处方用粮</h2>
|
<h2 class="rc-beta rc-text--center">处方用粮</h2>
|
||||||
<van-tabs @change='userclick' class="van-tabs">
|
<van-tabs @change='userclick' class="van-tabs">
|
||||||
<van-tab v-for="(item,index) in discounchufang" :key="index" :title="item.title">
|
<van-tab v-for="(item,index) in discounchufang" :key="index" :title="item.title">
|
||||||
@ -640,9 +724,19 @@
|
|||||||
return{
|
return{
|
||||||
useraindex:0,
|
useraindex:0,
|
||||||
usertitle:'明星猫粮',
|
usertitle:'明星猫粮',
|
||||||
|
dogtitle:'明星狗粮',
|
||||||
processinformation:[],
|
processinformation:[],
|
||||||
catshi:[],
|
catshi:[],
|
||||||
|
userindex:0,
|
||||||
userstype:'',
|
userstype:'',
|
||||||
|
onemao:false,
|
||||||
|
twomao:false,
|
||||||
|
threemao:false,
|
||||||
|
dogshow:false,
|
||||||
|
fourmao:false,
|
||||||
|
fivemao:false,
|
||||||
|
sixmao:false,
|
||||||
|
stypechange:true,
|
||||||
userunlogin:false,
|
userunlogin:false,
|
||||||
searchBar:true,
|
searchBar:true,
|
||||||
usermessage:[],
|
usermessage:[],
|
||||||
@ -670,24 +764,13 @@
|
|||||||
gotop: false,
|
gotop: false,
|
||||||
usersetting: `${settings.rbs}`,
|
usersetting: `${settings.rbs}`,
|
||||||
activeIndex: 0,
|
activeIndex: 0,
|
||||||
|
activeIndex5:0,
|
||||||
|
activeIndex6:0,
|
||||||
activeInde2: 0,
|
activeInde2: 0,
|
||||||
activeInde3:0,
|
activeInde3:0,
|
||||||
catproduct:true,
|
catproduct:true,
|
||||||
catfood:false,
|
catfood:false,
|
||||||
|
|
||||||
dogselection:[
|
|
||||||
{
|
|
||||||
title: "小型犬",
|
|
||||||
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "中型犬",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "大型犬",
|
|
||||||
},
|
|
||||||
|
|
||||||
],
|
|
||||||
|
|
||||||
selection:[
|
selection:[
|
||||||
{
|
{
|
||||||
@ -717,7 +800,7 @@ activeInde3:0,
|
|||||||
{src:require("../assets/image/four.jpg"),link:""},
|
{src:require("../assets/image/four.jpg"),link:""},
|
||||||
],
|
],
|
||||||
|
|
||||||
doglist: [
|
userdoglist: [
|
||||||
{
|
{
|
||||||
title: "小型犬",
|
title: "小型犬",
|
||||||
catimage: require("../assets/cat.png"),
|
catimage: require("../assets/cat.png"),
|
||||||
@ -759,44 +842,51 @@ activeInde3:0,
|
|||||||
{
|
{
|
||||||
title: "明星猫粮",
|
title: "明星猫粮",
|
||||||
detail:'为10月龄及以上英国短毛猫成猫量身打造的精准营养',
|
detail:'为10月龄及以上英国短毛猫成猫量身打造的精准营养',
|
||||||
catimage: require("../assets/cat.png"),
|
catimage: require("../assets/star-cat.png"),
|
||||||
price:'¥2'
|
price:'¥2'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "猫湿粮",
|
title: "猫湿粮",
|
||||||
detail:'为10月龄及以上英国短毛猫成猫量身打造的精准营养',
|
detail:'为10月龄及以上英国短毛猫成猫量身打造的精准营养',
|
||||||
|
|
||||||
price:'¥12',
|
price:'¥12',
|
||||||
catimage: require("../assets/four.png"),
|
catimage: require("../assets/two.png"),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "猫干粮",
|
title: "猫干粮",
|
||||||
detail:'为10月龄及以上英国短毛猫成猫量身打造的精准营养',
|
detail:'为10月龄及以上英国短毛猫成猫量身打造的精准营养',
|
||||||
|
|
||||||
price:'¥102',
|
price:'¥102',
|
||||||
catimage: require("../assets/one.png"),
|
catimage: require("../assets/cat.png"),
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: "明星狗粮",
|
||||||
|
detail:'为10月龄及以上英国短毛猫成猫量身打造的精准营养',
|
||||||
|
price:'¥112',
|
||||||
|
catimage: require("../assets/six.png"),
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
title: "犬湿粮",
|
title: "犬湿粮",
|
||||||
detail:'为10月龄及以上英国短毛猫成猫量身打造的精准营养',
|
|
||||||
|
|
||||||
price:'¥112',
|
|
||||||
catimage: require("../assets/two.png"),
|
|
||||||
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "犬干粮",
|
|
||||||
detail:'为10月龄及以上英国短毛猫成猫量身打造的精准营养',
|
detail:'为10月龄及以上英国短毛猫成猫量身打造的精准营养',
|
||||||
|
|
||||||
price:'¥112',
|
price:'¥112',
|
||||||
catimage: require("../assets/three.png"),
|
catimage: require("../assets/three.png"),
|
||||||
|
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "犬干粮",
|
||||||
|
detail:'为10月龄及以上英国短毛猫成猫量身打造的精准营养',
|
||||||
|
|
||||||
|
price:'¥112',
|
||||||
|
catimage: require("../assets/one.png"),
|
||||||
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "处方用粮",
|
title: "处方用粮",
|
||||||
detail:'为10月龄及以上英国短毛猫成猫量身打造的精准营养',
|
detail:'为10月龄及以上英国短毛猫成猫量身打造的精准营养',
|
||||||
price:'¥112',
|
price:'¥112',
|
||||||
catimage: require("../assets/six.png"),
|
catimage: require("../assets/four.png"),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|
||||||
@ -855,6 +945,38 @@ activeInde3:0,
|
|||||||
price:'¥123.45',
|
price:'¥123.45',
|
||||||
},
|
},
|
||||||
|
|
||||||
|
],
|
||||||
|
|
||||||
|
doglistvideo: [
|
||||||
|
{
|
||||||
|
title: "明星狗粮",
|
||||||
|
video:require("../assets/dog/one.mp4"),
|
||||||
|
catimage: require("../assets/dog/one.jpg"),
|
||||||
|
detail:'为10月龄及以上成犬量身打造的精准营养',
|
||||||
|
price:'¥123.45',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "狗湿粮",
|
||||||
|
video:require("../assets/dog/two.mp4"),
|
||||||
|
catimage: require("../assets/dog/two.jpg"),
|
||||||
|
detail:'为10月龄及以上英国成犬量身打造的精准营养',
|
||||||
|
price:'¥123.45',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "狗干粮",
|
||||||
|
video:require("../assets/dog/three.mp4"),
|
||||||
|
catimage: require("../assets/dog/three.jpg"),
|
||||||
|
detail:'为10月龄及以上英国犬成犬量身打造的精准营养',
|
||||||
|
price:'¥123.45',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "狗干粮",
|
||||||
|
video:require("../assets/dog/four.mp4"),
|
||||||
|
catimage: require("../assets/dog/four.jpg"),
|
||||||
|
detail:'为10月龄及以上英国成犬量身打造的精准营养',
|
||||||
|
price:'¥123.45',
|
||||||
|
},
|
||||||
|
|
||||||
],
|
],
|
||||||
fixedlist: [
|
fixedlist: [
|
||||||
{
|
{
|
||||||
@ -967,13 +1089,27 @@ activeInde3:0,
|
|||||||
Myfooter,
|
Myfooter,
|
||||||
tabs,
|
tabs,
|
||||||
unlogin,
|
unlogin,
|
||||||
|
// userswiper
|
||||||
},
|
},
|
||||||
created(){
|
created(){
|
||||||
vm=this;
|
vm=this;
|
||||||
},
|
},
|
||||||
|
watch:{
|
||||||
|
},
|
||||||
mounted(){
|
mounted(){
|
||||||
|
const that = this
|
||||||
|
this.ifAdoid()
|
||||||
|
// window.onresize = () => {
|
||||||
|
// setTimeout(() => {
|
||||||
|
// this.ifAdoid()
|
||||||
|
// }, 500);
|
||||||
|
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
this.usermessage= JSON.parse(localStorage.getItem("userInfo"));
|
this.usermessage= JSON.parse(localStorage.getItem("userInfo"));
|
||||||
let jump = document.querySelectorAll('.d_jump')
|
|
||||||
if(this.usermessage==null ||this.usermessage==undefined){
|
if(this.usermessage==null ||this.usermessage==undefined){
|
||||||
this.userunlogin=true
|
this.userunlogin=true
|
||||||
}
|
}
|
||||||
@ -989,8 +1125,12 @@ vm=this;
|
|||||||
window.removeEventListener('scroll', this.scrollToTop);
|
window.removeEventListener('scroll', this.scrollToTop);
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
ifadroind(item,index,order){
|
|
||||||
console.log(item,order);
|
|
||||||
|
|
||||||
|
ifAdoid(item,index){
|
||||||
|
console.log(index);
|
||||||
|
this.userindex=index;
|
||||||
var sUserAgent = navigator.userAgent.toLowerCase();
|
var sUserAgent = navigator.userAgent.toLowerCase();
|
||||||
var bIsIpad = sUserAgent.match(/ipad/i) == "ipad";
|
var bIsIpad = sUserAgent.match(/ipad/i) == "ipad";
|
||||||
var bIsIphoneOs = sUserAgent.match(/iphone os/i) == "iphone os";
|
var bIsIphoneOs = sUserAgent.match(/iphone os/i) == "iphone os";
|
||||||
@ -1000,35 +1140,158 @@ vm=this;
|
|||||||
var bIsAndroid = sUserAgent.match(/android/i) == "android";
|
var bIsAndroid = sUserAgent.match(/android/i) == "android";
|
||||||
var bIsCE = sUserAgent.match(/windows ce/i) == "windows ce";
|
var bIsCE = sUserAgent.match(/windows ce/i) == "windows ce";
|
||||||
var bIsWM = sUserAgent.match(/windows mobile/i) == "windows mobile";
|
var bIsWM = sUserAgent.match(/windows mobile/i) == "windows mobile";
|
||||||
this.activeIndex=index;
|
|
||||||
if (!(bIsIpad || bIsIphoneOs || bIsMidp || bIsUc7 || bIsUc || bIsAndroid || bIsCE || bIsWM)) {
|
if (!(bIsIpad || bIsIphoneOs || bIsMidp || bIsUc7 || bIsUc || bIsAndroid || bIsCE || bIsWM)) {
|
||||||
console.log("当前是电脑打开")
|
console.log("当前是电脑打开")
|
||||||
this.usertitle=item.title
|
this.stypechange=false;
|
||||||
this.catlistvideo[order]=item;
|
console.log(this.usertitle)
|
||||||
this.catproduct=true;
|
|
||||||
console.log(this.catproduct);
|
// let catshiid=document.querySelectorAll('.selectionswitch');
|
||||||
|
// catshiid[this.userindex].style.display='none';
|
||||||
|
// catshiid[this.userindex].style.display='none';
|
||||||
|
this.catproduct=true;
|
||||||
|
this.onemao=false;
|
||||||
|
this.twomao=false;
|
||||||
|
this.threemao=false;
|
||||||
|
this.fourmao=false;
|
||||||
|
this.fivemao=false;
|
||||||
|
this.sixmao=false;
|
||||||
|
this.dogshow=false
|
||||||
|
// console.log(catshiid);
|
||||||
|
}else{
|
||||||
|
console.log("当前是手机打开")
|
||||||
|
this.stypechange=true;
|
||||||
|
this.onemao=true;
|
||||||
|
this.twomao=true;
|
||||||
|
this.threemao=true;
|
||||||
|
this.fourmao=true;
|
||||||
|
this.fivemao=true;
|
||||||
|
this.dogshow=true;
|
||||||
|
this.catproduct=true
|
||||||
|
this.sixmao=true;
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
ifadroind(item,index,order){
|
||||||
|
console.log(item,index,order);
|
||||||
|
|
||||||
|
|
||||||
|
var sUserAgent = navigator.userAgent.toLowerCase();
|
||||||
|
var bIsIpad = sUserAgent.match(/ipad/i) == "ipad";
|
||||||
|
var bIsIphoneOs = sUserAgent.match(/iphone os/i) == "iphone os";
|
||||||
|
var bIsMidp = sUserAgent.match(/midp/i) == "midp";
|
||||||
|
var bIsUc7 = sUserAgent.match(/rv:1.2.3.4/i) == "rv:1.2.3.4";
|
||||||
|
var bIsUc = sUserAgent.match(/ucweb/i) == "ucweb";
|
||||||
|
var bIsAndroid = sUserAgent.match(/android/i) == "android";
|
||||||
|
var bIsCE = sUserAgent.match(/windows ce/i) == "windows ce";
|
||||||
|
var bIsWM = sUserAgent.match(/windows mobile/i) == "windows mobile";
|
||||||
|
|
||||||
|
if (!(bIsIpad || bIsIphoneOs || bIsMidp || bIsUc7 || bIsUc || bIsAndroid || bIsCE || bIsWM)) {
|
||||||
|
console.log("当前是电脑打开啊啊啊")
|
||||||
|
if(item.title=='明星猫粮'){
|
||||||
|
this.catproduct=true;
|
||||||
|
this.twomao=false;
|
||||||
|
this.threemao=false;
|
||||||
|
this.fourmao=false;
|
||||||
|
this.fivemao=false;
|
||||||
|
this.dogshow=false;
|
||||||
|
this.sixmao=false;
|
||||||
|
this.onemao=false;
|
||||||
|
}
|
||||||
|
if(item.title=='猫湿粮'){
|
||||||
|
this.onemao=true;
|
||||||
|
this.dogshow=false;
|
||||||
|
console.log(this.onemao);
|
||||||
|
this.twomao=false;
|
||||||
|
this.threemao=false;
|
||||||
|
this.fourmao=false;
|
||||||
|
this.fivemao=false;
|
||||||
|
this.catproduct=false;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}if(item.title=='猫干粮'){
|
||||||
|
this.onemao=false;
|
||||||
|
this.twomao=true;
|
||||||
|
this.dogshow=false;
|
||||||
|
this.threemao=false;
|
||||||
|
this.fourmao=false;
|
||||||
|
this.chufang=false;
|
||||||
|
this.catproduct=false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(item.title=='犬干粮'){
|
||||||
|
this.onemao=false;
|
||||||
|
this.twomao=false;
|
||||||
|
this.threemao=false;
|
||||||
|
this.fourmao=true;
|
||||||
|
this.chufang=false;
|
||||||
|
this.dogshow=false;
|
||||||
|
this.catproduct=false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(item.title=='犬湿粮'){
|
||||||
|
this.onemao=false;
|
||||||
|
this.twomao=false;
|
||||||
|
this.threemao=true;
|
||||||
|
this.fourmao=false;
|
||||||
|
this.chufang=false;
|
||||||
|
this.catproduct=false;
|
||||||
|
this.dogshow=false;
|
||||||
|
}
|
||||||
|
if(item.title=='处方用粮'){
|
||||||
|
this.onemao=false;
|
||||||
|
this.twomao=false;
|
||||||
|
this.threemao=false;
|
||||||
|
this.fourmao=false;
|
||||||
|
this.fivemao=true;
|
||||||
|
this.dogshow=false;
|
||||||
|
this.catproduct=false;
|
||||||
|
}
|
||||||
|
if(item.title=='明星狗粮'){
|
||||||
|
this.onemao=false;
|
||||||
|
this.twomao=false;
|
||||||
|
this.threemao=false;
|
||||||
|
this.fourmao=false;
|
||||||
|
this.fivemao=false;
|
||||||
|
this.dogshow=true;
|
||||||
|
this.catproduct=false;
|
||||||
|
}
|
||||||
|
// this.usertitle=item.title
|
||||||
|
// this.catlistvideo[order]=item;
|
||||||
|
// this.catproduct=true;
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
this.catfood=true;
|
this.catfood=true;
|
||||||
this.catproduct=false;
|
// this.catproduct=false;
|
||||||
let userindex=index
|
let userindex=index
|
||||||
console.log(item,index);
|
console.log(item,index);
|
||||||
let mingxin=document.querySelector('.pageFullScreen');
|
let mingxin=document.querySelector('.pageFullScreen');
|
||||||
|
let dogtop=document.querySelector('.oc-top');
|
||||||
|
console.log(dogtop);
|
||||||
console.log(mingxin.offsetTop);
|
console.log(mingxin.offsetTop);
|
||||||
|
if(item.title=='犬湿粮'||item.title=='犬干粮'||item.title=='处方用粮'){
|
||||||
|
userindex=userindex-2
|
||||||
|
}else{
|
||||||
|
userindex=userindex-1
|
||||||
|
}
|
||||||
if(item.title=='明星猫粮'){
|
if(item.title=='明星猫粮'){
|
||||||
mingxin.scrollIntoView(true);
|
mingxin.scrollIntoView(true);
|
||||||
}else{
|
}else{
|
||||||
let catshiid=document.querySelectorAll('.selectionswitch');
|
let catshiid=document.querySelectorAll('.selectionswitch');
|
||||||
catshiid[userindex-1].scrollIntoView(true);
|
catshiid[userindex].scrollIntoView(true);
|
||||||
}
|
}
|
||||||
|
if(item.title=='明星狗粮')
|
||||||
|
dogtop.scrollIntoView(true);
|
||||||
|
// if(item.title=="猫湿粮"){
|
||||||
|
// this.catproduct=false;
|
||||||
|
// this.catfood=true;
|
||||||
|
// }else if(item.title=="明星猫粮"){
|
||||||
|
// this.catproduct=true;
|
||||||
|
// this.catfood=false;
|
||||||
|
|
||||||
if(item.title=="猫湿粮"){
|
// }
|
||||||
this.catproduct=false;
|
|
||||||
this.catfood=true;
|
|
||||||
}else if(item.title=="明星猫粮"){
|
|
||||||
this.catproduct=true;
|
|
||||||
this.catfood=false;
|
|
||||||
|
|
||||||
}
|
|
||||||
console.log("当前是手机打开")
|
console.log("当前是手机打开")
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -1229,7 +1492,21 @@ catshiid[userindex-1].scrollIntoView(true);
|
|||||||
},
|
},
|
||||||
|
|
||||||
selectGoods(item,index){
|
selectGoods(item,index){
|
||||||
|
console.log(item,index);
|
||||||
|
this.activeIndex=index;
|
||||||
|
console.log(item.title);
|
||||||
this.ifadroind(item,index,this.useraindex)
|
this.ifadroind(item,index,this.useraindex)
|
||||||
|
// this.ifAdoid(item,index);
|
||||||
|
|
||||||
|
},
|
||||||
|
quanshi(item,index){
|
||||||
|
console.log(item,index);
|
||||||
|
this.activeIndex5=index
|
||||||
|
console.log(this.activeIndex5);
|
||||||
|
|
||||||
|
},
|
||||||
|
userdoghot(item,index){
|
||||||
|
this.activeIndex6=index
|
||||||
|
|
||||||
},
|
},
|
||||||
selectGo(item,index){
|
selectGo(item,index){
|
||||||
|