<template>
    <view class="server">
        <swiper
            :indicator-dots="true"
            :autoplay="true"
            :interval="3000"
            :duration="1000"
            indicator-color="rgba(0, 0, 0, 0.5)"
            indicator-active-color="rgba(255, 91, 0, 1)"
        >
            <swiper-item v-for="item in bannerList" :key="item.id">
                <view class="swiper-item">
                    <image class="img" :src="item.url"></image>
                </view>
            </swiper-item>
        </swiper>
        <slot name="supplier-title"></slot>
        <scroll-view scroll-x="true" class="scroll-view">
            <view class="server_item" v-for="item in server_card_list" :key="item.id">
                <image :src="item.img" mode="" class="card_img"></image>
                <text class="card_title">{{item.title}}</text>
                <text class="card_text" v-for="text, index in item.content" :key="index">{{text.text}}</text>
            </view>
        </scroll-view>
    </view>
</template>

<script>
export default {
    data() {
        return {
            bannerList: [
                {
                    id: 0,
                    url: require('@/static/supplier-login/banner-01.png')
                },
                {
                    id: 1,
                    url: require('@/static/supplier-login/banner-02.png')
                }
            ],
            // 卡片内容
            server_card_list: [
                {
                    id: 1, 
                    title: '全渠道获客',
                    img: require('@/static/supplier-login/server/01.png'),
                    content: [
                        {
                            text: '精准投放推广内容触达B端客户',
                        },
                        {
                            text: '精准识别全渠道匿名用户线索',
                        }
                    ]
                },
                {
                    id: 2,
                    title: '潜客运营',
                    img: require('@/static/supplier-login/server/02.png'),
                    content: [
                        {
                            text: '潜客筛选',
                        },
                        {
                            text: '精细化分层运营',
                        },
                        {
                            text: '精准推送内容'
                        }
                    ]
                },
                {
                    id: 3,
                    title: '销售转化',
                    img: require('@/static/supplier-login/server/03.png'),
                    content: [
                        {
                            text: '全链条商机管理，用户线索流程清晰，高效流转'
                        },
                        {
                            text: '全场景交易平台，线上线下一体化把握每一条商机'
                        },
                        {
                            text: '全方位售后服务，延长客户生命周期、提高复购率'
                        }
                    ]
                }
            ]
        }
    },
}
</script>

<style scoped lang="scss">
    .server {
        background-color: #fff;
    }
swiper {
    height: 360rpx;
}
.swiper-item {
    height: 100%;
    width: 100%;
}
.img {
    width: 100%;
    height: 100%;
}
.server_item {
    width: 550rpx;
    height: 610rpx;
    box-sizing: border-box;
    display: inline-flex;
    flex-direction: column;
    margin: 10rpx 20rpx;
    align-items: center;
    box-shadow: 0rpx 1rpx 16rpx 0rpx rgba(102, 102, 102, 0.3);
    .card_title {
        color: #333333;
        font-size: 36rpx;
        font-weight: 500;
        margin-bottom: 20rpx;
    }
    .card_text {
        color: #707070;
        font-size: 24rpx;
        margin-top: 10rpx;
    }
    .card_img {
        width: 216rpx;
        height: 216rpx;
        margin: 80rpx 0 40rpx 0;
    }
}
.scroll-view {
    white-space: nowrap;
    width: 100%;
    box-sizing: border-box;
    padding: 0 56rpx;
    height: 640rpx;
}
</style>
