diff --git a/rc-busness/assets/css/index.less b/rc-busness/assets/css/index.less index 3ad859d4..40a3ba08 100644 --- a/rc-busness/assets/css/index.less +++ b/rc-busness/assets/css/index.less @@ -273,6 +273,7 @@ } width: 100%; margin-top: 0.45rem; + } } .active { @@ -286,22 +287,28 @@ color: #444444; border: 1px solid #D7D7D7; } + // .usermain{ + // display: none; + // } } @media screen and (min-width: 769px) { + .rc-selection{ + display: none; + } .sw-center{ display: none; } .useraimg{ width: 100%; -height: 29.31rem; +// height: 29.31rem; object-fit: cover; } .van-swipe-item { color: #fff; - height: 29.31rem; + height: 100%; width: 100%; font-size: 1.25rem; line-height: 9.375rem; @@ -314,13 +321,19 @@ object-fit: cover; margin-top: 2.875rem; margin: 0 auto; position: relative; - margin-top: 9.375rem; +// margin-top: 9.375rem; #xxxFullScreen { background-color: white; - margin-top: 100px; +// margin-top: 100px; #swiper1 { width: 100%; overflow: hidden; + margin-top: 2.31rem; + + h2{ + padding-bottom: 5rem; + } + } .swiper-container2 { @@ -463,9 +476,13 @@ img{ } .rc-max-width--xl { + .rc-ma { - padding:60px 0; + .rc-margin-y--xl{ + margin-bottom: 1.88rem; + } + // padding:60px 0; .ul-zhuan{ width: 100%; @@ -493,21 +510,71 @@ img{ 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{ width: 100%; margin-top: 2.5rem; + + .rc-text--center{ + margin-top: 4.8rem; + + } .van-tabs{ display: none; } .selectionswitch{ + + .rc-text--center{ + margin-top: 4.8rem; + } .van-tabs{ display: none; } } .rc-selection{ + display: none; width: 100%; ol{ width: 100%; diff --git a/rc-busness/assets/dog/1615961267978_BdtOyG.jpg b/rc-busness/assets/dog/four.jpg similarity index 100% rename from rc-busness/assets/dog/1615961267978_BdtOyG.jpg rename to rc-busness/assets/dog/four.jpg diff --git a/rc-busness/assets/dog/1615961220013_Pgrg4o.mp4 b/rc-busness/assets/dog/four.mp4 similarity index 100% rename from rc-busness/assets/dog/1615961220013_Pgrg4o.mp4 rename to rc-busness/assets/dog/four.mp4 diff --git a/rc-busness/assets/dog/1615961193866_CRRN2p.jpg b/rc-busness/assets/dog/one.jpg similarity index 100% rename from rc-busness/assets/dog/1615961193866_CRRN2p.jpg rename to rc-busness/assets/dog/one.jpg diff --git a/rc-busness/assets/dog/1616137837391_LkOGwt.mp4 b/rc-busness/assets/dog/one.mp4 similarity index 100% rename from rc-busness/assets/dog/1616137837391_LkOGwt.mp4 rename to rc-busness/assets/dog/one.mp4 diff --git a/rc-busness/assets/dog/1615961258160_lEjV9J.jpg b/rc-busness/assets/dog/three.jpg similarity index 100% rename from rc-busness/assets/dog/1615961258160_lEjV9J.jpg rename to rc-busness/assets/dog/three.jpg diff --git a/rc-busness/assets/dog/1615961247165_qVo04H.mp4 b/rc-busness/assets/dog/three.mp4 similarity index 100% rename from rc-busness/assets/dog/1615961247165_qVo04H.mp4 rename to rc-busness/assets/dog/three.mp4 diff --git a/rc-busness/assets/dog/1615961228023_9PoCCS.jpg b/rc-busness/assets/dog/two.jpg similarity index 100% rename from rc-busness/assets/dog/1615961228023_9PoCCS.jpg rename to rc-busness/assets/dog/two.jpg diff --git a/rc-busness/assets/dog/1615961409788_BpyOxx.mp4 b/rc-busness/assets/dog/two.mp4 similarity index 100% rename from rc-busness/assets/dog/1615961409788_BpyOxx.mp4 rename to rc-busness/assets/dog/two.mp4 diff --git a/rc-busness/pages/index.vue b/rc-busness/pages/index.vue index 50a4814a..b49afab9 100644 --- a/rc-busness/pages/index.vue +++ b/rc-busness/pages/index.vue @@ -7,12 +7,13 @@ - + +
-
+

{{usertitle}}

@@ -90,12 +91,15 @@
+ + + -
-
-

全价猫湿粮

+
+
+

全价猫湿粮

@@ -124,7 +128,6 @@ -
@@ -182,8 +185,8 @@
-
-
+
+

全价猫干粮

@@ -275,12 +278,76 @@
-
+
+
+ +
+
+

{{dogtitle}}

+
+ + + +
+
+ +
+ +
+ + {{item.title}} +

{{item.detail}}

+ {{item.price}} + 立即购买 +
+
+
+
+
+ +
+ + + {{item.title}} +

{{item.detail}}

+ {{item.price}} +
+
+ 立即购买 +
+
+ +
+
+
-
+ +
+ +
+ +

全价犬湿粮

+
+
+
+
    +
  • + + {{ item.title }} +
  • +
+
+
  • @@ -374,11 +441,28 @@
-
-
+ + + +
+

全价犬干粮

+
+
+
    +
  • + + {{ item.title }} +
  • +
+
  • @@ -470,9 +554,9 @@
-
+
-
+

处方用粮

@@ -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){