<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <title>会员拉新</title>
  <link rel="stylesheet" href="../css/swiper.css" />
  <link rel="stylesheet" href="../css/iconfont.css">
  <script src="../js/jquery-3.4.1.min.js"></script>
  <script src="../js/swiper.min.js" type="text/javascript" charset="utf-8"></script>
  <style>
    body {
      padding: 0;
      margin: 0;
    }
    /* .swiper-container {
      height: 400px;
    } */
    .list {
      height: auto;
      width: 100%;
      background-color: #fff;
      display: flex;
      justify-content: flex-start;
      border-bottom: 1px solid rgba(238, 238, 238, 1);
      box-shadow: 0px 2px 4px 0px rgba(221, 221, 221, 1);
      border-radius: 4px;
      z-index: 100;
    }

    .left {
      width: 30%;
    }

    .left img {
      width: 160px;
    }

    .right {
      width: 76%;
      padding: 20px;
      background-color: #fff;
      height: auto;
    }
    .flex {
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .title {
      font-size: 28px;
      font-weight: bold;
      color: rgba(45, 71, 106, 1);
    }

    .txt {
      margin-top: 20px;
      font-size: 24px;
      color: rgba(45, 71, 106, 0.8);
    }
  </style>
</head>

<body>
  <div class="swiper-container">
    <div class="swiper-wrapper">
      <div class="swiper-slide">
        <img src="http://files.cailiao.com/vue/cailiao/pc_21/images/ba1.jpg" alt="">
      </div>
      <div class="swiper-slide">
        <img src="http://files.cailiao.com/vue/cailiao/pc_21/images/ba2.png" alt="">
      </div>
      <div class="swiper-slide">
        <img src="http://files.cailiao.com/vue/cailiao/pc_21/images/ba3.png" alt="">
      </div>
    </div>
    <div class="swiper-pagination"></div>
  </div>
  <div class="list">
    <div class="left flex">
      <img src="../img/counter.png" alt="" />
    </div>
    <div class="right">
      <div class="title">欧亚一号专柜</div>
      <div class="txt">
        <i class="iconfont icon-dianhua" style="font-size: 16px;"></i>
        <span>18888888888</span>
      </div>
      <div class="txt">
        <i class="iconfont icon-dizhi" style="font-size: 16px;"></i>
        <span>欧亚商场一楼181号</span>
      </div>
    </div>
  </div>
  <script>
    function GetQueryString(name) {
      var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
      var r = window.location.search.substr(1).match(reg)
      var context = ""
      if (r != null)
        context = r[2]
      reg = null
      r = null
      return context == null || context == "" || context == "undefined" ? "" : context;
    }
    // alert(GetQueryString("storeCode"))
    const storecode = GetQueryString("storeCode")
    $(function () {
      showQRInfo()
    });
    const showQRInfo = () => {
      // let pageUri = `${nowUrl}&detailid=${voucherId}&actionid=${activeId}&unionid=${unionId}`;
      // let storecode = "181"
      let pageUri = `pages/user/register/register?storeCode=${storecode}`
      let pageUrl = `http://139.155.48.151:8085/workWx/auth/oauth2/wxMiniQrCode?pageUri=${pageUri}`;

      $.ajax({
        type: "POST",
        url: pageUrl,
        data: {},
        success: function (res) {
          $('#image').attr('src', res.data)
        },
        error: function (data) {

        }
      });
    }
    // 轮播图
    /* swiper轮播组件 */
    var swiper = new Swiper('.swiper-container', {
      autoplay: true,
      pagination: {
        el: '.swiper-pagination',
      },
    });
    /*鼠标移入停止轮播,鼠标离开 继续轮播*/
    $('.swiper-container').mouseenter(function () {
      swiper.stopAutoplay();
    }).mouseleave(function () {
      swiper.startAutoplay();
    })

    // $(function () {
    //   $.ajax({
    //       type: 'GET',
    //       url: 'a.json',
    //       success: function (data) {
    //               var str = "";
    //               for (i = 0; i < data.list.length; i++) {
    //                   var _data = data.list[i];
    //                   str += '<div class="swiper-slide"><a href="'+_data.URL+'">' +
    //                       '<img src="'+_data.Pic+'" alt=""></a></div>';
    //               };
    //               $("#slider").append(str);

    //               if(data.data.list.length > 1){
    //                   var mySwiper = new Swiper('.swiper-container', {
    //                       loop: true,
    //                       autoplay: 2000,
    //                       pagination: '.swiper-pagination',
    //                   })
    //               }
    //           }
    //   })
    // })
  </script>
</body>

</html>