Index error fixed, van-swiper unified

This commit is contained in:
Leung 2022-01-16 20:42:14 +08:00
parent 3634764669
commit 5c5b50b7ea
3 changed files with 239 additions and 257 deletions

View File

@ -285,11 +285,6 @@ img, picture {
.rc-top{
margin-top: 90px;
}
.rc-list__header {
background: none;
padding: .5rem 0;
border-bottom: none;
}
.ts-right-arr {
border-bottom:1px solid #E1001A;
padding-bottom:2px;

View File

@ -316,8 +316,6 @@ object-fit: cover;
color: #fff;
height: 100%;
width: 100%;
font-size: 1.25rem;
line-height: 9.375rem;
text-align: center;

View File

@ -42,8 +42,8 @@
<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 class="rc-padding-bottom--md">
<van-swipe-item v-for="(item, index) in catlistvideo" :key="index">
<div class="rc-video">
<div class="uservideo">
@ -61,7 +61,7 @@
<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">
<source :src= item.video type="video/ogg" autoplay>
</video>
</div>
@ -74,9 +74,8 @@
<i @click="userbuy(item,index)" class="ts-standard-btn ts-standard-btn--two center">立即购买</i>
</div>
</div>
</swiper-slide>
</swiper>
</van-swipe-item>
</van-swipe>
</div>
@ -708,7 +707,6 @@
const settings = require("@/config");
export default {
middleware: 'metaTitle',
// middleware: 'metaTitle',
meta: {title: '首页'},
data(){
return{
@ -1083,10 +1081,10 @@
},
created(){
vm=this;
},
watch:{
},
},
mounted(){
const that = this
this.ifAdoid();
@ -1115,9 +1113,8 @@
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("")
console.log("当前是电脑打开")
this.stypechange=false;
//console.log(this.usertitle)
@ -1133,7 +1130,7 @@
}
else
{
//console.log("")
console.log("当前是手机打开")
this.showingBanners=this.banners.mobile;
this.stypechange=true;
this.onemao=true;
@ -1328,10 +1325,6 @@
this.gotop = false;
this.searchBar=true
}
}
},
toTop() {
let top = document.documentElement.scrollTop || document.body.scrollTop;
@ -1455,7 +1448,6 @@
if(item.title=='购物车'){
this.$router.push({
path: "/myorder/userrecord",
});
}
if(item.title=='营养专家'){
@ -1471,7 +1463,6 @@
this.courseId(item)
this.$router.push({
path: "/myorder/userrecord",
});
},
@ -1498,9 +1489,7 @@
selectGoo(item,index){
this.activeInde3=index;
}
},
}
}
</script>
<style lang="less" scoped>