<!DOCTYPE html>

<html lang="en">
<head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0,user-scalable=no">
    <title></title>
    <style type="text/css">
        html,body,p,span,div,img{margin:0;padding:0;}body{width:750px;}
        .shareC { width:750px;  padding:0; text-align:center;font-family:"黑体";color:#212121;}
        .header{background:url(/data/img/headerBg.png);padding-top:100px; height:415px;  }
        .bgBD{width:162px; height:162px;background-color:white;border-radius:50%;-moz-border-radius:50%;-webkit-border-radius:50%;margin:0 auto;}
        #headerBg{width:160px; height:160px;border-radius:50%;-moz-border-radius:50%;-webkit-border-radius:50%;margin:1px;}
        #title{font-size:34px; margin-top:24px;}
        .address{ font-size:28px; line-height:36px; padding:50px 110px 0 110px; height:108px;display:block; display:-webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;overflow:hidden;text-overflow:ellipsis;}
        .noticePart{ width:560px;margin:16px auto 0 auto;  background:url(/data/img/noticeBg.png);}
        .noticePart p{height:44px; font-size:20px; line-height:22px; padding:68px 28px 32px 28px; }
        #notice{ max-width:504px;display:block; display:-webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;overflow:hidden;text-overflow:ellipsis;}
        .qrcode{background:url(/data/img/flower.png); height:488px; margin:6px auto 0 auto;}
        #qrImg {margin-top:80px;}
        #qrcodeImg img { margin: 0 auto;}
        .footer{ font-size:30px; height:66px; line-height:66px; padding:0 0 55px 0;}
        .footer img{vertical-align:bottom; display:inline-block;}
    </style>
</head>
<body>
<div class="shareC">
    <div class="header">
        <div class="bgBD">
            <img src="" id="headerBg" />
        </div>
        <p id="title"></p>
        <p class="address">地址：<span id="address"></span></p>
    </div>
    <div class="noticePart">
        <p>
            <span id="notice"></span>
        </p>
    </div>
    <div class="qrcode" id="qrcode">
        <img id="qrImg" src="" />
        <div id="qrcodeImg"></div>
        <p id="tip"></p>
    </div>
    <div class="footer">
        <img src="/data/img/logo.png" /> 我的身边店
    </div>
</div>
<script type="text/javascript" src="/data/js/qrcode.min.js"></script>
<script type="text/javascript">
    var pageObj = {
        type : "<?php echo $params['shareType'];?>",//1或2是小程序码，其它是二维码
        id : "<?php echo $params['id'];?>",//1是小程序码，2是二维码,
        headerBg : "<?php echo $params['imgUrl'];?>",
        url : "<?php echo $params['qrCode'];?>",
        qrImg :  "<?php echo $params['qrCode'];?>",
        title : "<?php echo $params['storeName'];?>",
        address : "<?php echo $params['address'];?>",
        notice : "<?php echo $params['desc'];?>"
    };
    if(pageObj.notice==null || pageObj.notice=="")
        pageObj.notice="暂无公告";
    var excute = ["title","address","notice"];
    excute.forEach(function(v,i){
        document.getElementById(v).innerHTML = pageObj[v];
    });
    document.getElementById("headerBg").src = pageObj.headerBg;

    if(pageObj.type<=2){
        document.getElementById("qrImg").src = pageObj.qrImg;}
    else{
        new QRCode(document.getElementById('qrcodeImg'), pageObj.url);
    }



</script>
</body>
</html>