You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
106 lines
2.1 KiB
106 lines
2.1 KiB
<!--
|
|
* @Author: ch
|
|
* @Date: 2022-03-23 10:31:12
|
|
* @LastEditors: ch
|
|
* @LastEditTime: 2022-05-21 20:09:18
|
|
* @Description: file content
|
|
-->
|
|
<template>
|
|
<view class="banner">
|
|
<u-swiper bgColor="none" @click="goDetail" radius="18rpx" keyName="url" :list="data" height="240rpx" circular indicator indicatorMode="dot"></u-swiper>
|
|
<view class="desc">
|
|
<view class="desc--item">
|
|
<image class="desc--icon" src='@/static/index/bz.png'></image>
|
|
<text class="desc--txt">马士兵严选</text>
|
|
</view>
|
|
<view class="desc--item">
|
|
<image class="desc--icon" src='@/static/index/bz.png'></image>
|
|
<text class="desc--txt">100%正品</text>
|
|
</view>
|
|
<view class="desc--item">
|
|
<image class="desc--icon" src='@/static/index/bz.png'></image>
|
|
<text class="desc--txt">365天质保</text>
|
|
</view>
|
|
<view class="desc--item">
|
|
<image class="desc--icon" src='@/static/index/bz.png'></image>
|
|
<text class="desc--txt">售后无忧</text>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
<script>
|
|
export default {
|
|
data(){
|
|
return {
|
|
|
|
}
|
|
},
|
|
props:{
|
|
data : {
|
|
type : Array,
|
|
default : []
|
|
}
|
|
},
|
|
methods:{
|
|
goDetail(idx){
|
|
let item = this.data[idx];
|
|
if(item.link){
|
|
// #ifdef H5
|
|
window.location.href = item.link;
|
|
// #endif
|
|
// #ifdef APP-PLUS
|
|
plus.runtime.openURL(item.link);
|
|
// #endif
|
|
|
|
}else{
|
|
this.$Router.push(`/goodsDetail?id=${this.data[idx].id}`)
|
|
}
|
|
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
<style lang="scss" scoped>
|
|
|
|
.banner{
|
|
height: 368rpx;
|
|
position: relative;
|
|
padding: 40rpx 30rpx 0;
|
|
overflow: hidden;
|
|
&::before{
|
|
display: block;
|
|
content: '';
|
|
position: absolute;
|
|
left: -5vw;
|
|
top:-2rpx;
|
|
height: 231rpx;
|
|
width: 110vw;
|
|
background: #F3574D;
|
|
border-bottom-left-radius: 100%;
|
|
border-bottom-right-radius: 100%;
|
|
}
|
|
.swiper{
|
|
background-color: none !important;
|
|
}
|
|
}
|
|
.desc{
|
|
display: flex;
|
|
justify-content: space-between;
|
|
margin-top: 14rpx;
|
|
padding-right: 10rpx;
|
|
&--item{
|
|
display: flex;
|
|
align-items: center;
|
|
}
|
|
&--icon{
|
|
width: 42rpx;
|
|
height: 44rpx;
|
|
position: relative;
|
|
}
|
|
&--txt{
|
|
font-size: 22rpx;
|
|
color: $color-grey5;
|
|
margin-top: 4rpx;
|
|
}
|
|
}
|
|
</style> |