<template>
  <div class="el-common_ad_pc_3">
    <el-carousel>
      <el-carousel-item v-for="item in bannerList" :key="item.id">
        <a :href="item.url"
          ><img :src="item.imgs"/></a>
<!--       <img src="../../theme-chalk/src/images/jslndx-banner01.jpg"/>-->
<!--        <img src="../../theme-chalk/src/images/jslndx-banner01.jpg"/>-->
<!--       <img src="../../theme-chalk/src/images/jslndx-banner01.jpg"/>-->
      </el-carousel-item>
    </el-carousel>
    <!-- </ul> -->
  </div>
</template>

<script>
import {httpPost} from "../../../src/utils/utils";
import lenye_base from "lenye_base";

export default {
  name: "ElCommonAdPc3",
    data(){
      return{
          bannerList:[]
      }
    },
 mounted() {
      this.getbanner();
 },
    methods: {
      getbanner(){
          const that = this
          httpPost(
              lenye_base.base_data.getapiUrl() +
              "/setting-service/api/setPromotion/queryPage.do",
              lenye_base.base_data.getformatting({
                  serviceType:"banner"
              }),
              function (data) {
                  that.bannerList = data.data
              }
          )
      },
    // 跳转到页面
    goDetails(articleId) {
      window.open("/infodetail?id=" + articleId);
    },
  },
};
</script>
