+
处方用粮
@@ -640,9 +724,19 @@
return{
useraindex:0,
usertitle:'明星猫粮',
+ dogtitle:'明星狗粮',
processinformation:[],
catshi:[],
+ userindex:0,
userstype:'',
+ onemao:false,
+ twomao:false,
+ threemao:false,
+ dogshow:false,
+ fourmao:false,
+ fivemao:false,
+ sixmao:false,
+ stypechange:true,
userunlogin:false,
searchBar:true,
usermessage:[],
@@ -670,24 +764,13 @@
gotop: false,
usersetting: `${settings.rbs}`,
activeIndex: 0,
+ activeIndex5:0,
+ activeIndex6:0,
activeInde2: 0,
activeInde3:0,
catproduct:true,
catfood:false,
- dogselection:[
- {
- title: "小型犬",
-
- },
- {
- title: "中型犬",
- },
- {
- title: "大型犬",
- },
-
- ],
selection:[
{
@@ -717,7 +800,7 @@ activeInde3:0,
{src:require("../assets/image/four.jpg"),link:""},
],
- doglist: [
+ userdoglist: [
{
title: "小型犬",
catimage: require("../assets/cat.png"),
@@ -759,44 +842,51 @@ activeInde3:0,
{
title: "明星猫粮",
detail:'为10月龄及以上英国短毛猫成猫量身打造的精准营养',
- catimage: require("../assets/cat.png"),
+ catimage: require("../assets/star-cat.png"),
price:'¥2'
},
{
title: "猫湿粮",
detail:'为10月龄及以上英国短毛猫成猫量身打造的精准营养',
-
price:'¥12',
- catimage: require("../assets/four.png"),
+ catimage: require("../assets/two.png"),
},
{
title: "猫干粮",
detail:'为10月龄及以上英国短毛猫成猫量身打造的精准营养',
price:'¥102',
- catimage: require("../assets/one.png"),
+ catimage: require("../assets/cat.png"),
},
- {
- title: "犬湿粮",
+ {
+ title: "明星狗粮",
detail:'为10月龄及以上英国短毛猫成猫量身打造的精准营养',
-
price:'¥112',
- catimage: require("../assets/two.png"),
+ catimage: require("../assets/six.png"),
},
- {
- title: "犬干粮",
+
+ {
+ title: "犬湿粮",
detail:'为10月龄及以上英国短毛猫成猫量身打造的精准营养',
price:'¥112',
catimage: require("../assets/three.png"),
+ },
+ {
+ title: "犬干粮",
+ detail:'为10月龄及以上英国短毛猫成猫量身打造的精准营养',
+
+ price:'¥112',
+ catimage: require("../assets/one.png"),
+
},
{
title: "处方用粮",
detail:'为10月龄及以上英国短毛猫成猫量身打造的精准营养',
price:'¥112',
- catimage: require("../assets/six.png"),
+ catimage: require("../assets/four.png"),
},
],
@@ -855,6 +945,38 @@ activeInde3:0,
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: [
{
@@ -967,13 +1089,27 @@ activeInde3:0,
Myfooter,
tabs,
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"));
- let jump = document.querySelectorAll('.d_jump')
+
if(this.usermessage==null ||this.usermessage==undefined){
this.userunlogin=true
}
@@ -989,8 +1125,12 @@ vm=this;
window.removeEventListener('scroll', this.scrollToTop);
},
methods:{
- ifadroind(item,index,order){
- console.log(item,order);
+
+
+
+ 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";
@@ -1000,35 +1140,158 @@ vm=this;
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";
- this.activeIndex=index;
+
if (!(bIsIpad || bIsIphoneOs || bIsMidp || bIsUc7 || bIsUc || bIsAndroid || bIsCE || bIsWM)) {
console.log("当前是电脑打开")
- this.usertitle=item.title
- this.catlistvideo[order]=item;
- this.catproduct=true;
- console.log(this.catproduct);
+ 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;
+
+}
+ },
+
+ 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{
this.catfood=true;
- this.catproduct=false;
+ // 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-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("当前是手机打开")
}
@@ -1229,7 +1492,21 @@ catshiid[userindex-1].scrollIntoView(true);
},
selectGoods(item,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){