Merge branch 'sit-Leung' into sit-Carl

# Conflicts:
#	rc-busness/components/header.vue
#	rc-busness/pages/index.vue
This commit is contained in:
Vion
2022-01-17 17:56:37 +08:00
17 changed files with 305 additions and 29132 deletions

View File

@@ -3,25 +3,17 @@
<div>
<Myheader></Myheader>
<div class="rc-top"></div>
<unlogin></unlogin>
<!-- Suppose in header end -->
<van-swipe :autoplay="3000">
<van-swipe-item v-for="(banner, index) in banners" :key="index">
<van-swipe-item v-for="(banner, index) in showingBanners" :key="index">
<img :src="banner.src" class="useraimg"/>
</van-swipe-item>
</van-swipe>
<div class="online bold rc-md-down" id="fixed-catbar-seperator"></div>
<!-- <div v-swiper:mySwiper="swiperOption" class="swiperWrap">
<div class="swiper-wrapper">
<div class="swiper-slide" v-for="(banner,index ) in banners" :key="index">
<img :src="banner.src">
</div>
</div>
<div class="swiper-pagination swiper-pagination-bullets"></div>
</div> -->
<div class="rc-max-width--xl">
<div class="usermain">
<div :class="searchBar?'rc-ma':'rc-ma searchBara'">
@@ -39,6 +31,7 @@
</ul>
</div>
</div>
</div>
<div class="online bold rc-md-up" v-show="catproduct"></div>
@@ -50,13 +43,14 @@
<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" >
<van-swipe>
<van-swipe-item class="swiper-slide" v-for="(item, key) in catlistvideo" :key="key" >
<div class="rc-video">
<div class="uservideo">
<video :poster=item.catimage controls="">
<source :src=item.video>
</video>
</div>
<div class="rc-right">
<img :src=item.catimage alt="">
<span>{{item.title}}</span>
@@ -83,8 +77,8 @@
</div>
</div>
</swiper-slide>
</swiper>
</van-swipe-item>
</van-swipe>
</div>
@@ -285,11 +279,13 @@
<h2 class="rc-beta rc-text--center">{{dogtitle}}</h2>
</div>
<!-- 轮播图 -->
<swiper :options="swiperOption">
<swiper-slide class="swiper-slide" v-for="(item, key) in doglistvideo" :key="key" >
<van-swipe>
<van-swipe-item class="swiper-slide" 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>
</div>
<div class="rc-right">
@@ -318,8 +314,8 @@
</div>
</div>
</swiper-slide>
</swiper>
</van-swipe-item>
</van-swipe>
</div>
@@ -707,11 +703,9 @@
</template>
<script>
let vm=null;
import $ from 'jquery'
import Myheader from "~/components/header.vue";
import Myfooter from "~/components/rc-footer.vue";
import unlogin from "~/components/unlogin.vue";
import '@vant/touch-emulator';
import { userquery,postCourseId,biaomessage,userque,searchchanpin } from "../ajax/getData";
const settings = require("@/config");
export default {
@@ -791,13 +785,19 @@ activeInde3:0,
},
],
banners:[
{src:require("../assets/image/one.jpg"),link:""},
{src:require("../assets/image/two.jpg"),link:""},
{src:require("../assets/image/three.jpg"),link:""},
{src:require("../assets/image/four.jpg"),link:""},
],
banners:{
'mobile':[
{src:"/images/one.jpg",link:""},
{src:"/images/two.jpg",link:""},
{src:"/images/three.jpg",link:""},
{src:"/images/four.jpg",link:""}
],
'pc':[
{src:"/images/pc-banner1.png",link:""},
{src:"/images/pc-banner2.png",link:""},
]
},
showingBanners:{},
userdoglist: [
{
title: "小型犬",
@@ -1136,40 +1136,41 @@ vm=this;
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;
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;
this.showingBanners=this.banners.pc;
// 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.showingBanners=this.banners.mobile;
}
},
ifadroind(item,index,order){
console.log(item,index,order);
ifadroind(item,index,order){
//console.log(item,index,order);
var sUserAgent = navigator.userAgent.toLowerCase();
var bIsIpad = sUserAgent.match(/ipad/i) == "ipad";
@@ -1302,9 +1303,7 @@ dogtop.scrollIntoView(true);
}
}
this.dogmessage(this.userserachlist)
},
},
userlook(order){
if(order==0){
this.catshi=this.catlist;
@@ -1367,24 +1366,21 @@ dogtop.scrollIntoView(true);
}
},
//请求猫
async catmessage(stype) {
let data=[];
if(stype==undefined||stype==null){
data = await biaomessage(0);
}else{
data = await biaomessage(this.userserachlist);
}
if(data){
this.catlist=data;
let userlist=[];
userlist=data.slice(0,6);
this.catshi=userlist;
this.catgan=userlist;
}
},
async catmessage(stype) {
let data=[];
if(stype==undefined||stype==null){
data = await biaomessage(0,'',1,6);
}else{
data = await biaomessage(this.userserachlist,'',1,6);
}
if(data){
this.catlist=data;
let userlist=[];
userlist=data.slice(0,6);
this.catshi=userlist;
this.catgan=userlist;
}
},
//请求犬
async dogmessage(stype) {
@@ -1441,24 +1437,24 @@ dogtop.scrollIntoView(true);
}
},
//处方用粮筛选
userclick(item,index){
this.userquery(index)
},
//处方用粮筛选
userclick(item,index){
this.userquery(index)
},
//全价猫湿粮筛选
catclick(item,index){
this.userstype=0;
let petType={
petType:0,
name:index,
}
for(let i =0;i<this.userserachlist.length;i++){
if(!this.userserachlist.includes(petType)){
this.userserachlist.push(petType)
}
}
this.catmessage(this.userserachlist)
},
catclick(item,index){
this.userstype=0;
let petType={
petType:0,
name:index,
}
for(let i =0;i<this.userserachlist.length;i++){
if(!this.userserachlist.includes(petType)){
this.userserachlist.push(petType)
}
}
this.catmessage(this.userserachlist)
},

View File

@@ -7,9 +7,6 @@
<div class="online" id="fixed-catbar-seperator"></div>
<div class="rc-top"></div>
<div class="rc-usermain ts-product-detail rc-max-width--xl rc-layout-container rc-two-column rc-border-bottom rc-border-colour--brand4">
<!--
<magnifier v-bind:parentmsg="msg" ></magnifier>
-->
<div class="rc-column">
<div data-js-carousel="" data-image-gallery="true">
<div class="rc-carousel rc-carousel__gallery-image" data-zoom-container="328b2e5f-6904-4cac-9709-51ed18d2500f" data-zoom-factor="2">
@@ -223,7 +220,6 @@
<script>
import Myheader from "~/components/header.vue";
import magnifier from "@/components/magnifier.vue";
import tabs from "@/components/tabs.vue";
import unlogin from "~/components/unlogin.vue";
import { mapMutations } from "vuex";
@@ -320,7 +316,6 @@ export default {
components: {
Myheader,
tabs,
magnifier,
unlogin,
Myfooter