This commit is contained in:
yanran200730
2022-11-08 18:10:21 +08:00
parent ecd44a3c78
commit 77755d0298
10 changed files with 548 additions and 210 deletions

View File

@@ -27,7 +27,11 @@
<span>文明榜单</span>
</div>
</div>
<image class="banner" src="https://cdn.cunwuyun.cn/wxmp/tianfuxing/banner.png" />
<swiper class="banner" indicatorDots circular :autoplay="true" :interval="5000">
<swiper-item v-for="(item, index) in bannerList" :key="index">
<image :src="item.imgUrl" mode="aspectFill" />
</swiper-item>
</swiper>
<div class="section yh">
<h2>商家优惠</h2>
<div class="yh-list">
@@ -40,14 +44,14 @@
</div>
<AiEmpty v-if="!list.length"></AiEmpty>
</div>
<div class="more" @click="$linkTo('./Store')" hover-class="text-hover">查看更多优惠</div>
<div class="more" v-if="list.length" @click="$linkTo('./Store')" hover-class="text-hover">查看更多优惠</div>
</div>
<div class="section rz">
<div class="section rz" v-if="!user.merchantInfo || user.merchantInfo.status !== '1'" >
<h2>商家入驻</h2>
<div class="rz-info">
<div class="rz-item">
<h3>商家权益</h3>
<span>成都市金牛区xxxx大厦成都</span>
<!-- <span>成都市金牛区xxxx大厦成都</span> -->
</div>
<div class="rz-item">
<h3>免费入驻</h3>
@@ -66,7 +70,7 @@
<span>商家诉求收集汇总反馈</span>
</div>
</div>
<div class="more" @click="$linkTo('./Ranking')" hover-class="text-hover">查看更多优惠</div>
<div class="more" @click="$linkTo('./AddMerchants')" hover-class="text-hover">我是商家我要入驻</div>
</div>
</div>
</div>
@@ -87,6 +91,7 @@
isMore: false,
isFixed: false,
statusBarHeight: 20,
bannerList: []
}
},
@@ -102,11 +107,23 @@
}
this.getList()
this.getBannerList()
},
methods: {
...mapActions(['autoLogin', 'getUserInfo']),
getBannerList () {
this.$instance.post(`/api/appbanner/getList`, null, {
withoutToken: true
}).then(res => {
if (res.code === 0) {
this.bannerList = res.data
}
}).catch(() => {
})
},
getList () {
this.$instance.post(`/api/appmerchantinfo/discountList`, null, {
withoutToken: true,
@@ -317,8 +334,15 @@
display: block;
width: 686px;
height: 352px;
margin: 0 auto 32rpx;
margin: 0 auto 32px;
border-radius: 8px;
overflow: hidden;
image {
width: 686px;
height: 352px;
border-radius: 8px;
}
}
.nav {