mirror of
https://gitee.com/lab1024/smart-admin.git
synced 2025-10-02 02:06:38 +08:00
update rc-busness/pages/index.vue.
This commit is contained in:
parent
ebe8b80f93
commit
6e4ffd31c4
@ -1,10 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
|
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<Myheader></Myheader>
|
<Myheader></Myheader>
|
||||||
<div class="rc-top"></div>
|
<div class="rc-top"></div>
|
||||||
<unlogin></unlogin>
|
|
||||||
<!-- Suppose in header end -->
|
<!-- Suppose in header end -->
|
||||||
<div class="ts-banner-swiper-container">
|
<div class="ts-banner-swiper-container">
|
||||||
<swiper :options="headerSwiperOption">
|
<swiper :options="headerSwiperOption">
|
||||||
@ -40,15 +37,16 @@
|
|||||||
<div class="online bold rc-md-up" v-show="catproduct"></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 ts-position-identifier" data-rel="明星猫粮">
|
||||||
<!-- <h2>明星猫粮</h2> -->
|
<!-- <h2>明星猫粮</h2> -->
|
||||||
<div class="pageFullScreen" id="xxxFullScreen" v-show="catproduct" ref="mingxing">
|
<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="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>
|
||||||
<!-- 轮播图 -->
|
<!-- 轮播图 -->
|
||||||
<van-swipe class="rc-padding-bottom--md">
|
<div class="ts-carousel-container">
|
||||||
<van-swipe-item v-for="(item, index) in catlistvideo" :key="index">
|
<swiper class="rc-padding-bottom--md" :options="catStarProductswiperOption">
|
||||||
|
<swiper-slide v-for="(item, index) in catlistvideo" :key="index">
|
||||||
<div class="rc-video">
|
<div class="rc-video">
|
||||||
<div class="uservideo">
|
<div class="uservideo">
|
||||||
<video controls="" :poster=item.catimage>
|
<video controls="" :poster=item.catimage>
|
||||||
@ -57,7 +55,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="rc-right">
|
<div class="rc-right">
|
||||||
<img :src=item.catimage alt="">
|
<img :src=item.productimage alt="">
|
||||||
<span>{{item.title}}</span>
|
<span>{{item.title}}</span>
|
||||||
<p>{{item.detail}}</p>
|
<p>{{item.detail}}</p>
|
||||||
<em>{{item.price}}</em>
|
<em>{{item.price}}</em>
|
||||||
@ -72,7 +70,7 @@
|
|||||||
</video>
|
</video>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<img :src=item.catimage alt="">
|
<img :src=item.productimage alt="">
|
||||||
<span>{{item.title}}</span>
|
<span>{{item.title}}</span>
|
||||||
<p>{{item.detail}}</p>
|
<p>{{item.detail}}</p>
|
||||||
<em>{{item.price}}</em>
|
<em>{{item.price}}</em>
|
||||||
@ -81,23 +79,20 @@
|
|||||||
<i @click="userbuy(item,index)" class="ts-standard-btn ts-standard-btn--two center">立即购买</i>
|
<i @click="userbuy(item,index)" class="ts-standard-btn ts-standard-btn--two center">立即购买</i>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</van-swipe-item>
|
</swiper-slide>
|
||||||
</van-swipe>
|
</swiper>
|
||||||
|
<div id="catStarSwiperPagnation" class="swiper-pagination ts-carousel-indicator center"></div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="online bold" v-show="onemao"></div>
|
<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">
|
<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>
|
<h2 class="rc-beta rc-text--center ts-position-identifier" data-rel="猫湿粮" >全价猫湿粮</h2>
|
||||||
<van-tabs @change='catclick' class="van-tabs">
|
<van-tabs @click='catclickShi' class="van-tabs" v-if="onemao" v-model="maoshiCurIndex">
|
||||||
<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">
|
||||||
<ul class="ts-product-list rc-margin-bottom--lg">
|
<ul class="ts-product-list rc-margin-bottom--lg">
|
||||||
@ -170,22 +165,18 @@
|
|||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
<nuxt-link :to="`/productdetails/productlist/`">
|
||||||
<nuxt-link :to="`/productdetails/productlist/`">
|
<div class="userserlect">
|
||||||
<div class="userserlect">
|
<span class="ts-standard-btn center">查看更多</span>
|
||||||
<span class="ts-standard-btn center">查看更多</span>
|
</div>
|
||||||
</div>
|
</nuxt-link>
|
||||||
</nuxt-link>
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="online bold" v-show="twomao"></div>
|
<div class="online bold" v-show="twomao"></div>
|
||||||
<div class="selectionswitch rc-full-width rc-max-width--xl rc-padding-y--md" v-show="twomao" ref="catgan">
|
<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 ts-position-identifier" data-rel="猫干粮">全价猫干粮</h2>
|
||||||
<van-tabs @change='catclick' class="van-tabs">
|
<van-tabs @click='catclickGan' class="van-tabs" v-if="twomao" v-model="maoganCurIndex">
|
||||||
<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">
|
||||||
<ul class="ts-product-list rc-margin-bottom--lg">
|
<ul class="ts-product-list rc-margin-bottom--lg">
|
||||||
@ -260,7 +251,7 @@
|
|||||||
<strong class="ts-standard-btn ts-standard-btn--two rc-margin-y--md center" @click="selectproduce(item,index)">立即购买</strong>
|
<strong class="ts-standard-btn ts-standard-btn--two rc-margin-y--md center" @click="selectproduce(item,index)">立即购买</strong>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<nuxt-link :to="`/productdetails/productlist/`">
|
<nuxt-link :to="`/productdetails/productlist/`">
|
||||||
<div class="userserlect">
|
<div class="userserlect">
|
||||||
<span class="ts-standard-btn center">查看更多</span>
|
<span class="ts-standard-btn center">查看更多</span>
|
||||||
@ -280,11 +271,12 @@
|
|||||||
<!-- 内容 -->
|
<!-- 内容 -->
|
||||||
<div class="swiper-container rc-full-width rc-padding-y--md" id="swiper2">
|
<div class="swiper-container rc-full-width rc-padding-y--md" id="swiper2">
|
||||||
<div class="oc-top">
|
<div class="oc-top">
|
||||||
<h2 class="rc-beta rc-text--center">{{dogtitle}}</h2>
|
<h2 class="rc-beta rc-text--center ts-position-identifier" data-rel="明星犬粮">{{dogtitle}}</h2>
|
||||||
</div>
|
</div>
|
||||||
<!-- 轮播图 -->
|
<!-- 轮播图 -->
|
||||||
<van-swipe class="rc-padding-bottom--md">
|
<div class="ts-carousel-container">
|
||||||
<van-swipe-item v-for="(item, key) in doglistvideo" :key="key">
|
<swiper class="rc-padding-bottom--md" :options="dogStarProductswiperOption" v-if="dogshow">
|
||||||
|
<swiper-slide v-for="(item, key) in doglistvideo" :key="key">
|
||||||
<div class="rc-video">
|
<div class="rc-video">
|
||||||
<div class="uservideo">
|
<div class="uservideo">
|
||||||
<video controls="" :poster=item.catimage>
|
<video controls="" :poster=item.catimage>
|
||||||
@ -293,7 +285,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="rc-right">
|
<div class="rc-right">
|
||||||
<img :src=item.catimage alt="">
|
<img :src=item.productimage alt="">
|
||||||
<span>{{item.title}}</span>
|
<span>{{item.title}}</span>
|
||||||
<p>{{item.detail}}</p>
|
<p>{{item.detail}}</p>
|
||||||
<em>{{item.price}}</em>
|
<em>{{item.price}}</em>
|
||||||
@ -308,7 +300,7 @@
|
|||||||
</video>
|
</video>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<img :src=item.catimage alt="">
|
<img :src=item.productimage alt="">
|
||||||
<span>{{item.title}}</span>
|
<span>{{item.title}}</span>
|
||||||
<p>{{item.detail}}</p>
|
<p>{{item.detail}}</p>
|
||||||
<em>{{item.price}}</em>
|
<em>{{item.price}}</em>
|
||||||
@ -318,8 +310,10 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</van-swipe-item>
|
</swiper-slide>
|
||||||
</van-swipe>
|
</swiper>
|
||||||
|
<div id="dogStarSwiperPagnation" class="swiper-pagination ts-carousel-indicator center"></div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
@ -330,21 +324,20 @@
|
|||||||
|
|
||||||
|
|
||||||
<div class="selectionswitch rc-full-width rc-max-width--xl rc-padding-y--md" v-show="threemao" ref="doggshi">
|
<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 ts-position-identifier" data-rel="犬湿粮">全价犬湿粮</h2>
|
||||||
<van-tabs @change='userdog' class="van-tabs">
|
<van-tabs @click='userdogShi' class="van-tabs" v-if="threemao" v-model="quanshiCurIndex">
|
||||||
<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="online bold rc-md-up" v-show="threemao"></div>
|
||||||
<div class="usermain">
|
<div class="usermain">
|
||||||
<ul class="ul-dog usermain">
|
<ul class="ul-dog usermain">
|
||||||
<li
|
<li
|
||||||
v-for="(item, index) in userdoglist"
|
v-for="(dogListitem, dogListIndex) in userdoglist"
|
||||||
:key="index"
|
:key="dogListIndex"
|
||||||
@click="quanshi(item, index)"
|
@click="quanshi(dogListitem, dogListIndex)"
|
||||||
:class="activeIndex5 == index ? 'active' : 'unactive'"
|
:class="activeIndex5 == dogListIndex ? 'active' : 'unactive'"
|
||||||
>
|
>
|
||||||
<img :src="item.catimage" alt="">
|
<img :src="dogListitem.catimage" alt="">
|
||||||
<span>{{ item.title }}</span>
|
<span>{{ dogListitem.title }}</span>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
@ -427,12 +420,11 @@
|
|||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
<nuxt-link :to="`/productdetails/productlist/`">
|
||||||
<nuxt-link :to="`/productdetails/productlist/`">
|
<div class="userserlect">
|
||||||
<div class="userserlect">
|
<span class="ts-standard-btn center">查看更多</span>
|
||||||
<span class="ts-standard-btn center">查看更多</span>
|
</div>
|
||||||
</div>
|
</nuxt-link>
|
||||||
</nuxt-link>
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@ -447,20 +439,20 @@
|
|||||||
|
|
||||||
<div class="online bold" v-show="fourmao"></div>
|
<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">
|
<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 ts-position-identifier" data-rel="犬干粮">全价犬干粮</h2>
|
||||||
<van-tabs @change='userdog' class="van-tabs">
|
<van-tabs @click='userdogGan' class="van-tabs" v-if="fourmao" v-model="quanganCurIndex">
|
||||||
<div class="online bold" v-show="fourmao"></div>
|
<div class="online bold rc-md-up" 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">
|
<div class="usermain">
|
||||||
<ul class="ul-dog usermain">
|
<ul class="ul-dog usermain">
|
||||||
<li
|
<li
|
||||||
v-for="(item, index) in userdoglist"
|
v-for="(userDogListItem, userDogListIndex) in userdoglist"
|
||||||
:key="index"
|
:key="userDogListIndex"
|
||||||
@click="userdoghot(item, index)"
|
@click="userdoghot(userDogListItem, userDogListIndex)"
|
||||||
:class="activeIndex6 == index ? 'active' : 'unactive'"
|
:class="activeIndex6 == userDogListIndex ? 'active' : 'unactive'"
|
||||||
>
|
>
|
||||||
<img :src="item.catimage" alt="">
|
<img :src="userDogListItem.catimage" alt="">
|
||||||
<span>{{ item.title }}</span>
|
<span>{{ userDogListItem.title }}</span>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
@ -540,12 +532,11 @@
|
|||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
<nuxt-link :to="`/productdetails/productlist/`">
|
||||||
<nuxt-link :to="`/productdetails/productlist/`">
|
<div class="userserlect">
|
||||||
<div class="userserlect">
|
<span class="ts-standard-btn center">查看更多</span>
|
||||||
<span class="ts-standard-btn center">查看更多</span>
|
</div>
|
||||||
</div>
|
</nuxt-link>
|
||||||
</nuxt-link>
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@ -558,8 +549,8 @@
|
|||||||
<div class="online bold" v-show="fivemao"></div>
|
<div class="online bold" v-show="fivemao"></div>
|
||||||
|
|
||||||
<div class="selectionswitch rc-full-width rc-max-width--xl rc-padding-y--md" v-show="fivemao" ref="chufang">
|
<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 ts-position-identifier" data-rel="处方用粮">处方用粮</h2>
|
||||||
<van-tabs @change='userclick' class="van-tabs">
|
<van-tabs @click='userclick' class="van-tabs" v-if="fivemao">
|
||||||
<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">
|
||||||
<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">
|
||||||
@ -703,7 +694,11 @@
|
|||||||
<span>回到顶部</span>
|
<span>回到顶部</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div v-if="!dataLoaded" class="ts-mask">
|
||||||
|
<div class="ts-mask-bg"></div>
|
||||||
|
<div class="userloding"></div>
|
||||||
|
<span>数据加载中</span>
|
||||||
|
</div>
|
||||||
<Myfooter v-on:litentop='showmesg'></Myfooter>
|
<Myfooter v-on:litentop='showmesg'></Myfooter>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -720,9 +715,11 @@
|
|||||||
meta: {title: '首页'},
|
meta: {title: '首页'},
|
||||||
data(){
|
data(){
|
||||||
return{
|
return{
|
||||||
|
fixedHeader:false,
|
||||||
|
dataLoaded:true,
|
||||||
useraindex:0,
|
useraindex:0,
|
||||||
usertitle:'明星猫粮',
|
usertitle:'明星猫粮',
|
||||||
dogtitle:'明星狗粮',
|
dogtitle:'明星犬粮',
|
||||||
processinformation:[],
|
processinformation:[],
|
||||||
catshi:[],
|
catshi:[],
|
||||||
userindex:0,
|
userindex:0,
|
||||||
@ -800,10 +797,16 @@
|
|||||||
],
|
],
|
||||||
'pc':[
|
'pc':[
|
||||||
{src:"/images/banner/pc-banner1.png",link:""},
|
{src:"/images/banner/pc-banner1.png",link:""},
|
||||||
{src:"/images/banner/pc-banner2.png",link:""}
|
{src:"/images/banner/pc-banner2.png",link:""},
|
||||||
|
{src:"/images/banner/pc-banner3.png",link:""},
|
||||||
|
{src:"/images/banner/pc-banner4.png",link:""}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
showingBanners:[],
|
showingBanners:[],
|
||||||
|
maoganCurIndex:0,
|
||||||
|
maoshiCurIndex:0,
|
||||||
|
quanshiCurIndex:0,
|
||||||
|
quanganCurIndex:0,
|
||||||
userdoglist: [
|
userdoglist: [
|
||||||
{
|
{
|
||||||
title: "小型犬",
|
title: "小型犬",
|
||||||
@ -840,10 +843,10 @@
|
|||||||
|
|
||||||
discountlist: [
|
discountlist: [
|
||||||
{
|
{
|
||||||
title: "明星猫粮",
|
title: "明星猫粮",
|
||||||
detail:'为10月龄及以上英国短毛猫成猫量身打造的精准营养',
|
detail:'为10月龄及以上英国短毛猫成猫量身打造的精准营养',
|
||||||
catimage: require("../assets/star-cat.png"),
|
catimage: require("../assets/star-cat.png"),
|
||||||
price:'¥2'
|
price:'¥2'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "猫湿粮",
|
title: "猫湿粮",
|
||||||
@ -859,7 +862,7 @@
|
|||||||
catimage: require("../assets/cat.png"),
|
catimage: require("../assets/cat.png"),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "明星狗粮",
|
title: "明星犬粮",
|
||||||
detail:'为10月龄及以上英国短毛猫成猫量身打造的精准营养',
|
detail:'为10月龄及以上英国短毛猫成猫量身打造的精准营养',
|
||||||
price:'¥112',
|
price:'¥112',
|
||||||
catimage: require("../assets/six.png"),
|
catimage: require("../assets/six.png"),
|
||||||
@ -917,64 +920,72 @@
|
|||||||
],
|
],
|
||||||
catlistvideo: [
|
catlistvideo: [
|
||||||
{
|
{
|
||||||
title: "明星猫粮",
|
title: "主食级猫湿粮",
|
||||||
video:"/images/cat/one.mp4",
|
video:"/images/cat/one.mp4",
|
||||||
catimage: "/images/cat/one.jpg",
|
catimage: "/images/cat/one.jpg",
|
||||||
detail:'为10月龄及以上英国短毛猫成猫量身打造的精准营养',
|
productimage: "/images/cat/star-1.png",
|
||||||
price:'¥123.45',
|
detail:'为10柔软细腻慕斯 适合离乳期幼猫舔食',
|
||||||
|
price:'¥77',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "猫湿粮",
|
title: "幼猫成长专属",
|
||||||
video:"/images/cat/two.mp4",
|
video:"/images/cat/two.mp4",
|
||||||
catimage: "/images/cat/two.jpg",
|
catimage: "/images/cat/two.jpg",
|
||||||
detail:'为10月龄及以上英国短毛猫成猫量身打造的精准营养',
|
productimage: "/images/cat/star-2.png",
|
||||||
price:'¥123.45',
|
detail:'支持幼猫自身保护力 为快速生长提供足够能量',
|
||||||
|
price:'¥147',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "猫干粮",
|
title: "室内成猫专属",
|
||||||
video:"/images/cat/three.mp4",
|
video:"/images/cat/three.mp4",
|
||||||
catimage: "/images/cat/three.jpg",
|
catimage: "/images/cat/three.jpg",
|
||||||
detail:'为10月龄及以上英国短毛猫成猫量身打造的精准营养',
|
productimage: "/images/cat/star-3.png",
|
||||||
price:'¥123.45',
|
detail:'高易消化蛋白 减少粪便量和异味',
|
||||||
|
price:'¥140',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "猫干粮",
|
title: "英短成猫专属",
|
||||||
video:"/images/cat/four.mp4",
|
video:"/images/cat/four.mp4",
|
||||||
catimage: "/images/cat/four.jpg",
|
catimage: "/images/cat/four.jpg",
|
||||||
detail:'为10月龄及以上英国短毛猫成猫量身打造的精准营养',
|
productimage: "/images/cat/star-4.png",
|
||||||
price:'¥123.45',
|
detail:'增强肌肉质量 支持骨骼与关节健康',
|
||||||
|
price:'¥183',
|
||||||
},
|
},
|
||||||
|
|
||||||
],
|
],
|
||||||
|
|
||||||
doglistvideo: [
|
doglistvideo: [
|
||||||
{
|
{
|
||||||
title: "明星狗粮",
|
title: "主食级狗湿粮",
|
||||||
video:"/images/dog/one.mp4",
|
video:"/images/dog/one.mp4",
|
||||||
catimage: "/images/dog/one.jpg",
|
catimage: "/images/dog/one.jpg",
|
||||||
detail:'为10月龄及以上成犬量身打造的精准营养',
|
productimage: "/images/cat/star-1.png",
|
||||||
price:'¥123.45',
|
detail:'柔软细腻慕斯 适合离乳期幼犬舔食',
|
||||||
|
price:'¥77',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "狗湿粮",
|
title: "贵宾成犬专属",
|
||||||
video:"/images/dog/two.mp4",
|
video:"/images/dog/two.mp4",
|
||||||
catimage: "/images/dog/two.jpg",
|
catimage: "/images/dog/two.jpg",
|
||||||
detail:'为10月龄及以上英国成犬量身打造的精准营养',
|
productimage: "/images/cat/star-2.png",
|
||||||
price:'¥123.45',
|
detail:'护肤靓毛 理想体态',
|
||||||
|
price:'¥241',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "狗干粮",
|
title: "小型犬成犬专属",
|
||||||
video:"/images/dog/three.mp4",
|
video:"/images/dog/three.mp4",
|
||||||
catimage: "/images/dog/three.jpg",
|
catimage: "/images/dog/three.jpg",
|
||||||
detail:'为10月龄及以上英国犬成犬量身打造的精准营养',
|
productimage: "/images/cat/star-3.png",
|
||||||
price:'¥123.45',
|
detail:'亮泽被毛 呵护牙齿',
|
||||||
|
price:'¥121',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "狗干粮",
|
title: "离乳期全价奶糕",
|
||||||
video:"/images/dog/four.mp4",
|
video:"/images/dog/four.mp4",
|
||||||
catimage: "/images/dog/four.jpg",
|
catimage: "/images/dog/four.jpg",
|
||||||
detail:'为10月龄及以上英国成犬量身打造的精准营养',
|
productimage: "/images/cat/star-4.png",
|
||||||
price:'¥123.45',
|
detail:'高易再水合颗粒 帮助增强保护健康成长',
|
||||||
|
price:'¥88',
|
||||||
},
|
},
|
||||||
|
|
||||||
],
|
],
|
||||||
@ -1139,8 +1150,14 @@
|
|||||||
}
|
}
|
||||||
window.addEventListener("scroll", this.handleScroll, true);
|
window.addEventListener("scroll", this.handleScroll, true);
|
||||||
this.userchufang();//查询处方粮商品信息
|
this.userchufang();//查询处方粮商品信息
|
||||||
|
|
||||||
this.catmessage();//查询猫的信息
|
this.catmessage();//查询猫的信息
|
||||||
|
this.catclickGan();
|
||||||
|
this.catclickShi();
|
||||||
|
|
||||||
this.dogmessage();//查询狗的信息
|
this.dogmessage();//查询狗的信息
|
||||||
|
this.userdogShi();
|
||||||
|
this.userdogGan();
|
||||||
},
|
},
|
||||||
destroyed () {
|
destroyed () {
|
||||||
window.removeEventListener('scroll', this.scrollToTop);
|
window.removeEventListener('scroll', this.scrollToTop);
|
||||||
@ -1192,8 +1209,6 @@
|
|||||||
|
|
||||||
ifadroind(item,index,order){
|
ifadroind(item,index,order){
|
||||||
//console.log(item,index,order);
|
//console.log(item,index,order);
|
||||||
|
|
||||||
|
|
||||||
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";
|
||||||
@ -1204,8 +1219,8 @@
|
|||||||
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";
|
||||||
|
|
||||||
if (!(bIsIpad || bIsIphoneOs || bIsMidp || bIsUc7 || bIsUc || bIsAndroid || bIsCE || bIsWM)) {
|
if (!(bIsIpad || bIsIphoneOs || bIsMidp || bIsUc7 || bIsUc || bIsAndroid || bIsCE || bIsWM)) {
|
||||||
//console.log("当前是电脑打开啊啊啊")
|
//console.log("当前是电脑打开啊啊啊")
|
||||||
if(item.title=='明星猫粮'){
|
if(item.title=='明星猫粮'){
|
||||||
this.catproduct=true;
|
this.catproduct=true;
|
||||||
this.twomao=false;
|
this.twomao=false;
|
||||||
@ -1268,7 +1283,7 @@
|
|||||||
this.dogshow=false;
|
this.dogshow=false;
|
||||||
this.catproduct=false;
|
this.catproduct=false;
|
||||||
}
|
}
|
||||||
if(item.title=='明星狗粮'){
|
if(item.title=='明星犬粮'){
|
||||||
this.onemao=false;
|
this.onemao=false;
|
||||||
this.twomao=false;
|
this.twomao=false;
|
||||||
this.threemao=false;
|
this.threemao=false;
|
||||||
@ -1290,19 +1305,43 @@
|
|||||||
let dogtop=document.querySelector('.oc-top');
|
let dogtop=document.querySelector('.oc-top');
|
||||||
//console.log(dogtop);
|
//console.log(dogtop);
|
||||||
//console.log(mingxin.offsetTop);
|
//console.log(mingxin.offsetTop);
|
||||||
|
|
||||||
|
let positionIdentifier=document.querySelectorAll('.ts-position-identifier');
|
||||||
|
let tmpTitle='';
|
||||||
|
let scrollToTop=0;
|
||||||
|
let _self=this;
|
||||||
|
let transition = 230;
|
||||||
|
positionIdentifier.forEach(function(ele,index){
|
||||||
|
tmpTitle = ele.getAttribute("data-rel");
|
||||||
|
if(item.title==tmpTitle)
|
||||||
|
{
|
||||||
|
if(_self.fixedHeader && item.title!='明星猫粮')
|
||||||
|
{
|
||||||
|
transition+=130;
|
||||||
|
}
|
||||||
|
scrollToTop = _self.heightToTop(positionIdentifier[index]) - transition;
|
||||||
|
//positionIdentifier[index].scrollIntoView(true);
|
||||||
|
window.scrollTo({
|
||||||
|
top:scrollToTop,
|
||||||
|
behavior:'smooth'
|
||||||
|
})
|
||||||
|
//document.body.scrollTop = oPos;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
/*
|
||||||
if(item.title=='犬湿粮'||item.title=='犬干粮'||item.title=='处方用粮'){
|
if(item.title=='犬湿粮'||item.title=='犬干粮'||item.title=='处方用粮'){
|
||||||
userindex=userindex-2
|
userindex=userindex-2
|
||||||
}else{
|
}else{
|
||||||
userindex=userindex-1
|
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].scrollIntoView(true);
|
catshiid[userindex].scrollIntoView(true);
|
||||||
}
|
}
|
||||||
if(item.title=='明星狗粮')
|
if(item.title=='明星犬粮')
|
||||||
dogtop.scrollIntoView(true);
|
dogtop.scrollIntoView(true);
|
||||||
// if(item.title=="猫湿粮"){
|
// if(item.title=="猫湿粮"){
|
||||||
// this.catproduct=false;
|
// this.catproduct=false;
|
||||||
// this.catfood=true;
|
// this.catfood=true;
|
||||||
@ -1312,6 +1351,7 @@
|
|||||||
|
|
||||||
// }
|
// }
|
||||||
//console.log("当前是手机打开")
|
//console.log("当前是手机打开")
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
heightToTop(ele){
|
heightToTop(ele){
|
||||||
@ -1358,70 +1398,70 @@
|
|||||||
this.userserachlist.push(petType)
|
this.userserachlist.push(petType)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.dogmessage(this.userserachlist)
|
//TODO how to combine "apiName" here?
|
||||||
},
|
this.dogmessage(this.userserachlist,"Gan");
|
||||||
|
},
|
||||||
|
userlook(order){
|
||||||
userlook(order){
|
if(order==0){
|
||||||
if(order==0){
|
this.catshi=this.catlist;
|
||||||
this.catshi=this.catlist;
|
}
|
||||||
}
|
if(order==1){
|
||||||
if(order==1){
|
this.catgan=this.catlist;
|
||||||
this.catgan=this.catlist;
|
}else if(order==2){
|
||||||
|
this.dogshi=this.doglist
|
||||||
}else if(order==2){
|
}
|
||||||
this.dogshi=this.doglist
|
else if(order==3){
|
||||||
}
|
this.doggan=this.doglist
|
||||||
else if(order==3){
|
}
|
||||||
this.doggan=this.doglist
|
else if(order==4){
|
||||||
}
|
this.processinformation=this.chufanlist
|
||||||
else if(order==4){
|
}
|
||||||
this.processinformation=this.chufanlist
|
},
|
||||||
}
|
showmesg(){
|
||||||
|
this.toTop();
|
||||||
},
|
},
|
||||||
|
handleScroll(e)
|
||||||
|
|
||||||
showmesg(){
|
|
||||||
this.toTop();
|
|
||||||
},
|
|
||||||
handleScroll(e)
|
|
||||||
{
|
|
||||||
let fixedCatbarSeperator = document.getElementById("fixed-catbar-seperator");
|
|
||||||
if(!fixedCatbarSeperator)
|
|
||||||
{
|
{
|
||||||
return;
|
let fixedCatbarSeperator = document.getElementById("fixed-catbar-seperator");
|
||||||
}
|
if(!fixedCatbarSeperator)
|
||||||
let scrolltop = document.documentElement.scrollTop || document.body.scrollTop;
|
{
|
||||||
if((scrolltop-fixedCatbarSeperator.offsetTop)>0)
|
return;
|
||||||
{
|
}
|
||||||
this.gotop = true
|
let scrolltop = document.documentElement.scrollTop || document.body.scrollTop;
|
||||||
this.searchBar=false
|
if((scrolltop-fixedCatbarSeperator.offsetTop)>0)
|
||||||
}
|
{
|
||||||
else
|
this.fixedHeader=false;
|
||||||
{
|
this.gotop = true
|
||||||
this.gotop = false;
|
this.searchBar=false
|
||||||
this.searchBar=true
|
}
|
||||||
}
|
else
|
||||||
},
|
{
|
||||||
toTop() {
|
this.fixedHeader=true;
|
||||||
let top = document.documentElement.scrollTop || document.body.scrollTop;
|
this.gotop = false;
|
||||||
// 实现滚动效果
|
this.searchBar=true
|
||||||
const timeTop = setInterval(() => {
|
}
|
||||||
document.body.scrollTop = document.documentElement.scrollTop = top -= 400;
|
},
|
||||||
if (top <= 0) {
|
toTop() {
|
||||||
clearInterval(timeTop);
|
let top = document.documentElement.scrollTop || document.body.scrollTop;
|
||||||
}
|
// 实现滚动效果
|
||||||
}, 10);
|
const timeTop = setInterval(() => {
|
||||||
},
|
document.body.scrollTop = document.documentElement.scrollTop = top -= 400;
|
||||||
async courseId(item) {
|
if (top <= 0) {
|
||||||
let data = await postCourseId(this.productCode,1,this.usermessage.data.id,this.usermessage.data.mobile,item.picFile,item.name,item.basePrice,item.specifications);
|
clearInterval(timeTop);
|
||||||
if(data){
|
}
|
||||||
this.productlist=data;
|
}, 10);
|
||||||
}
|
},
|
||||||
},
|
async courseId(item) {
|
||||||
//请求猫
|
this.dataLoaded=false;
|
||||||
async catmessage(stype) {
|
let data = await postCourseId(this.productCode,1,this.usermessage.data.id,this.usermessage.data.mobile,item.picFile,item.name,item.basePrice,item.specifications);
|
||||||
|
if(data){
|
||||||
|
this.productlist=data;
|
||||||
|
this.dataLoaded=true;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
//请求猫
|
||||||
|
async catmessage(stype,dataType) {
|
||||||
|
this.dataLoaded=false;
|
||||||
let data=[];
|
let data=[];
|
||||||
if(stype==undefined||stype==null){
|
if(stype==undefined||stype==null){
|
||||||
data = await biaomessage(0,'',1,6);
|
data = await biaomessage(0,'',1,6);
|
||||||
@ -1429,11 +1469,22 @@
|
|||||||
data = await biaomessage(this.userserachlist,'',1,6);
|
data = await biaomessage(this.userserachlist,'',1,6);
|
||||||
}
|
}
|
||||||
if(data){
|
if(data){
|
||||||
this.catlist=data;
|
|
||||||
let userlist=[];
|
let userlist=[];
|
||||||
userlist=data.slice(0,6);
|
//userlist=data.slice(0,6);
|
||||||
this.catshi=userlist;
|
if(dataType)
|
||||||
this.catgan=userlist;
|
{
|
||||||
|
if(dataType=='Shi')
|
||||||
|
this.catshi=data;
|
||||||
|
else if(dataType=='Gan')
|
||||||
|
this.catgan=data;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
this.catlist=data;
|
||||||
|
//this.catgan=userlist;
|
||||||
|
//this.catshi=userlist;
|
||||||
|
}
|
||||||
|
this.dataLoaded=true;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -1466,7 +1517,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
selectproduce(item,index){
|
selectproduce(item,index){
|
||||||
if(item.productList[0]==undefined){
|
if(item.productList[0]==undefined){
|
||||||
item.productlist[0].productCode=0;
|
item.productlist[0].productCode=0;
|
||||||
}
|
}
|
||||||
@ -1480,29 +1531,29 @@
|
|||||||
productCode:item.productList[0].productCode
|
productCode:item.productList[0].productCode
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
//请求处方量信息数据
|
//请求处方量信息数据
|
||||||
async userchufang() {
|
async userchufang() {
|
||||||
let list=[];
|
this.dataLoaded=false;
|
||||||
let data = await userque();
|
let list=[];
|
||||||
if(data){
|
let data = await userque();
|
||||||
list=data.slice(0,6);
|
if(data){
|
||||||
this.processinformation=list;
|
list=data.slice(0,6);
|
||||||
this.chufanlist=data;
|
this.processinformation=list;
|
||||||
|
this.chufanlist=data;
|
||||||
}
|
this.dataLoaded=true;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
//点击请求处方量标签信息数据
|
||||||
//点击请求处方量标签信息数据
|
async userquery(item) {
|
||||||
async userquery(item) {
|
this.dataLoaded=false;
|
||||||
let data = await userquery(item);
|
let data = await userquery(item);
|
||||||
if(data){
|
if(data){
|
||||||
this.processinformation=data;
|
this.processinformation=data;
|
||||||
}
|
this.dataLoaded=true;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
//处方用粮筛选
|
//处方用粮筛选
|
||||||
userclick(item,index){
|
userclick(item,index){
|
||||||
this.userquery(index)
|
this.userquery(index)
|
||||||
@ -1537,68 +1588,61 @@
|
|||||||
this.userserachlist.push(petType)
|
this.userserachlist.push(petType)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.catmessage(this.userserachlist)
|
this.catmessage(this.userserachlist,'Shi')
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
lianxi(item,index){
|
lianxi(item,index){
|
||||||
if(item.title=='在线客服'){
|
if(item.title=='在线客服'){
|
||||||
var option = {
|
var option = {
|
||||||
customer: {id: '', name: '', email: '', mobile: '', memberId: '999999'}
|
customer: {id: '', name: '', email: '', mobile: '', memberId: '999999'}
|
||||||
}
|
}
|
||||||
dis_livchat(option);
|
dis_livchat(option);
|
||||||
}
|
}
|
||||||
if(item.title=='购物车'){
|
if(item.title=='购物车'){
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
path: "/myorder/userrecord",
|
path: "/myorder/userrecord",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
if(item.title=='营养专家'){
|
||||||
|
var option = {
|
||||||
|
customer: {id: '', name: '', email: '', mobile: '', memberId: '999999'}
|
||||||
|
}
|
||||||
|
dis_livchat(option);
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
userbuy(item){
|
||||||
|
let user= localStorage.getItem("userInfo");
|
||||||
|
this.courseId(item)
|
||||||
|
this.$router.push({
|
||||||
|
path: "/myorder/userrecord",
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
});
|
selectGoods(item,index){
|
||||||
}
|
//console.log(item,index);
|
||||||
if(item.title=='营养专家'){
|
this.activeIndex=index;
|
||||||
var option = {
|
//console.log(item.title);
|
||||||
customer: {id: '', name: '', email: '', mobile: '', memberId: '999999'}
|
this.ifadroind(item,index,this.useraindex)
|
||||||
}
|
// this.ifAdoid(item,index);
|
||||||
dis_livchat(option);
|
},
|
||||||
}
|
quanshi(item,index){
|
||||||
|
this.activeIndex5=index;
|
||||||
},
|
this.userdogShi();
|
||||||
userbuy(item){
|
},
|
||||||
let user= localStorage.getItem("userInfo");
|
userdoghot(item,index){
|
||||||
this.courseId(item)
|
this.activeIndex6=index;
|
||||||
this.$router.push({
|
this.userdogGan();
|
||||||
path: "/myorder/userrecord",
|
},
|
||||||
|
selectGo(item,index){
|
||||||
});
|
this.activeInde2=index;
|
||||||
},
|
},
|
||||||
|
selectGoo(item,index){
|
||||||
selectGoods(item,index){
|
this.activeInde3=index;
|
||||||
console.log(item,index);
|
}
|
||||||
this.activeIndex=index;
|
},
|
||||||
console.log(item.title);
|
|
||||||
|
|
||||||
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){
|
|
||||||
this.activeInde2=index;
|
|
||||||
},
|
|
||||||
selectGoo(item,index){
|
|
||||||
|
|
||||||
this.activeInde3=index;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user