mirror of
https://gitee.com/lab1024/smart-admin.git
synced 2025-10-02 10:16:38 +08:00
回退 'Pull Request !16 : 2022-1-17 Leung'
This commit is contained in:
parent
8952050e8a
commit
20a45cc245
@ -282,6 +282,11 @@ img, picture {
|
||||
.rc-top{
|
||||
margin-top: 74px;
|
||||
}
|
||||
.rc-list__header {
|
||||
background: none;
|
||||
padding: .5rem 0;
|
||||
border-bottom: none;
|
||||
}
|
||||
.ts-right-arr {
|
||||
border-bottom:1px solid #E1001A;
|
||||
padding-bottom:2px;
|
||||
|
@ -313,6 +313,8 @@ object-fit: cover;
|
||||
color: #fff;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
font-size: 1.25rem;
|
||||
line-height: 9.375rem;
|
||||
text-align: center;
|
||||
|
||||
|
||||
|
@ -39,69 +39,159 @@
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="online bold rc-md-up" v-show="catproduct"></div>
|
||||
|
||||
<div class="rc-full-width">
|
||||
<div class="rc-lunbo rc-full-width">
|
||||
<!-- <h2>明星猫粮</h2> -->
|
||||
<div class="pageFullScreen" id="xxxFullScreen" v-show="catproduct" ref="mingxing">
|
||||
<!-- 内容 -->
|
||||
<div class="swiper-container rc-full-width rc-padding-y--md" id="swiper1">
|
||||
<h2 class="rc-beta rc-text--center">{{usertitle}}</h2>
|
||||
<!-- 轮播图 -->
|
||||
<van-swipe class="rc-padding-bottom--md">
|
||||
<van-swipe-item v-for="(item, index) in catlistvideo" :key="index">
|
||||
<div class="rc-video">
|
||||
<div class="uservideo">
|
||||
|
||||
</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>
|
||||
<div class="online bold rc-md-up" v-show="catproduct"></div>
|
||||
|
||||
<div class="rc-full-width">
|
||||
<div class="rc-lunbo rc-full-width">
|
||||
<!-- <h2>明星猫粮</h2> -->
|
||||
<div class="pageFullScreen" id="xxxFullScreen" v-show="catproduct" ref="mingxing">
|
||||
<!-- 内容 -->
|
||||
<div class="swiper-container rc-full-width rc-padding-y--md" id="swiper1">
|
||||
<h2 class="rc-beta rc-text--center">{{usertitle}}</h2>
|
||||
<!-- 轮播图 -->
|
||||
<swiper :options="swiperOption">
|
||||
<swiper-slide class="swiper-slide" v-for="(item, key) in catlistvideo" :key="key" >
|
||||
<div class="rc-video">
|
||||
<div class="uservideo">
|
||||
|
||||
</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>
|
||||
|
||||
<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>
|
||||
</van-swipe-item>
|
||||
</van-swipe>
|
||||
</div>
|
||||
|
||||
|
||||
</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">
|
||||
<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 catshi" :key="index" class="rc-margin-top--md">
|
||||
<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="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-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 catshi" :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>
|
||||
<strong class="ts-standard-btn ts-standard-btn--two rc-margin-y--md center" @click="selectproduce(item,index)">立即购买</strong>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<nuxt-link :to="`/productdetails/productlist/`">
|
||||
<div class="userserlect">
|
||||
<span class="ts-standard-btn center">查看更多</span>
|
||||
</div>
|
||||
</nuxt-link>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</van-tab>
|
||||
</van-tabs>
|
||||
<div class="rc-selection">
|
||||
<ol>
|
||||
<li
|
||||
v-for="(item, index) in selection"
|
||||
:key="index"
|
||||
@click="selectGo(item, index)"
|
||||
:class="activeInde2 == index ? 'userselection' : 'unselection'"
|
||||
>
|
||||
<span>{{ item.title }}</span>
|
||||
</li>
|
||||
</ol>
|
||||
<div class="rc-maa">
|
||||
<ul>
|
||||
<li
|
||||
v-for="(item, index) in doglist"
|
||||
:key="index"
|
||||
@click="selectGoo(item, index)"
|
||||
:class="activeInde3 == index ? 'active' : 'unactive'"
|
||||
>
|
||||
<img :src="item.catimage" alt="">
|
||||
<span>{{ item.title }}</span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="">
|
||||
<ul class="ts-product-list rc-margin-bottom--lg">
|
||||
<li v-for="(item,index) in rccontair" :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.catimage alt="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="rc-column">
|
||||
<div class="rc-click" @click="selectproduce(item,index)">
|
||||
<span>{{item.title}}</span>
|
||||
<i>0.001{{item.price}}</i>
|
||||
</div>
|
||||
<strong class="ts-standard-btn ts-standard-btn--two rc-margin-y--md center" @click="selectproduce(item,index)">立即购买</strong>
|
||||
</div>
|
||||
</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="">
|
||||
@ -625,10 +715,11 @@
|
||||
import { userquery,postCourseId,biaomessage,userque,searchchanpin } from "../ajax/getData";
|
||||
const settings = require("@/config");
|
||||
export default {
|
||||
middleware: 'metaTitle',
|
||||
meta: {title: '首页'},
|
||||
data(){
|
||||
return{
|
||||
middleware: 'metaTitle',
|
||||
// middleware: 'metaTitle',
|
||||
meta: {title: '首页'},
|
||||
data(){
|
||||
return{
|
||||
useraindex:0,
|
||||
usertitle:'明星猫粮',
|
||||
dogtitle:'明星狗粮',
|
||||
@ -797,7 +888,7 @@ activeInde3:0,
|
||||
},
|
||||
],
|
||||
|
||||
discounchufang: [
|
||||
discounchufang: [
|
||||
{
|
||||
title: "消化道",
|
||||
catimage: require("../assets/cat.png"),
|
||||
@ -990,216 +1081,228 @@ activeInde3:0,
|
||||
}
|
||||
},
|
||||
}
|
||||
},
|
||||
components:{
|
||||
Myheader,
|
||||
Myfooter,
|
||||
unlogin,
|
||||
// userswiper
|
||||
},
|
||||
created(){
|
||||
vm=this;
|
||||
},
|
||||
watch:{
|
||||
},
|
||||
components:{
|
||||
Myheader,
|
||||
Myfooter,
|
||||
unlogin,
|
||||
// userswiper
|
||||
},
|
||||
created(){
|
||||
vm=this;
|
||||
},
|
||||
watch:{
|
||||
},
|
||||
mounted(){
|
||||
const that = this
|
||||
this.ifAdoid()
|
||||
// window.onresize = () => {
|
||||
// setTimeout(() => {
|
||||
// this.ifAdoid()
|
||||
// }, 500);
|
||||
|
||||
// }
|
||||
this.usermessage= JSON.parse(localStorage.getItem("userInfo"));
|
||||
|
||||
if(this.usermessage==null ||this.usermessage==undefined){
|
||||
this.userunlogin=true
|
||||
}
|
||||
window.addEventListener("scroll", this.handleScroll, true);
|
||||
this.userchufang();//查询处方粮商品信息
|
||||
this.catmessage();//查询猫的信息
|
||||
this.dogmessage();//查询狗的信息
|
||||
// this.usershi();//查询对应的标签
|
||||
// this.userhot();
|
||||
|
||||
},
|
||||
mounted(){
|
||||
const that = this
|
||||
this.ifAdoid();
|
||||
this.usermessage= JSON.parse(localStorage.getItem("userInfo"));
|
||||
if(this.usermessage==null ||this.usermessage==undefined){
|
||||
this.userunlogin=true
|
||||
}
|
||||
window.addEventListener("scroll", this.handleScroll, true);
|
||||
this.userchufang();//查询处方粮商品信息
|
||||
this.catmessage();//查询猫的信息
|
||||
this.dogmessage();//查询狗的信息
|
||||
},
|
||||
destroyed () {
|
||||
window.removeEventListener('scroll', this.scrollToTop);
|
||||
},
|
||||
methods:{
|
||||
ifAdoid(item,index){
|
||||
//console.log(index);
|
||||
this.userindex=index;
|
||||
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("当前是电脑打开")
|
||||
this.stypechange=false;
|
||||
//console.log(this.usertitle)
|
||||
|
||||
this.catproduct=true;
|
||||
this.onemao=false;
|
||||
this.twomao=false;
|
||||
this.threemao=false;
|
||||
this.fourmao=false;
|
||||
this.fivemao=false;
|
||||
this.sixmao=false;
|
||||
this.dogshow=false
|
||||
this.showingBanners=this.banners.pc;
|
||||
}
|
||||
else
|
||||
{
|
||||
console.log("当前是手机打开")
|
||||
this.showingBanners=this.banners.mobile;
|
||||
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);
|
||||
},
|
||||
destroyed () {
|
||||
window.removeEventListener('scroll', this.scrollToTop);
|
||||
},
|
||||
methods:{
|
||||
|
||||
|
||||
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;
|
||||
ifAdoid(item,index){
|
||||
console.log(index);
|
||||
this.userindex=index;
|
||||
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("当前是电脑打开")
|
||||
this.stypechange=false;
|
||||
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.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;
|
||||
|
||||
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;
|
||||
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;
|
||||
}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;
|
||||
}
|
||||
|
||||
}else{
|
||||
this.catfood=true;
|
||||
// this.catproduct=false;
|
||||
let userindex=index
|
||||
//console.log(item,index);
|
||||
let mingxin=document.querySelector('.pageFullScreen');
|
||||
let dogtop=document.querySelector('.oc-top');
|
||||
//console.log(dogtop);
|
||||
//console.log(mingxin.offsetTop);
|
||||
if(item.title=='犬湿粮'||item.title=='犬干粮'||item.title=='处方用粮'){
|
||||
userindex=userindex-2
|
||||
}else{
|
||||
userindex=userindex-1
|
||||
}
|
||||
if(item.title=='明星猫粮'){
|
||||
mingxin.scrollIntoView(true);
|
||||
}else{
|
||||
let catshiid=document.querySelectorAll('.selectionswitch');
|
||||
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.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;
|
||||
|
||||
// }
|
||||
//console.log("当前是手机打开")
|
||||
}
|
||||
},
|
||||
userdog(item,index){
|
||||
this.userstype=1;
|
||||
let petType={
|
||||
petType:1,
|
||||
name:index,
|
||||
}
|
||||
for(let i =0;i<this.userserachlist.length;i++){
|
||||
if(!this.userserachlist.includes(petType)){
|
||||
this.userserachlist.push(petType)
|
||||
}W
|
||||
}
|
||||
this.dogmessage(this.userserachlist)
|
||||
},
|
||||
}else{
|
||||
this.catfood=true;
|
||||
// this.catproduct=false;
|
||||
let userindex=index
|
||||
console.log(item,index);
|
||||
let mingxin=document.querySelector('.pageFullScreen');
|
||||
let dogtop=document.querySelector('.oc-top');
|
||||
console.log(dogtop);
|
||||
console.log(mingxin.offsetTop);
|
||||
if(item.title=='犬湿粮'||item.title=='犬干粮'||item.title=='处方用粮'){
|
||||
userindex=userindex-2
|
||||
}else{
|
||||
userindex=userindex-1
|
||||
}
|
||||
if(item.title=='明星猫粮'){
|
||||
mingxin.scrollIntoView(true);
|
||||
}else{
|
||||
let catshiid=document.querySelectorAll('.selectionswitch');
|
||||
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;
|
||||
|
||||
// }
|
||||
console.log("当前是手机打开")
|
||||
|
||||
}
|
||||
},
|
||||
userdog(item,index){
|
||||
this.userstype=1;
|
||||
let petType={
|
||||
petType:1,
|
||||
name:index,
|
||||
}
|
||||
for(let i =0;i<this.userserachlist.length;i++){
|
||||
if(!this.userserachlist.includes(petType)){
|
||||
this.userserachlist.push(petType)
|
||||
}
|
||||
}
|
||||
this.dogmessage(this.userserachlist)
|
||||
},
|
||||
|
||||
|
||||
userlook(order){
|
||||
@ -1242,6 +1345,10 @@ activeInde3:0,
|
||||
this.gotop = false;
|
||||
this.searchBar=true
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
},
|
||||
toTop() {
|
||||
let top = document.documentElement.scrollTop || document.body.scrollTop;
|
||||
@ -1355,59 +1462,65 @@ activeInde3:0,
|
||||
|
||||
|
||||
|
||||
lianxi(item,index){
|
||||
if(item.title=='在线客服'){
|
||||
var option = {
|
||||
customer: {id: '', name: '', email: '', mobile: '', memberId: '999999'}
|
||||
}
|
||||
dis_livchat(option);
|
||||
}
|
||||
if(item.title=='购物车'){
|
||||
this.$router.push({
|
||||
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",
|
||||
});
|
||||
},
|
||||
lianxi(item,index){
|
||||
if(item.title=='在线客服'){
|
||||
var option = {
|
||||
customer: {id: '', name: '', email: '', mobile: '', memberId: '999999'}
|
||||
}
|
||||
dis_livchat(option);
|
||||
}
|
||||
if(item.title=='购物车'){
|
||||
this.$router.push({
|
||||
path: "/myorder/userrecord",
|
||||
|
||||
selectGoods(item,index){
|
||||
//console.log(item,index);
|
||||
this.activeIndex=index;
|
||||
//console.log(item.title);
|
||||
this.ifadroind(item,index,this.useraindex)
|
||||
// this.ifAdoid(item,index);
|
||||
});
|
||||
}
|
||||
if(item.title=='营养专家'){
|
||||
var option = {
|
||||
customer: {id: '', name: '', email: '', mobile: '', memberId: '999999'}
|
||||
}
|
||||
dis_livchat(option);
|
||||
}
|
||||
|
||||
},
|
||||
quanshi(item,index){
|
||||
//console.log(item,index);
|
||||
this.activeIndex5=index
|
||||
//console.log(this.activeIndex5);
|
||||
},
|
||||
userdoghot(item,index){
|
||||
this.activeIndex6=index
|
||||
},
|
||||
userbuy(item){
|
||||
let user= localStorage.getItem("userInfo");
|
||||
this.courseId(item)
|
||||
this.$router.push({
|
||||
path: "/myorder/userrecord",
|
||||
|
||||
});
|
||||
},
|
||||
|
||||
selectGoods(item,index){
|
||||
console.log(item,index);
|
||||
this.activeIndex=index;
|
||||
console.log(item.title);
|
||||
this.ifadroind(item,index,this.useraindex)
|
||||
// this.ifAdoid(item,index);
|
||||
|
||||
},
|
||||
selectGo(item,index){
|
||||
this.activeInde2=index;
|
||||
},
|
||||
selectGoo(item,index){
|
||||
this.activeInde3=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;
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
}
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
@media screen and(min-width: 320px) and(max-width:768px){
|
||||
|
Loading…
Reference in New Issue
Block a user