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