<?php
    $info = \Application\Service\Extension\Laminas::$serviceManager->adminWebsitefiling->getCurrentWebsiteFiling();
?>
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>登录申请</title>
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no">
    <link rel="stylesheet" type="text/css" href="/css/weui.min.css">
    <style>
        #login-btn {
            border-radius: 2rem;
        }

        .weui-btn_primary {
            background-color: #409eff;
        }

        .weui-list-tips__item:before {
            content: "\2022";
            position: absolute;
            left: 0;
            top: -0.1em;
        }
        .weui-list-tips:before {
            content: "";
            position: absolute;
            left: 0;
            top: 0;
            right: 0;
            height: 1px;
            border-top: 1px solid #000000;
            color: rgba(0,0,0,0.1);
            -webkit-transform-origin: 0 0;
            transform-origin: 0 0;
            -webkit-transform: scaleY(0.5);
            transform: scaleY(0.5);
        }
        .weui-msg__desc+.weui-msg__custom-area, .weui-msg__desc-primary+.weui-msg__custom-area {
            margin-top: 40px;
        }

        .weui-msg__custom-area {
            text-align: left;
            word-wrap: break-word;
            -webkit-hyphens: auto;
            hyphens: auto;
            margin-bottom: 16px;
        }

        .weui-list-tips:last-child {
            padding-bottom: 0;
        }
        .weui-list-tips {
            list-style: none;
            padding-top: 24px;
            padding-bottom: 24px;
            line-height: 1.4;
            font-size: 14px;
            position: relative;
        }

        .weui-list-tips__item:first-child {
            margin-top: 0;
        }
        .weui-list-tips__item {
            position: relative;
            padding-left: 15px;
            margin: 16px 0;
        }

        .weui-btn_primary:not(.weui-btn_disabled):active {
            color: hsla(0,0%,100%,.6);
            background-color: #166a9b;
        }
	
	    .weui-msg__icon-area img{
            width: 120px;
            width: 120px;
        }
        .weui-msg__icon-area {
            height: 120px;
        }
    </style>
</head>
<body>
<!--头像-->
<div class="container">
    <div class="page msg_success js_show" tabindex="-1">
        <div class="weui-msg">
            <div class="weui-msg__icon-area">
<!--                <i class="weui-icon-success weui-icon_msg"></i>-->
                <img src="<?= current(json_decode($info['website_logo'], true))['url'] ?? '' ?>"/>
            </div>
            <div class="weui-msg__text-area">
                <h2 class="weui-msg__title">申请获取以下权限</h2>
                <div class="weui-msg__custom-area">
                    <ul class="weui-list-tips">
                        <li role="option" class="weui-list-tips__item">获得您的公开信息(昵称，头像等)</li>
                    </ul>
                </div>
            </div>
            <div class="weui-msg__opr-area">
                <p class="weui-btn-area">
                    <a href="javascript:" id="login-btn" role="button" class="weui-btn weui-btn_primary">微信一键授权登录</a>
                </p>
            </div>
        </div>
        <div class="weui-footer weui-footer_fixed-bottom">
            <p class="weui-footer__text">技术支持 <?= $info['company_name'] ?? '' ?></p>
            <p class="weui-footer__text">Copyright © <?= $info['origin_year'] ?>-<?= $info['current_year'] ?></p>
            <a href="//beian.miit.gov.cn/" class="page_copyright">
                <?= $info['company_recordno'] ?>
            </a>
        </div>
    </div>
    <div role="alert" id="loadingToast" style="opacity: 0; display: none;">
        <div class="weui-mask_transparent"></div>
        <div class="weui-toast">
            <span class="weui-primary-loading weui-icon_toast">
              <span class="weui-primary-loading__dot"></span>
            </span>
            <p class="weui-toast__content">加载中</p>
        </div>
    </div>
<script>
    window.onload = function () {
        document.getElementById('login-btn').addEventListener('click', function () {
            window.location = '<?= $authUrl ?>'
        })
    }
</script>
</html>
