<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>查看详情</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="../../layuiadmin/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="../../layuiadmin/style/admin.css" media="all">
    <style type="text/css">
        .tenant-li {
            margin: 10px
        }

        img {
            width: 40%;
            height: 30%;
            margin-bottom: 20px;
        }
        /*企业营业执照样式*/
        .imgStyle{
            width: 200px;
            height: auto;
        }
    </style>
</head>
<body>
<div class="layui-card" style="min-height: 400px; padding: 10px" id="tenant_detail"></div>
<script id="tenant_detail_demo" type="text/html">
    <div class="layui-tab-item layui-show">
        <ui>
            {{# if(d.image){ }}
            <li class="tenant-li">
                <h3 style="margin-bottom: 10px">轮播图：</h3>
                <img src="{{d.image}}" class="imgStyle" />
            </li>
            {{# } }}
        </ui>
    </div>
</script>


<script src="../../layuiadmin/layui/layui.js"></script>

<script>
    layui.config({
        base: '../../../layuiadmin/' //静态资源所在路径
    }).extend({
        index: 'lib/index',
    }).use(['index',  'laytpl'], function () {
        var $ = layui.$
            , laytpl = layui.laytpl;
        var data = JSON.parse(JSON.stringify(parent.layui.table.editdata)); // 框架有Bug所以这么转换

        var getTpl = tenant_detail_demo.innerHTML
            , tenant_detail = document.getElementById('tenant_detail');
        laytpl(getTpl).render(data, function (html) {
            tenant_detail.innerHTML = html;
        });
        var dom = document.getElementById("content_demo");
        if(data.content && dom){
           dom.innerHTML = data.content;
        }
    });
</script>
</body>
</html>
