<template>
    <div class="container">
        <div class="row">
            <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
                <!--图片链接组件1开始-->
                <div class="common_ad_pc_1"><!--使用此组件，请复制此div-->
                    <span class="ad-banner-body">
                        <a :href="bannerList.url">
                            <img :src="bannerList.imgs" alt="">
                        </a>
                    </span>
                </div>
                <!--图片链接组件1结束-->
            </div>
        </div>
    </div>
</template>

<script type="text/babel">
    import formMixin from '../../../src/mixins/formMixin';
    import lenye_base from 'lenye_base';

    export default {
        name: 'theAdvertisement',
        mixins: [formMixin],
        props: [],
        data() {
            return {
                bannerList: []
            };
        },
        created() {
            this.getData();
        },
        methods: {
            getData() {
                var that = this;
                lenye_base.httpPost(lenye_base.base_data.getapiUrl() + lenye_base.api_url.setting.querySitePromotions, lenye_base.base_data.getformatting({
                    serviceType: 'banner'
                }), function (data) {
                    console.log('banner图', data);
                    that.bannerList = data.data[0];
                });
            }
        },
        computed: {}
    };
</script>
