mirror of
https://gitee.com/lab1024/smart-admin.git
synced 2025-10-02 18:26:38 +08:00
commit
8952050e8a
@ -282,11 +282,6 @@ img, picture {
|
|||||||
.rc-top{
|
.rc-top{
|
||||||
margin-top: 74px;
|
margin-top: 74px;
|
||||||
}
|
}
|
||||||
.rc-list__header {
|
|
||||||
background: none;
|
|
||||||
padding: .5rem 0;
|
|
||||||
border-bottom: none;
|
|
||||||
}
|
|
||||||
.ts-right-arr {
|
.ts-right-arr {
|
||||||
border-bottom:1px solid #E1001A;
|
border-bottom:1px solid #E1001A;
|
||||||
padding-bottom:2px;
|
padding-bottom:2px;
|
||||||
|
@ -313,8 +313,6 @@ object-fit: cover;
|
|||||||
color: #fff;
|
color: #fff;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
font-size: 1.25rem;
|
|
||||||
line-height: 9.375rem;
|
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|
||||||
|
|
||||||
|
@ -39,7 +39,6 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
<div class="online bold rc-md-up" v-show="catproduct"></div>
|
<div class="online bold rc-md-up" v-show="catproduct"></div>
|
||||||
|
|
||||||
<div class="rc-full-width">
|
<div class="rc-full-width">
|
||||||
@ -50,8 +49,8 @@
|
|||||||
<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>
|
||||||
<!-- 轮播图 -->
|
<!-- 轮播图 -->
|
||||||
<swiper :options="swiperOption">
|
<van-swipe class="rc-padding-bottom--md">
|
||||||
<swiper-slide 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">
|
||||||
|
|
||||||
@ -82,9 +81,8 @@
|
|||||||
<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>
|
||||||
</swiper-slide>
|
</van-swipe>
|
||||||
</swiper>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
@ -120,94 +118,6 @@
|
|||||||
</ul>
|
</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="">
|
|
||||||
</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/`">
|
<nuxt-link :to="`/productdetails/productlist/`">
|
||||||
<div class="userserlect">
|
<div class="userserlect">
|
||||||
<span class="ts-standard-btn center">查看更多</span>
|
<span class="ts-standard-btn center">查看更多</span>
|
||||||
@ -716,7 +626,6 @@
|
|||||||
const settings = require("@/config");
|
const settings = require("@/config");
|
||||||
export default {
|
export default {
|
||||||
middleware: 'metaTitle',
|
middleware: 'metaTitle',
|
||||||
// middleware: 'metaTitle',
|
|
||||||
meta: {title: '首页'},
|
meta: {title: '首页'},
|
||||||
data(){
|
data(){
|
||||||
return{
|
return{
|
||||||
@ -1092,18 +1001,12 @@ activeInde3:0,
|
|||||||
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
|
||||||
}
|
}
|
||||||
@ -1111,19 +1014,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";
|
||||||
@ -1134,15 +1031,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;
|
||||||
@ -1151,9 +1044,12 @@ vm=this;
|
|||||||
this.fivemao=false;
|
this.fivemao=false;
|
||||||
this.sixmao=false;
|
this.sixmao=false;
|
||||||
this.dogshow=false
|
this.dogshow=false
|
||||||
// console.log(catshiid);
|
this.showingBanners=this.banners.pc;
|
||||||
}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;
|
||||||
@ -1168,7 +1064,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();
|
||||||
@ -1182,7 +1078,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;
|
||||||
@ -1191,12 +1087,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;
|
||||||
@ -1260,11 +1158,11 @@ 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{
|
||||||
@ -1286,8 +1184,7 @@ dogtop.scrollIntoView(true);
|
|||||||
// this.catfood=false;
|
// this.catfood=false;
|
||||||
|
|
||||||
// }
|
// }
|
||||||
console.log("当前是手机打开")
|
//console.log("当前是手机打开")
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
userdog(item,index){
|
userdog(item,index){
|
||||||
@ -1299,7 +1196,7 @@ dogtop.scrollIntoView(true);
|
|||||||
for(let i =0;i<this.userserachlist.length;i++){
|
for(let i =0;i<this.userserachlist.length;i++){
|
||||||
if(!this.userserachlist.includes(petType)){
|
if(!this.userserachlist.includes(petType)){
|
||||||
this.userserachlist.push(petType)
|
this.userserachlist.push(petType)
|
||||||
}
|
}W
|
||||||
}
|
}
|
||||||
this.dogmessage(this.userserachlist)
|
this.dogmessage(this.userserachlist)
|
||||||
},
|
},
|
||||||
@ -1345,10 +1242,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;
|
||||||
@ -1472,7 +1365,6 @@ dogtop.scrollIntoView(true);
|
|||||||
if(item.title=='购物车'){
|
if(item.title=='购物车'){
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
path: "/myorder/userrecord",
|
path: "/myorder/userrecord",
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if(item.title=='营养专家'){
|
if(item.title=='营养专家'){
|
||||||
@ -1488,23 +1380,21 @@ dogtop.scrollIntoView(true);
|
|||||||
this.courseId(item)
|
this.courseId(item)
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
path: "/myorder/userrecord",
|
path: "/myorder/userrecord",
|
||||||
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
selectGoods(item,index){
|
selectGoods(item,index){
|
||||||
console.log(item,index);
|
//console.log(item,index);
|
||||||
this.activeIndex=index;
|
this.activeIndex=index;
|
||||||
console.log(item.title);
|
//console.log(item.title);
|
||||||
this.ifadroind(item,index,this.useraindex)
|
this.ifadroind(item,index,this.useraindex)
|
||||||
// this.ifAdoid(item,index);
|
// this.ifAdoid(item,index);
|
||||||
|
|
||||||
},
|
},
|
||||||
quanshi(item,index){
|
quanshi(item,index){
|
||||||
console.log(item,index);
|
//console.log(item,index);
|
||||||
this.activeIndex5=index
|
this.activeIndex5=index
|
||||||
console.log(this.activeIndex5);
|
//console.log(this.activeIndex5);
|
||||||
|
|
||||||
},
|
},
|
||||||
userdoghot(item,index){
|
userdoghot(item,index){
|
||||||
this.activeIndex6=index
|
this.activeIndex6=index
|
||||||
@ -1514,12 +1404,9 @@ selectGo(item,index){
|
|||||||
this.activeInde2=index;
|
this.activeInde2=index;
|
||||||
},
|
},
|
||||||
selectGoo(item,index){
|
selectGoo(item,index){
|
||||||
|
|
||||||
this.activeInde3=index;
|
this.activeInde3=index;
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
|
Loading…
Reference in New Issue
Block a user