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

修改部分样式

parent 3b203262
<template> <template>
<div class="mynav"> <div class="mynav" :style="{'background':bg}">
<swiper <swiper
:autoplay="false" :autoplay="false"
:style="{'height': height + 'rpx' }" :style="{'height': height + 'rpx' }"
...@@ -35,6 +35,7 @@ export default { ...@@ -35,6 +35,7 @@ export default {
cols: [], cols: [],
formatStyle: "", formatStyle: "",
height: 186, height: 186,
bg:""
}; };
}, },
created() { created() {
...@@ -64,6 +65,7 @@ export default { ...@@ -64,6 +65,7 @@ export default {
} }
this.formatStyle = { backgroundColor: this.navs.backgroundColor }; this.formatStyle = { backgroundColor: this.navs.backgroundColor };
} }
this.bg=this.formatStyle.backgroundColor
}, },
methods: { methods: {
clickHandler(url) { clickHandler(url) {
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
> >
<img :src="item.pic_url" style="margin-bottom:-4px" mode="widthFix"/> <img :src="item.pic_url" style="margin-bottom:-4px" mode="widthFix"/>
</view> </view>
<view class="hots" v-for="(x, i) in hotspots" :key="i" :style="[x.formatStyle]" @click="clickHots(x.link)">&nbsp;</view>
</view> </view>
</template> </template>
...@@ -21,7 +22,8 @@ export default { ...@@ -21,7 +22,8 @@ export default {
data() { data() {
return { return {
adtemp:[], adtemp:[],
marginStyle:"" marginStyle:"",
hotspots:[]
} }
}, },
created() { created() {
...@@ -42,6 +44,15 @@ export default { ...@@ -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.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.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: { methods: {
clickHandler(url) { clickHandler(url) {
...@@ -51,6 +62,13 @@ export default { ...@@ -51,6 +62,13 @@ export default {
}); });
} }
}, },
clickHots(link) {
if (link && link.length > 0) {
uni.navigateTo({
url: link[0].PageUrl,
});
}
},
}, },
}; };
</script> </script>
...@@ -58,9 +76,12 @@ export default { ...@@ -58,9 +76,12 @@ export default {
<style> <style>
.ad-box { .ad-box {
position: relative; position: relative;
width: 100%; width: 100%;
} }
.ad-box .hots{
position: absolute;
z-index: 2;
}
.ad-box .ad-chi { .ad-box .ad-chi {
position: absolute; position: absolute;
} }
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
</swiper-item> </swiper-item>
</block> </block>
</swiper> --> </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 <u-swiper
:list="banners" :list="banners"
:effect3d="swipers.style == 2" :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