Commit 55afb88c authored by 罗超's avatar 罗超

修改部分样式

parent 3b203262
<template>
<div class="mynav">
<div class="mynav" :style="{'background':bg}">
<swiper
:autoplay="false"
:style="{'height': height + 'rpx' }"
......@@ -35,6 +35,7 @@ export default {
cols: [],
formatStyle: "",
height: 186,
bg:""
};
},
created() {
......@@ -64,6 +65,7 @@ export default {
}
this.formatStyle = { backgroundColor: this.navs.backgroundColor };
}
this.bg=this.formatStyle.backgroundColor
},
methods: {
clickHandler(url) {
......
......@@ -12,6 +12,7 @@
>
<img :src="item.pic_url" style="margin-bottom:-4px" mode="widthFix"/>
</view>
<view class="hots" v-for="(x, i) in hotspots" :key="i" :style="[x.formatStyle]" @click="clickHots(x.link)">&nbsp;</view>
</view>
</template>
......@@ -21,7 +22,8 @@ export default {
data() {
return {
adtemp:[],
marginStyle:""
marginStyle:"",
hotspots:[]
}
},
created() {
......@@ -42,6 +44,15 @@ export default {
this.marginStyle=`${this.ad.top??0}px ${this.ad.right??0}px ${this.ad.bottom??0}px ${this.ad.left??0}px `
this.adtemp.push(x)
});
this.ad.hotspot.forEach(x=>{
x.formatStyle={
left:x.left+'rpx',
top:x.top+'rpx',
height:x.height+'rpx',
width:x.width+'rpx'
}
this.hotspots.push(x)
})
},
methods: {
clickHandler(url) {
......@@ -51,6 +62,13 @@ export default {
});
}
},
clickHots(link) {
if (link && link.length > 0) {
uni.navigateTo({
url: link[0].PageUrl,
});
}
},
},
};
</script>
......@@ -58,9 +76,12 @@ export default {
<style>
.ad-box {
position: relative;
width: 100%;
}
.ad-box .hots{
position: absolute;
z-index: 2;
}
.ad-box .ad-chi {
position: absolute;
}
......
......@@ -18,7 +18,7 @@
</swiper-item>
</block>
</swiper> -->
<view :style="{marginTop:swipers.topAndBottom+'px',marginBottom:(swipers.topAndBottom<0?0:swipers.topAndBottom)+'px',marginLeft:swipers.leftAndRight+'px',marginRight:swipers.leftAndRight+'px'}">
<view :style="{marginTop:swipers.topAndBottom+'px',marginBottom:(swipers.topAndBottom<0?0:swipers.topAndBottom)+'px',marginLeft:swipers.leftAndRight+'px',marginRight:swipers.leftAndRight+'px',background:swipers.background}">
<u-swiper
:list="banners"
:effect3d="swipers.style == 2"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment