Merge branch 'sit-Carl' into sit-Leung

# Conflicts:
#	rc-busness/pages/index.vue
This commit is contained in:
Vion 2022-01-17 18:33:39 +08:00
commit 29f7a9e9a8
8 changed files with 581 additions and 29121 deletions

View File

@ -150,11 +150,9 @@ img, picture {
flex-wrap: nowrap;
text-align: center;
width: 86%;
&::-webkit-scrollbar{
display:none;
}
li{
border-radius: 100px;
flex-shrink:0;
}
}
.active{
@ -344,6 +342,9 @@ img, picture {
font-size:.75rem;
line-height: 1.375rem;
}
&::-webkit-scrollbar{
display:none;
}
}
}
@ -384,7 +385,7 @@ img, picture {
}
}
img{
width:20rem;
width:100%;
max-width:320px;
min-width:160px;
}
@ -496,12 +497,30 @@ img, picture {
{
li
{
margin-left: 40px;
margin-left: 30px;
width: 8.125rem;
height: 2.5rem;
line-height: 40px;
font-size: .875rem;
}
/*
&::-webkit-scrollbar{
background:unset;
height:4px;
}
&::-webkit-scrollbar-thumb{
background-color:#d7d7d7;
height:2px;
}
&::-webkit-scrollbar-track{
background-color:ddd;
height:2px;
}
&::-webkit-scrollbar-button{
background:unset;
}
*/
}
}

View File

@ -125,7 +125,6 @@
height: 26.31rem;
width: 100%;
font-size: 0.20px;
line-height: 1.50rem;
text-align: center;
position: relative;
}
@ -338,7 +337,6 @@ object-fit: cover;
height: 100%;
width: 100%;
font-size: 1.25rem;
line-height: 9.375rem;
text-align: center;
@ -528,7 +526,6 @@ img{
cursor: pointer;
font-size: 16px;
text-align: center;
margin-left:1.3vw;
}
}

View File

@ -50,7 +50,6 @@ export default {
plugins: [
'@/plugins/vant',
'@/plugins/ElementUI',
{ src: "~/plugins/swiper.js", ssr: false },
{ src: '@/plugins/localStorage', ssr: false },

File diff suppressed because it is too large Load Diff

View File

@ -16,12 +16,10 @@
},
"dependencies": {
"@nuxtjs/axios": "^5.13.6",
"@vant/touch-emulator": "^1.3.2",
"amfe-flexible": "^2.2.1",
"core-js": "^3.15.1",
"element-ui": "^2.15.6",
"ip": "^1.1.5",
"jquery": "^3.6.0",
"less": "^4.1.2",
"less-loader": "^6.0.0",
"nuxt": "^2.15.7",
@ -29,7 +27,8 @@
"qrcodejs2": "^0.0.2",
"vant": "^2.12.22",
"vue-awesome-swiper": "^4.1.1",
"vuex-persistedstate": "^4.1.0"
"vuex-persistedstate": "^4.1.0",
"swiper":"^5.4.5"
},
"devDependencies": {
"@vant/area-data": "^1.1.5",

View File

@ -13,12 +13,13 @@
</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--md">
<ul class="ul-zhuan rc-margin-y--xl">
<li
v-for="(item, index) in discountlist"
:key="index"
@ -31,6 +32,7 @@
</ul>
</div>
</div>
</div>
<div class="online bold rc-md-up" v-show="catproduct"></div>
@ -42,15 +44,14 @@
<div class="swiper-container rc-full-width rc-padding-y--md" id="swiper1">
<h2 class="rc-beta rc-text--center">{{usertitle}}</h2>
<!-- 轮播图 -->
<van-swipe class="rc-padding-bottom--md">
<van-swipe-item v-for="(item, index) in catlistvideo" :key="index">
<van-swipe>
<van-swipe-item class="swiper-slide" v-for="(item, key) in catlistvideo" :key="key" >
<div class="rc-video">
<div class="uservideo">
<video controls="" :poster=item.catimage>
<source :src=item.video type="video/mp4">
<video :poster=item.catimage controls="">
<source :src=item.video>
</video>
</div>
<div class="rc-right">
<img :src=item.catimage alt="">
<span>{{item.title}}</span>
@ -62,8 +63,8 @@
<div class="sw-center" >
<div class="rc-click" @click="selectproduce(item,index)">
<div class="uservideo">
<video controls="controls" :poster=item.catimage>
<source :src= item.video type="video/ogg">
<video width="300px" height="251" controls="controls">
<source :src= item.video type="video/ogg" autoplay>
</video>
</div>
@ -76,6 +77,7 @@
<i @click="userbuy(item,index)" class="ts-standard-btn ts-standard-btn--two center">立即购买</i>
</div>
</div>
</van-swipe-item>
</van-swipe>
</div>
@ -273,17 +275,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="swiper2">
<div class="swiper-container rc-full-width rc-padding-y--md" id="swiper1">
<div class="oc-top">
<h2 class="rc-beta rc-text--center">{{dogtitle}}</h2>
</div>
<!-- 轮播图 -->
<van-swipe class="rc-padding-bottom--md">
<van-swipe-item 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 controls="" :poster=item.catimage>
<source :src=item.video type="video/mp4">
<video :poster=item.catimage controls="">
<source :src=item.video>
</video>
</div>
@ -298,18 +300,48 @@
<div class="sw-center" >
<div class="rc-click" @click="selectproduce(item,index)">
<div class="uservideo">
<video controls="controls">
<source :src= item.video type="video/ogg">
<video width="300px" height="251" controls="controls">
<source :src= item.video type="video/ogg" autoplay>
</video>
</div>
<img :src=item.catimage alt="">
<div class="rc-column">
<div class="rc-click" @click="selectproduce(item,index)">
<span>{{item.title}}</span>
<p>{{item.detail}}</p>
<em>{{item.price}}</em>
<i>0.001{{item.price}}</i>
</div>
<div class="rc-full-width rc-margin-y--md">
<i @click="userbuy(item,index)" class="ts-standard-btn ts-standard-btn--two center">立即购买</i>
<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>
</div>
@ -318,7 +350,28 @@
</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>
@ -749,6 +802,7 @@
},
],
anchor:'',
dogshi:[],
catlist:[],
@ -768,6 +822,7 @@
selection:[
{
title: "幼猫",
},
{
title: "成猫",
@ -777,24 +832,27 @@
},
{
title: "品种猫",
},
{
title: "亚健康",
},
],
banners:{
'mobile':[
{src:"/images/banner/one.jpg",link:""},
{src:"/images/banner/two.jpg",link:""},
{src:"/images/banner/three.jpg",link:""},
{src:"/images/banner/four.jpg",link:""}
{src:"/images/one.jpg",link:""},
{src:"/images/two.jpg",link:""},
{src:"/images/three.jpg",link:""},
{src:"/images/four.jpg",link:""}
],
'pc':[
{src:"/images/banner/pc-banner1.png",link:""},
{src:"/images/banner/pc-banner2.png",link:""}
{src:"/images/pc-banner1.png",link:""},
{src:"/images/pc-banner2.png",link:""},
]
},
showingBanners:[],
showingBanners:{},
userdoglist: [
{
title: "小型犬",
@ -1088,12 +1146,18 @@
vm=this;
},
watch:{
},
mounted(){
const that = this
this.ifAdoid();
this.ifAdoid()
// window.onresize = () => {
// setTimeout(() => {
// this.ifAdoid()
// }, 500);
// }
this.usermessage= JSON.parse(localStorage.getItem("userInfo"));
if(this.usermessage==null ||this.usermessage==undefined){
this.userunlogin=true
}
@ -1101,13 +1165,19 @@
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";
@ -1118,11 +1188,15 @@
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;
@ -1130,13 +1204,11 @@
this.fourmao=false;
this.fivemao=false;
this.sixmao=false;
this.dogshow=false
this.dogshow=false;
this.showingBanners=this.banners.pc;
}
else
{
// console.log(catshiid);
}else{
console.log("当前是手机打开")
this.showingBanners=this.banners.mobile;
this.stypechange=true;
this.onemao=true;
this.twomao=true;
@ -1146,6 +1218,7 @@
this.dogshow=true;
this.catproduct=true
this.sixmao=true;
this.showingBanners=this.banners.mobile;
}
},
@ -1153,7 +1226,6 @@
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";
@ -1165,7 +1237,7 @@
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;
@ -1174,14 +1246,12 @@
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;
@ -1245,11 +1315,11 @@
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{
@ -1271,7 +1341,8 @@
// this.catfood=false;
// }
//console.log("")
console.log("当前是手机打开")
}
},
userdog(item,index){
@ -1287,8 +1358,6 @@
}
this.dogmessage(this.userserachlist)
},
userlook(order){
if(order==0){
this.catshi=this.catlist;

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

View File

@ -1,4 +0,0 @@
import Vue from 'vue'
import VueAwesomeSwiper from 'vue-awesome-swiper'
Vue.use(VueAwesomeSwiper)