html详情页前端处理

html 复制代码
<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <TITLE> detail </TITLE>
    <link rel="stylesheet" href="../../layuiadmin/layui/css/modules/laydate/default/laydate.css" type="text/css"></link>
    <link rel="stylesheet" href="../../layuiadmin/layui/css/layui.css" media="all" />
    <script type="text/javascript" src="../../layuiadmin/layui/layui.js"></script>
    <script type="text/javascript" src="../../layuiadmin/layui/lay/modules/laydate.js"></script>
    <script type="text/javascript" src="../../scheme/js/jquery-1.9.1.js"></script>
    <style>
        .labelWidth{
            width: 150px;
        }
        .layui-table th,td{
            text-align:center;!important;
        }
        .inlineLeft{
            margin-left: 50px;
        }
    </style>
    <script language="javascript">
        layui.use(['form', 'layedit', 'laydate'], function(){
            var form = layui.form,layedit = layui.layedit,laydate = layui.laydate;
            layer = parent.layer === undefined ? layui.layer : parent.layer;
            $ = layui.jquery;

            //日期
            laydate.render({
                elem: '#date'
            });

        });

        $(function () {
            var siteid = "[[${siteid}]]";
            $.get("接口?siteid="+siteid,
                function(data){
                   if(data.code==1){
                       $('#webName').text(data.msg.webName)
                       $('#domainName').text(data.msg.domainName)
                       $('#username').text(data.msg.username)
                       $('#phone').text(data.msg.phone)
                       $('#startTime').text(data.msg.startTime)
                       $('#endTime').text(data.msg.endTime)
                       if(data.msg.state==1){
                           $('#state').text('已授权')
                       }else if(data.msg.state==2){
                           $('#state').text('未授权')
                       }
                       $('#remark').text(data.msg.remark)
                       $('#email').text(data.msg.email)
                   }
                });
        })
    </script>
</head>
<body style="background-color: #ffffff">
    <form class="layui-form"  method="post" >
        <div id="xxxx" style="margin-top: 20px;">
            <div class="layui-form-item">
                <div class="layui-inline" >
                    <label class="layui-form-label" style="width: 175px; margin-left: -25px">网站名称:</label>
                    <div class="layui-input-inline">
                        <span style="float: left;margin: 8px 0px 0px 5px;font-weight: bold;" id="webName"></span>
                    </div>
                </div>
                <div class="layui-inline">
                    <label class="layui-form-label" style="width: 175px; margin-left: -25px">域名:</label>
                    <div class="layui-input-inline">
                        <span id="domainName" style="float: left;margin: 8px 0px 0px 5px;font-weight: bold;"></span>
<!--                        <span style="float: left;margin: 9px 0px 0px 5px;" th:if="${af.applytype=='1'}" >申领</span>-->
<!--                        <span style="float: left;margin: 9px 0px 0px 5px;" th:if="${af.applytype=='2'}" >归还</span>-->
<!--                        <span style="float: left;margin: 9px 0px 0px 5px;" th:if="${af.applytype=='3'}" >变动</span>-->
<!--                        <span style="float: left;margin: 9px 0px 0px 5px;" th:if="${af.applytype=='4'}" >报废</span>-->
<!--                        <span style="float: left;margin: 9px 0px 0px 5px;" th:if="${af.applytype=='6'}" >换领</span>-->
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label" style="width: 175px; margin-left: -25px">网站联系人:</label>
                    <div class="layui-input-inline">
                        <span style="float: left;margin: 8px 0px 0px 5px;font-weight: bold;" id="username"></span>
                    </div>
                </div>
                <div class="layui-inline">
                    <label class="layui-form-label" style="width: 175px; margin-left: -25px">联系人电话:</label>
                    <div class="layui-input-inline">
                        <span id="phone" style="float: left;margin: 8px 0px 0px 5px;font-weight: bold;"></span>
<!--                        <span style="float: left;margin: 9px 0px 0px 5px;" th:if="${af.zclx=='1'}" >个人</span>-->
<!--                        <span style="float: left;margin: 9px 0px 0px 5px;" th:if="${af.zclx=='2'}" >公共</span>-->
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label" style="width: 175px; margin-left: -25px">授权开始时间:</label>
                    <div class="layui-input-inline">
                        <span style="float: left;margin: 8px 0px 0px 5px;font-weight: bold;" id="startTime"></span>
                    </div>
                </div>
                <div class="layui-inline">
                    <label class="layui-form-label" style="width: 175px; margin-left: -25px">授权结束时间:</label>
                    <div class="layui-input-inline">
                        <span id="endTime" style="float: left;margin: 8px 0px 0px 5px;font-weight: bold;"></span>
                        <!--                        <span style="float: left;margin: 9px 0px 0px 5px;" th:if="${af.zclx=='1'}" >个人</span>-->
                        <!--                        <span style="float: left;margin: 9px 0px 0px 5px;" th:if="${af.zclx=='2'}" >公共</span>-->
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label" style="width: 175px; margin-left: -25px">启用状态:</label>
                    <div class="layui-input-inline">
                        <span style="float: left;margin: 8px 0px 0px 5px;font-weight: bold;" id="state"></span>
                    </div>
                </div>
                <div class="layui-inline">
                    <label class="layui-form-label" style="width: 175px; margin-left: -25px">邮箱:</label>
                    <div class="layui-input-inline">
                        <span style="float: left;margin: 8px 0px 0px 5px;font-weight: bold;" id="email"></span>
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label" style="width: 175px; margin-left: -25px">备注:</label>
                    <div class="layui-input-inline">
                        <span style="float: left;margin: 8px 0px 0px 5px;font-weight: bold;" id="remark"></span>
                    </div>
                </div>
            </div>
        </div>
    </form>
</div>
</body>
</html>
相关推荐
腾讯TNTWeb前端团队3 小时前
helux v5 发布了,像pinia一样优雅地管理你的react状态吧
前端·javascript·react.js
范文杰6 小时前
AI 时代如何更高效开发前端组件?21st.dev 给了一种答案
前端·ai编程
拉不动的猪6 小时前
刷刷题50(常见的js数据通信与渲染问题)
前端·javascript·面试
拉不动的猪7 小时前
JS多线程Webworks中的几种实战场景演示
前端·javascript·面试
FreeCultureBoy7 小时前
macOS 命令行 原生挂载 webdav 方法
前端
uhakadotcom8 小时前
Astro 框架:快速构建内容驱动型网站的利器
前端·javascript·面试
uhakadotcom8 小时前
了解Nest.js和Next.js:如何选择合适的框架
前端·javascript·面试
uhakadotcom8 小时前
React与Next.js:基础知识及应用场景
前端·面试·github
uhakadotcom8 小时前
Remix 框架:性能与易用性的完美结合
前端·javascript·面试
uhakadotcom8 小时前
Node.js 包管理器:npm vs pnpm
前端·javascript·面试