functionsDetail.jsp 4 KB
<%@ page contentType="text/html; charset=UTF-8"%>
<%@page import="com.weaver.formmodel.mobile.scriptlib.FParam"%>
<%@page import="com.weaver.formmodel.mobile.scriptlib.Function"%>
<%@page import="com.engine.mobilemode.service.FunctionService"%>
<%@ include file="./init.jsp"%>
<%
	List<Function> functionList = FunctionService.getInstance().loadFunction(user.getLanguage());
%>
<html>
<head>
<title></title>
<link rel="stylesheet" href="/mobilemode/admin/dep/perfect-scrollbar/css/perfect-scrollbar.min.css">
<style type="text/css">
*{
	font-family: 'Microsoft YaHei', Arial;
}
html,body{
	height: 100%;
	margin: 0px;
	padding: 0px;
	overflow: hidden;
	
}
* {
    font-family: "Helvetica Neue", "Segoe UI", Tahoma, Arial, "Hiragino Sans GB", STHeiti, "Microsoft Yahei", "WenQuanYi Micro Hei", sans-serif;
}
* {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}
body{
	background: #fff;
	font-size: 12px;
}
#function_main{
	position: absolute;
	left:0px;
	top: 0px;
	bottom: 0px;
	width: 100%;
	overflow-y: auto;
	overflow-x: hidden;
}
h1, h2, h3, h4, h5, h6, h7, p {
    font-weight: 400;
    margin: 0;
    padding: 0;
}
pre {
    display: block;
    word-break: break-all;
    word-wrap: break-word;
    margin: 10px 0;
}
pre code {
    padding: 0;
    font-size: inherit;
    color: inherit;
    white-space: pre-wrap;
    background-color: transparent;
    border-radius: 0;
}
.function-content pre {
    background-color: #efeff4;
    color: #666;
    font-size: 12px;
    padding: 15px;
}
.function-content {
    margin: 0;
    padding: 2px 30px;
}
.function-title {
    color: #0066b1;
    font-size: 16px;
    font-weight: 600;
    border-bottom: 1px solid #ccc;
    height: 40px;
    line-height: 40px;
}
.function-title-desc {
    margin-top: 10px;
}
.function-content p {
    padding: 5px 0 0 0;
}
.function-param {
    position: relative;
    background: #fff;
    margin: 5px 0 0 20px;
}
.function-param-label {
    color: #0066b1;
    font-size: 12px;
    font-weight: 600;
    width: 120px;
    display: inline-block;
}

.function-param-type {
    padding-left: 20px;
    border-left: 1px solid #ccc;
}
</style>

<script>
	require(["perfect-scrollbar"], function() {
		$('#function_main').perfectScrollbar({ theme: "light" });
	})
</script>
</head>
<body>
<div id="function_main">
<%for(Function function : functionList){ %>
<%List<FParam> params = function.getParams(); %>
<div id="function_<%=function.getId() %>" class="function-content">
	<div class="function-title"><%=function.getSign() %></div>
	<div class="function-title-desc">
		<p><%=function.getDesc() %></p>
		<%if(params.size() == 0){%><p><strong><%=SystemEnv.getHtmlLabelName(383537,user.getLanguage())%><!-- 参数: --></strong><%=SystemEnv.getHtmlLabelName(127228,user.getLanguage())%><!-- 无 --></p><%}else{%><p><strong><%=SystemEnv.getHtmlLabelName(383537,user.getLanguage())%><!-- 参数: --></strong></p><%}%>
	</div>
	<%for(int i = 0; i < params.size(); i++){
		FParam fParam = params.get(i);
	%>
	<div class="function-param">
	    <div class="function-param-head">
	       <span class="function-param-label"><%=fParam.getName() %></span>
	       <span class="function-param-type"><%=fParam.getType() %></span>
	    <%=fParam.getRequired().equalsIgnoreCase("true") ? "["+SystemEnv.getHtmlLabelName(383237,user.getLanguage())+"]" : "["+SystemEnv.getHtmlLabelName(383238,user.getLanguage())+"]" %> <!-- 必需,  可选-->
	    <%=fParam.getExplain() %>
        </div>
	</div>
	<%} %>
	<%
		String returnV = function.getReturnV();
		if(returnV.trim().equals("")){
			returnV = SystemEnv.getHtmlLabelName(127228,user.getLanguage()); //无
		}
	%>
	<p><strong><%=SystemEnv.getHtmlLabelName(383540,user.getLanguage())%><!-- 返回值: --></strong><%=returnV %></p>
	<p><strong><%=SystemEnv.getHtmlLabelName(127578,user.getLanguage())%><!-- 示例:--></strong></p>
	<pre><code class="lang-javascript prettyprint prettyprinted"><%=function.getExample().replaceAll("<", "&lt;").replaceAll(">", "&gt;") %></code></pre>
</div>
<%} %>
</div>
</body>
</html>