<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
    <meta content="telephone=no" name="format-detection"/>
    <meta content="yes" name="apple-mobile-web-app-capable"/>
    <link rel=icon type=image/png href="data:image/png;base64,iVBORw0KGgo=">
    <title>【支持正版】</title>
    <style>
        body {
            background-color: #fff8f5;
            font-size: 12px;
        }

        .mainbody {
            text-align: center;
            display: inline-block;
            width: 100%;
        }

        .q_title {
            margin-top: 30px;

        }

        .q_title h3 {
            font-size: 2em;
            padding: 5px 0;
            color:#ef670e;
        }

        .q_title p {
            padding: 5px 0;
            font-size: 1.4em;
            color: #a57d6a;
        }

        .img_qr img {
            width: 64%;
            margin-top: 10px;
            diplay:block;
            margin:auto;
            border:15px solid #ffebdf;
            border-radius:20px;
            /*pointer-events: none;*/
        }

        .q_bottom {
            color: #f09f60;
            background:#ffeddf;
            border:2px solid #f1cca7;
            text-align:left;
            width:85%;
            padding:15px;
            margin:30px auto;

        }

        .q_bottom h3{
            color: #df6d1f;
            font-size: 2em;
            margin-top: 0;
            margin-bottom: 17px;
        }
        .q_bottom p{
            font-size: 1.1em;
            line-height: 23px;
            padding: 0;
            margin: 0;
        }
        .icon_area {
            width: 8em;
            height: 8em;
            background-color: #10aeff;
            border-radius: 4em;
            color: #fff;
            margin: 5em auto;
        }

        .icon_msg {
            font-size: 8em;
            font-family: -webkit-body;
            line-height: 1em;
        }

        .msg_title {
            font-family: 'Helvetica Neue';
            font-size: 2em;
        }
    </style>
</head>
<body>
<div class="mainbody">
    <div class="q_title">
        <h3>关注作者授权公众号继续阅读</h3>
        <p>由于版权问题，请关注后继续阅读</p>
        <p>( 每日免费领书币 )</p>
    </div>
    @if($img)
        <div class="img_qr" >
                <img src="{{$img}}">
        </div>
    @else
        <div class="img_qr" id="qrcode_url">
        </div>
    @endif

    <div class="q_bottom" >
        <h3>关注步骤 :</h3>
        <p>1. 将二维码截图保存</p>
        <p>2. 打开微信-扫一扫-相册，选中二维码后点击扫描</p>
        <p>3. 点击关注公众号</p>
    </div>
</div>
</body>
<script>
    if (typeof WeixinJSBridge == "object" && typeof WeixinJSBridge.invoke == "function") {
        handleFontSize();
    } else {
        if (document.addEventListener) {
            document.addEventListener("WeixinJSBridgeReady", handleFontSize, false);
        } else if (document.attachEvent) {
            document.attachEvent("WeixinJSBridgeReady", handleFontSize);
            document.attachEvent("onWeixinJSBridgeReady", handleFontSize);
        }
    }
    function handleFontSize() {
        // 设置网页字体为默认大小
        WeixinJSBridge.invoke('setFontSizeCallback', {'fontSize': 0});
        // 重写设置网页字体大小的事件
        WeixinJSBridge.on('menu:setfont', function () {
            WeixinJSBridge.invoke('setFontSizeCallback', {'fontSize': 0});
        });
    }
</script>
<script src='https://cdn-novel.iycdm.com/static/qrcode.min.js'></script>
<script>

        var img_url = "{!! $url !!}"
        /*if(img_url){
         $('#qrcode_url').qrcode({
         render: "canvas",
         width: 200,
         height: 200,
         text: img_url
         });
         }*/

        var qrcode = new QRCode("qrcode_url", {
            text: img_url,
            width: 200,
            height: 200,
            colorDark : "#000000",
            colorLight : "#ffffff",
            correctLevel : QRCode.CorrectLevel.H
        });
</script>
</html>