<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="include :: wxTouchScreenHeader('正定自贸区')"/>
</head>
<style>#iframe img {
    width: 100%;
}</style>
<body style="background-color: #EEEEEE">
<div class="header">
    <h1 class="title fl" id="KSName">[[${guidance.fileName}]]</h1>
</div>
<div style="bottom: 0px;top: 45px;overflow: auto; -webkit-overflow-scrolling: touch;">
    </br>
    </br>
    </br>
    <a th:if="${!#strings.isEmpty(guidance.fileName)}"
       style="text-align:center;font-size:16px; width:90%;background: #2f99dcc9;"
       class="weui_btn weui_btn_primary" id="viewSrc" target="_blank">
        <p style="color:#FFF;font-size:18px;">文件预览</p>
        <p style="color:#ddd;font-size:14px;">（如显示不全可预览后单击右侧PDF预览模式）</p>
    </a>
    </br>
    </br>
    </br>
    <a th:if="${!#strings.isEmpty(guidance.fileName)}"
       style="text-align: center;font-size:16px;width:90%;background: #2f99dcc9;"
       target="_blank"
       class="weui_btn weui_btn_primary"
       id="downloadSrc">
        <p style="color:#FFF;font-size:18px;">文件下载</p>
        <p style="color:#ddd;font-size:14px;">（如直接打开可长按屏幕选择另存为）</p>
    </a>
    <!--    <iframe id="iframe" th:if="${!#strings.isEmpty(guidance.docName)}" class="iframe" width="100%" height="100%"-->
    <!--            frameborder="0">-->
    <!--    </iframe>-->
    <!--            <div id="qrcode" style="float:right;padding-right: 35px;padding-top: 35px" th:if="${!#strings.isEmpty(guidance.docName)}">-->
    <!--                <img th:src="${guidance.qrCode}">-->
    <!--                <p style="text-align: center">扫描二维码下载当前文档</p>-->
    <!--                <p style="text-align: center;color: #000;opacity: 0.5;">(使用Android手机获得更好体验)</p>-->
    <!--            </div>-->
    <p style="text-align: center;font-size: 20px" class="weui_tabbar_label"
       th:if="${#strings.isEmpty(guidance.fileName)}">
        </br>
        </br>
        </br>
        </br>
        </br>
        </br>
        暂无数据... </p>
</div>
<th:block th:include="include :: wxTouchScreenFooter"/>
<script>
    document.body.style.position = 'fixed'; //防止iframe页上下滚动时带动本页移动
    document.body.style.position = 'static';//取消禁止滚动
    var url = "[[${guidance.fileUrl}]]";
    var port = window.location.port;
    var yum = window.location.protocol + "//" + window.location.host;
    var kkview = "[[${kkview}]]";
    url = yum + url;
    document.getElementById("downloadSrc").href = url;
    if (url.substr(url.lastIndexOf(".") + 1, url.length).toLowerCase() == "pdf") {
        yum = kkview + "/pdfjs/web/viewer.html?file=";
    } else {
        yum = kkview + "/onlinePreview?url=";
    }
    var docSrc = yum + url;
    document.getElementById("viewSrc").href = docSrc;
</script>
</body>
</html>

