首页限时优惠图改成方图,修改轮播图是否点击跳转
parent
dc4c52e857
commit
826c9bf12e
|
@ -1,12 +1,12 @@
|
|||
<template>
|
||||
<view>
|
||||
<view id="main-img">
|
||||
<!-- <view class="mar-x40" v-for="(item,index) in list" :key="index"> -->
|
||||
<!-- 活动商品 start -->
|
||||
<view v-for="(item,index) in activityList" :key="index" class="mar-x50">
|
||||
<h1 class="fon36 bold">{{item.name}}</h1>
|
||||
<view class="colpeili fon26 mar-s20 mar-x40 clips1">{{item.subtitle}}</view>
|
||||
<view class="posir" @tap="goDetail(item.id)">
|
||||
<image class="radius30 animated fadeIn" :src="item.cover" mode="aspectFill" lazy-load style="height: 425rpx;width: 100%;"></image>
|
||||
<image class="radius30 animated fadeIn" :src="item.cover" mode="aspectFill" lazy-load style="height: 425rpx;width: 100%;" :style="{height:activityHeight + 'px'}"></image>
|
||||
<view v-if="item.tag!=''" class="posia fon24 colf pad-zy10 pad-s10 pad-x20 activity-img">限时优惠</view>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -45,9 +45,16 @@
|
|||
},
|
||||
data() {
|
||||
return {
|
||||
check:uni.getStorageSync('is_active')
|
||||
check:uni.getStorageSync('is_active'),
|
||||
activityHeight:''
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
uni.createSelectorQuery().in(this).select('#main-img').boundingClientRect().exec(rect => {
|
||||
this.activityHeight = rect[0].width;
|
||||
console.log(this.activityHeight,55);
|
||||
});
|
||||
},
|
||||
methods:{
|
||||
goDetail(id){//前往详情页
|
||||
if(this.check){
|
||||
|
|
|
@ -65,7 +65,6 @@
|
|||
// }
|
||||
],
|
||||
current:0, // 当前显示tab及swiper列表
|
||||
swiperHeight:uni.getSystemInfoSync().screenHeight,
|
||||
publicColor:'', // 主题颜色
|
||||
showTop:false, // 是否显示回到顶部
|
||||
dataList:[], // 数据列表
|
||||
|
@ -97,9 +96,8 @@
|
|||
this.isAutoPlay = false;
|
||||
},
|
||||
onReady() {
|
||||
// 获取ID为tab元素的信息
|
||||
// uni.createSelectorQuery().in(this).select('#tab').boundingClientRect().exec(rect => {
|
||||
// this.swiperHeight = this.swiperHeight - rect[0].height
|
||||
// uni.createSelectorQuery().in(this).select('#swiper-box').boundingClientRect().exec(rect => {
|
||||
// this.swiperHeight = rect[0].width
|
||||
// });
|
||||
},
|
||||
onShow() {
|
||||
|
|
Loading…
Reference in New Issue