mirror of
https://gitee.com/lab1024/smart-admin.git
synced 2025-10-02 18:26:38 +08:00
Merged with Carl
This commit is contained in:
parent
29f7a9e9a8
commit
cfbb7d1523
@ -13,13 +13,12 @@
|
|||||||
</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 class="rc-max-width--xl">
|
||||||
<div class="rc-max-width--xl">
|
|
||||||
<div class="usermain">
|
<div class="usermain">
|
||||||
<div :class="searchBar?'rc-ma':'rc-ma searchBara'">
|
<div :class="searchBar?'rc-ma':'rc-ma searchBara'">
|
||||||
<div v-if="!searchBar" class="online bold rc-md-down"></div>
|
<div v-if="!searchBar" class="online bold rc-md-down"></div>
|
||||||
<ul class="ul-zhuan rc-margin-y--xl">
|
<ul class="ul-zhuan rc-margin-y--md">
|
||||||
<li
|
<li
|
||||||
v-for="(item, index) in discountlist"
|
v-for="(item, index) in discountlist"
|
||||||
:key="index"
|
:key="index"
|
||||||
@ -32,11 +31,10 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="online bold rc-md-up" v-show="catproduct"></div>
|
||||||
|
|
||||||
</div>
|
<div class="rc-full-width">
|
||||||
<div class="online bold rc-md-up" v-show="catproduct"></div>
|
|
||||||
|
|
||||||
<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" ref="mingxing">
|
<div class="pageFullScreen" id="xxxFullScreen" v-show="catproduct" ref="mingxing">
|
||||||
@ -44,14 +42,15 @@
|
|||||||
<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>
|
||||||
<!-- 轮播图 -->
|
<!-- 轮播图 -->
|
||||||
<van-swipe>
|
<van-swipe class="rc-padding-bottom--md">
|
||||||
<van-swipe-item class="swiper-slide" v-for="(item, key) in catlistvideo" :key="key" >
|
<van-swipe-item v-for="(item, index) in catlistvideo" :key="index">
|
||||||
<div class="rc-video">
|
<div class="rc-video">
|
||||||
<div class="uservideo">
|
<div class="uservideo">
|
||||||
<video :poster=item.catimage controls="">
|
<video controls="" :poster=item.catimage>
|
||||||
<source :src=item.video>
|
<source :src=item.video type="video/mp4">
|
||||||
</video>
|
</video>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="rc-right">
|
<div class="rc-right">
|
||||||
<img :src=item.catimage alt="">
|
<img :src=item.catimage alt="">
|
||||||
<span>{{item.title}}</span>
|
<span>{{item.title}}</span>
|
||||||
@ -63,8 +62,8 @@
|
|||||||
<div class="sw-center" >
|
<div class="sw-center" >
|
||||||
<div class="rc-click" @click="selectproduce(item,index)">
|
<div class="rc-click" @click="selectproduce(item,index)">
|
||||||
<div class="uservideo">
|
<div class="uservideo">
|
||||||
<video width="300px" height="251" controls="controls">
|
<video controls="controls" :poster=item.catimage>
|
||||||
<source :src= item.video type="video/ogg" autoplay>
|
<source :src= item.video type="video/ogg">
|
||||||
</video>
|
</video>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -77,13 +76,12 @@
|
|||||||
<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>
|
</van-swipe-item>
|
||||||
</van-swipe>
|
</van-swipe>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -91,10 +89,10 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<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" >全价猫湿粮</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">
|
||||||
<ul class="ts-product-list rc-margin-bottom--lg">
|
<ul class="ts-product-list rc-margin-bottom--lg">
|
||||||
@ -125,7 +123,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
</van-tab>
|
</van-tab>
|
||||||
</van-tabs>
|
</van-tabs>
|
||||||
<div class="rc-selection">
|
<div class="rc-selection">
|
||||||
<ol>
|
<ol>
|
||||||
<li
|
<li
|
||||||
@ -182,7 +180,7 @@
|
|||||||
<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">全价猫干粮</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">
|
||||||
<ul class="ts-product-list rc-margin-bottom--lg">
|
<ul class="ts-product-list rc-margin-bottom--lg">
|
||||||
@ -211,7 +209,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
</van-tab>
|
</van-tab>
|
||||||
</van-tabs>
|
</van-tabs>
|
||||||
<div class="rc-selection">
|
<div class="rc-selection">
|
||||||
|
|
||||||
<ol>
|
<ol>
|
||||||
@ -275,17 +273,17 @@
|
|||||||
<div class="online bold" v-show="dogshow"></div>
|
<div class="online bold" v-show="dogshow"></div>
|
||||||
<div class="pageFullScreen" id="xxxFullScreen" v-show="dogshow" ref="mingxing">
|
<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="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">{{dogtitle}}</h2>
|
||||||
</div>
|
</div>
|
||||||
<!-- 轮播图 -->
|
<!-- 轮播图 -->
|
||||||
<van-swipe>
|
<van-swipe class="rc-padding-bottom--md">
|
||||||
<van-swipe-item class="swiper-slide" v-for="(item, key) in doglistvideo" :key="key" >
|
<van-swipe-item v-for="(item, key) in doglistvideo" :key="key">
|
||||||
<div class="rc-video">
|
<div class="rc-video">
|
||||||
<div class="uservideo">
|
<div class="uservideo">
|
||||||
<video :poster=item.catimage controls="">
|
<video controls="" :poster=item.catimage>
|
||||||
<source :src=item.video>
|
<source :src=item.video type="video/mp4">
|
||||||
</video>
|
</video>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -300,48 +298,18 @@
|
|||||||
<div class="sw-center" >
|
<div class="sw-center" >
|
||||||
<div class="rc-click" @click="selectproduce(item,index)">
|
<div class="rc-click" @click="selectproduce(item,index)">
|
||||||
<div class="uservideo">
|
<div class="uservideo">
|
||||||
<video width="300px" height="251" controls="controls">
|
<video controls="controls">
|
||||||
<source :src= item.video type="video/ogg" autoplay>
|
<source :src= item.video type="video/ogg">
|
||||||
</video>
|
</video>
|
||||||
</div>
|
</div>
|
||||||
<div class="rc-column">
|
|
||||||
<div class="rc-click" @click="selectproduce(item,index)">
|
<img :src=item.catimage alt="">
|
||||||
<span>{{item.title}}</span>
|
<span>{{item.title}}</span>
|
||||||
<i>0.001{{item.price}}</i>
|
<p>{{item.detail}}</p>
|
||||||
|
<em>{{item.price}}</em>
|
||||||
</div>
|
</div>
|
||||||
<strong class="ts-standard-btn ts-standard-btn--two rc-margin-y--md center" @click="selectproduce(item,index)">立即购买</strong>
|
<div class="rc-full-width rc-margin-y--md">
|
||||||
</div>
|
<i @click="userbuy(item,index)" class="ts-standard-btn ts-standard-btn--two center">立即购买</i>
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<nuxt-link :to="`/productdetails/productlist/`">
|
|
||||||
<div class="userserlect">
|
|
||||||
<span class="ts-standard-btn center">查看更多</span>
|
|
||||||
</div>
|
|
||||||
</nuxt-link>
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</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">
|
|
||||||
<h2 class="rc-beta rc-text--center">全价猫干粮</h2>
|
|
||||||
<van-tabs @change='catclick' class="van-tabs">
|
|
||||||
<van-tab v-for="(item,index) in discoun" :key="index" :title="item.title">
|
|
||||||
<div class="rc-contair">
|
|
||||||
<ul class="ts-product-list rc-margin-bottom--lg">
|
|
||||||
<li v-for="(item,index) in catgan" :key="index" class="rc-margin-top--md">
|
|
||||||
<div class="rc-click rc-margin-bottom--md" @click="selectproduce(item,index)">
|
|
||||||
<div class="rc-rccontair">
|
|
||||||
<img :src=item.picture alt="">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="rc-column">
|
|
||||||
<div class="rc-click" @click="selectproduce(item,index)">
|
|
||||||
<span>{{item.name}}</span>
|
|
||||||
<i>0.001{{item.price}}</i>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -350,28 +318,7 @@
|
|||||||
</div>
|
</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>
|
|
||||||
<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">
|
|
||||||
<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>
|
||||||
|
|
||||||
<div class="online bold" v-show="threemao"></div>
|
<div class="online bold" v-show="threemao"></div>
|
||||||
@ -802,7 +749,6 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
],
|
],
|
||||||
|
|
||||||
anchor:'',
|
anchor:'',
|
||||||
dogshi:[],
|
dogshi:[],
|
||||||
catlist:[],
|
catlist:[],
|
||||||
@ -822,7 +768,6 @@
|
|||||||
selection:[
|
selection:[
|
||||||
{
|
{
|
||||||
title: "幼猫",
|
title: "幼猫",
|
||||||
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "成猫",
|
title: "成猫",
|
||||||
@ -832,27 +777,24 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "品种猫",
|
title: "品种猫",
|
||||||
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "亚健康",
|
title: "亚健康",
|
||||||
|
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|
||||||
banners:{
|
banners:{
|
||||||
'mobile':[
|
'mobile':[
|
||||||
{src:"/images/one.jpg",link:""},
|
{src:"/images/banner/one.jpg",link:""},
|
||||||
{src:"/images/two.jpg",link:""},
|
{src:"/images/banner/two.jpg",link:""},
|
||||||
{src:"/images/three.jpg",link:""},
|
{src:"/images/banner/three.jpg",link:""},
|
||||||
{src:"/images/four.jpg",link:""}
|
{src:"/images/banner/four.jpg",link:""}
|
||||||
],
|
],
|
||||||
'pc':[
|
'pc':[
|
||||||
{src:"/images/pc-banner1.png",link:""},
|
{src:"/images/banner/pc-banner1.png",link:""},
|
||||||
{src:"/images/pc-banner2.png",link:""},
|
{src:"/images/banner/pc-banner2.png",link:""}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
showingBanners:{},
|
showingBanners:[],
|
||||||
userdoglist: [
|
userdoglist: [
|
||||||
{
|
{
|
||||||
title: "小型犬",
|
title: "小型犬",
|
||||||
@ -1143,21 +1085,15 @@
|
|||||||
// userswiper
|
// userswiper
|
||||||
},
|
},
|
||||||
created(){
|
created(){
|
||||||
vm=this;
|
vm=this;
|
||||||
},
|
},
|
||||||
watch:{
|
watch:{
|
||||||
},
|
|
||||||
|
},
|
||||||
mounted(){
|
mounted(){
|
||||||
const that = this
|
const that = this
|
||||||
this.ifAdoid()
|
this.ifAdoid();
|
||||||
// window.onresize = () => {
|
|
||||||
// setTimeout(() => {
|
|
||||||
// this.ifAdoid()
|
|
||||||
// }, 500);
|
|
||||||
|
|
||||||
// }
|
|
||||||
this.usermessage= JSON.parse(localStorage.getItem("userInfo"));
|
this.usermessage= JSON.parse(localStorage.getItem("userInfo"));
|
||||||
|
|
||||||
if(this.usermessage==null ||this.usermessage==undefined){
|
if(this.usermessage==null ||this.usermessage==undefined){
|
||||||
this.userunlogin=true
|
this.userunlogin=true
|
||||||
}
|
}
|
||||||
@ -1165,19 +1101,13 @@ vm=this;
|
|||||||
this.userchufang();//查询处方粮商品信息
|
this.userchufang();//查询处方粮商品信息
|
||||||
this.catmessage();//查询猫的信息
|
this.catmessage();//查询猫的信息
|
||||||
this.dogmessage();//查询狗的信息
|
this.dogmessage();//查询狗的信息
|
||||||
// this.usershi();//查询对应的标签
|
|
||||||
// this.userhot();
|
|
||||||
|
|
||||||
},
|
},
|
||||||
destroyed () {
|
destroyed () {
|
||||||
window.removeEventListener('scroll', this.scrollToTop);
|
window.removeEventListener('scroll', this.scrollToTop);
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ifAdoid(item,index){
|
ifAdoid(item,index){
|
||||||
console.log(index);
|
//console.log(index);
|
||||||
this.userindex=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";
|
||||||
@ -1188,15 +1118,11 @@ 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";
|
||||||
|
|
||||||
if (!(bIsIpad || bIsIphoneOs || bIsMidp || bIsUc7 || bIsUc || bIsAndroid || bIsCE || bIsWM)) {
|
if (!(bIsIpad || bIsIphoneOs || bIsMidp || bIsUc7 || bIsUc || bIsAndroid || bIsCE || bIsWM)) {
|
||||||
console.log("当前是电脑打开")
|
console.log("当前是电脑打开")
|
||||||
this.stypechange=false;
|
this.stypechange=false;
|
||||||
console.log(this.usertitle)
|
//console.log(this.usertitle)
|
||||||
|
|
||||||
// let catshiid=document.querySelectorAll('.selectionswitch');
|
|
||||||
// catshiid[this.userindex].style.display='none';
|
|
||||||
// catshiid[this.userindex].style.display='none';
|
|
||||||
this.catproduct=true;
|
this.catproduct=true;
|
||||||
this.onemao=false;
|
this.onemao=false;
|
||||||
this.twomao=false;
|
this.twomao=false;
|
||||||
@ -1204,11 +1130,13 @@ vm=this;
|
|||||||
this.fourmao=false;
|
this.fourmao=false;
|
||||||
this.fivemao=false;
|
this.fivemao=false;
|
||||||
this.sixmao=false;
|
this.sixmao=false;
|
||||||
this.dogshow=false;
|
this.dogshow=false
|
||||||
this.showingBanners=this.banners.pc;
|
this.showingBanners=this.banners.pc;
|
||||||
// console.log(catshiid);
|
}
|
||||||
}else{
|
else
|
||||||
|
{
|
||||||
console.log("当前是手机打开")
|
console.log("当前是手机打开")
|
||||||
|
this.showingBanners=this.banners.mobile;
|
||||||
this.stypechange=true;
|
this.stypechange=true;
|
||||||
this.onemao=true;
|
this.onemao=true;
|
||||||
this.twomao=true;
|
this.twomao=true;
|
||||||
@ -1218,7 +1146,6 @@ vm=this;
|
|||||||
this.dogshow=true;
|
this.dogshow=true;
|
||||||
this.catproduct=true
|
this.catproduct=true
|
||||||
this.sixmao=true;
|
this.sixmao=true;
|
||||||
this.showingBanners=this.banners.mobile;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -1226,6 +1153,7 @@ vm=this;
|
|||||||
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";
|
||||||
@ -1237,7 +1165,7 @@ vm=this;
|
|||||||
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;
|
||||||
@ -1246,12 +1174,14 @@ vm=this;
|
|||||||
this.fivemao=false;
|
this.fivemao=false;
|
||||||
this.dogshow=false;
|
this.dogshow=false;
|
||||||
this.sixmao=false;
|
this.sixmao=false;
|
||||||
|
|
||||||
this.onemao=false;
|
this.onemao=false;
|
||||||
|
|
||||||
}
|
}
|
||||||
if(item.title=='猫湿粮'){
|
if(item.title=='猫湿粮'){
|
||||||
this.onemao=true;
|
this.onemao=true;
|
||||||
this.dogshow=false;
|
this.dogshow=false;
|
||||||
console.log(this.onemao);
|
//console.log(this.onemao);
|
||||||
this.twomao=false;
|
this.twomao=false;
|
||||||
this.threemao=false;
|
this.threemao=false;
|
||||||
this.fourmao=false;
|
this.fourmao=false;
|
||||||
@ -1315,24 +1245,24 @@ vm=this;
|
|||||||
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');
|
let dogtop=document.querySelector('.oc-top');
|
||||||
console.log(dogtop);
|
//console.log(dogtop);
|
||||||
console.log(mingxin.offsetTop);
|
//console.log(mingxin.offsetTop);
|
||||||
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;
|
||||||
@ -1341,9 +1271,8 @@ dogtop.scrollIntoView(true);
|
|||||||
// this.catfood=false;
|
// this.catfood=false;
|
||||||
|
|
||||||
// }
|
// }
|
||||||
console.log("当前是手机打开")
|
//console.log("当前是手机打开")
|
||||||
|
}
|
||||||
}
|
|
||||||
},
|
},
|
||||||
userdog(item,index){
|
userdog(item,index){
|
||||||
this.userstype=1;
|
this.userstype=1;
|
||||||
@ -1358,6 +1287,8 @@ dogtop.scrollIntoView(true);
|
|||||||
}
|
}
|
||||||
this.dogmessage(this.userserachlist)
|
this.dogmessage(this.userserachlist)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
userlook(order){
|
userlook(order){
|
||||||
if(order==0){
|
if(order==0){
|
||||||
this.catshi=this.catlist;
|
this.catshi=this.catlist;
|
||||||
@ -1399,10 +1330,6 @@ dogtop.scrollIntoView(true);
|
|||||||
this.gotop = false;
|
this.gotop = false;
|
||||||
this.searchBar=true
|
this.searchBar=true
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
toTop() {
|
toTop() {
|
||||||
let top = document.documentElement.scrollTop || document.body.scrollTop;
|
let top = document.documentElement.scrollTop || document.body.scrollTop;
|
||||||
|
Loading…
Reference in New Issue
Block a user