629 lines
23 KiB
HTML
629 lines
23 KiB
HTML
<style>
|
||
.hljs,.ui.attached:not(.message)+.ui.attached.segment:not(.top){
|
||
background:#fff!important;
|
||
}
|
||
body{
|
||
background:#F0F2F5!important;
|
||
}
|
||
.ui.message:last-child{
|
||
box-shadow: none;
|
||
height:217px;
|
||
background:rgba(255,255,255,1);
|
||
box-shadow:0px 0px 30px 0px rgba(0,0,0,0.05);
|
||
border-radius:10px;
|
||
}
|
||
.ui.message>:first-child{
|
||
border: none;
|
||
}
|
||
.ui.segment{
|
||
background:none!important;
|
||
padding: 0!important;
|
||
}
|
||
.ui.floating.message{
|
||
box-shadow: none!important;
|
||
background: none;
|
||
}
|
||
.ui.raised.segment{
|
||
box-shadow: none!important;
|
||
}
|
||
.ui.message p{
|
||
margin-bottom: 0!important;
|
||
opacity: 1!important;
|
||
}
|
||
.newDesc__link{
|
||
font-size:16px;
|
||
font-family:PingFangSC-Medium,PingFang SC;
|
||
font-weight:500;
|
||
color:rgba(51,51,51,1);
|
||
margin-bottom: 10px;
|
||
}
|
||
.newDesc__desc{
|
||
font-size:14px;
|
||
font-family:PingFangSC-Regular,PingFang SC;
|
||
font-weight:400;
|
||
color:rgba(102,102,102,1);
|
||
}
|
||
.ui.ordered.steps{
|
||
margin-top: 30px;
|
||
width: 100%;
|
||
height:90px;
|
||
background:rgba(250,250,250,1);
|
||
border-radius:10px;
|
||
border:1px solid rgba(233,233,233,1);
|
||
overflow: hidden;
|
||
}
|
||
/* 头标题 */
|
||
.newDescTitle{
|
||
height:101px;
|
||
background:rgba(255,255,255,1);
|
||
box-shadow:0px 0px 30px 0px rgba(0,0,0,0.05);
|
||
border-radius:10px;
|
||
display: flex;
|
||
align-items: center;
|
||
}
|
||
.newDescTitle__box{
|
||
padding: 0 30px;
|
||
}
|
||
.newDescTitle__box__nav{
|
||
font-size:14px;
|
||
font-family:PingFangSC-Regular,PingFang SC;
|
||
font-weight:400;
|
||
color:rgba(153,153,153,1);
|
||
}
|
||
.newDescTitle__box__t{
|
||
font-size:20px!important;
|
||
font-family:PingFangSC-Semibold,PingFang SC!important;
|
||
font-weight:600!important;
|
||
color:rgba(51,51,51,1)!important;
|
||
margin-top: 15px!important;
|
||
}
|
||
/* biaoge */
|
||
.ui.steps .step:after, .ui.ordered.steps .step.completed:before{
|
||
display: none!important;
|
||
}
|
||
.ui.steps .step .description{
|
||
font-size:14px!important;
|
||
font-family:PingFangSC-Regular,PingFang SC;
|
||
font-weight:400;
|
||
color:rgba(102,102,102,1)!important;
|
||
margin-bottom: 4px;
|
||
text-align: center;
|
||
}
|
||
.ui.steps .step .title{
|
||
font-size:18px!important;
|
||
font-family:PingFangSC-Regular,PingFang SC;
|
||
font-weight:400!important;
|
||
color:rgba(51,51,51,1)!important;
|
||
text-align: center;
|
||
}
|
||
/* biaoge e */
|
||
/* 接口参数 */
|
||
.parameter, .parameterName, .testing, .clientCode, .errorList{
|
||
padding-bottom: 20px;
|
||
background:rgba(255,255,255,1);
|
||
box-shadow:0px 0px 30px 0px rgba(0,0,0,0.05);
|
||
border-radius:10px;
|
||
margin-bottom: 20px;
|
||
}
|
||
.clientCode{
|
||
margin-bottom: 0px;
|
||
padding-bottom: 0px;
|
||
}
|
||
.parameter__title, .parameterName__title, .testing__title, .clientCode__title, .errorList__title{
|
||
padding: 0 30px;
|
||
height: 55px;
|
||
display: flex;
|
||
align-items: center;
|
||
border-bottom: 1px solid #E9E9E9;
|
||
}
|
||
.parameter__title p, .parameterName__title p, .testing__title p, .clientCode__title p, .errorList__title p{
|
||
font-size:16px;
|
||
font-family:PingFangSC-Medium,PingFang SC;
|
||
font-weight:500;
|
||
color:rgba(51,51,51,1);
|
||
}
|
||
.ui.red.table, .ui.green.table{
|
||
border-top: none!important;
|
||
margin-top: 20px!important;
|
||
border-bottom: none;
|
||
border-left: none;
|
||
border-right: none;
|
||
padding: 0 32px;
|
||
}
|
||
.ui.table:last-child tbody tr td,.ui.table:last-child thead tr th, .ui.green.table thead tr th, .ui.green.table tbody tr td{
|
||
border: none;
|
||
height: 53px;
|
||
}
|
||
.ui.table:last-child tbody tr,.ui.table:last-child thead tr, .ui.green.table thead tr th, .ui.green.table tbody tr td{
|
||
border-bottom: 1px solid #E9E9E9;
|
||
}
|
||
.ui.table:last-child thead tr th, .ui.green.table thead tr th{
|
||
font-size:14px;
|
||
font-family:PingFangSC-Medium,PingFang SC;
|
||
font-weight:500;
|
||
border-bottom: 1px solid #E9E9E9;
|
||
color:rgba(51,51,51,1);
|
||
}
|
||
.ui.table:last-child tbody tr td{
|
||
font-size:14px;
|
||
font-family:PingFangSC-Regular,PingFang SC;
|
||
font-weight:400;
|
||
color:rgba(102,102,102,1);
|
||
border-bottom: 1px solid #E9E9E9;
|
||
}
|
||
.signRed{
|
||
width:7px;
|
||
height:7px;
|
||
background:rgba(245,34,45,1);
|
||
display: inline-block;
|
||
border-radius: 50%;
|
||
margin-right: 7px;
|
||
}
|
||
.signGreen{
|
||
width:7px;
|
||
height:7px;
|
||
background:rgba(82,196,26,1);
|
||
display: inline-block;
|
||
border-radius: 50%;
|
||
margin-right: 7px;
|
||
}
|
||
/* 接口参数 e */
|
||
/* 客户示例 */
|
||
.ui.tab.active{
|
||
margin-top: 0!important;
|
||
box-shadow: none;
|
||
margin-bottom: 20px;
|
||
border: none;
|
||
padding-bottom: 20px!important;
|
||
}
|
||
pre{
|
||
margin-top: 0px;
|
||
}
|
||
/* 底部时间 */
|
||
.generatedTime{
|
||
display: flex;
|
||
height: 80px;
|
||
align-items: center;
|
||
justify-content: center!important;
|
||
}
|
||
.generatedTime small{
|
||
font-size:12px;
|
||
font-family:PingFangSC-Regular,PingFang SC;
|
||
font-weight:400;
|
||
color:rgba(153,153,153,1);
|
||
}
|
||
</style>
|
||
<!DOCTYPE html>
|
||
<html lang="en">
|
||
<!--
|
||
|
||
_____ _ _ _ _____
|
||
| __ \ | | | | /\ (_) | __ \
|
||
| |__) || |__ __ _ | | / \ _ __ _ | |__) |_ __ ___
|
||
| ___/ | '_ \ / _` || | / /\ \ | '_ \ | | | ___/| '__|/ _ \
|
||
| | | | | || (_| || | / ____ \ | |_) || | | | | | | (_) |
|
||
|_| |_| |_| \__,_||_|/_/ \_\| .__/ |_| |_| |_| \___/
|
||
| |
|
||
|_|
|
||
-->
|
||
|
||
<head>
|
||
<meta charset="utf-8">
|
||
<title> 生成发邮件二维码 - App.QrCode.Mailto - 接口大师 - 在线接口文档</title>
|
||
|
||
<link rel="stylesheet" href="https://cdn.bootcss.com/semantic-ui/2.2.2/semantic.min.css">
|
||
<link rel="stylesheet" href="https://cdn.bootcss.com/semantic-ui/2.2.2/components/table.min.css">
|
||
<link rel="stylesheet" href="https://cdn.bootcss.com/semantic-ui/2.2.2/components/container.min.css">
|
||
<link rel="stylesheet" href="https://cdn.bootcss.com/semantic-ui/2.2.2/components/message.min.css">
|
||
<link rel="stylesheet" href="https://cdn.bootcss.com/semantic-ui/2.2.2/components/label.min.css">
|
||
<link rel="icon" href="/favicon.ico" type="image/x-icon" />
|
||
|
||
<script src="/static/jquery.min.js"></script>
|
||
<script src="/static/jquery.cookie.min.js"></script>
|
||
</head>
|
||
|
||
<body>
|
||
<style>
|
||
.ui.fixed.menu{
|
||
height:70px;
|
||
background:linear-gradient(170deg,rgba(250,195,83,1) 0%,rgba(249,169,67,1) 100%);
|
||
box-shadow:0px 0px 40px 0px rgba(0,0,0,0.05);
|
||
}
|
||
.ui.message>:last-child{
|
||
display: flex;
|
||
justify-content: space-between;
|
||
width: 100%!important;
|
||
}
|
||
.ui.menu>.container, .ui.menu>.grid{
|
||
width:100%;
|
||
padding: 0 24px;
|
||
}
|
||
.ui.menu .item:before{
|
||
width:0px;
|
||
}
|
||
.contentList__logo{
|
||
width: 18%;
|
||
display: flex;
|
||
justify-content: center;
|
||
align-items: center;
|
||
}
|
||
.contentList__nav{
|
||
margin-left: 10%;
|
||
display: flex;
|
||
justify-content: center;
|
||
align-items: center;
|
||
height: 100%;
|
||
}
|
||
.nav__index{
|
||
position: relative;
|
||
}
|
||
.contentList__nav a{
|
||
height: 100%;
|
||
font-size:20px;
|
||
font-family:PingFangSC-Medium,PingFang SC;
|
||
font-weight:500;
|
||
color:rgba(51,51,51,1)!important;
|
||
padding-right: 0!important;
|
||
padding-left: 0!important;
|
||
margin-left: 20px;
|
||
margin-right: 20px;
|
||
/* transition: 2s; */
|
||
/* transform: 1s; */
|
||
}
|
||
/* .contentList__nav__i{
|
||
position: absolute;
|
||
bottom: 0;
|
||
display: none;
|
||
transition: .5s;
|
||
height: 5px;
|
||
width: 100px;
|
||
background: #333;
|
||
border-radius: 8px;
|
||
} */
|
||
.contentList__nav a:hover{
|
||
border-bottom: 5px solid #333;
|
||
}
|
||
/* .contentList__nav a:hover +.contentList__nav__i{
|
||
display: block;
|
||
} */
|
||
.ui.inverted.menu .dropdown.item:hover, .ui.inverted.menu .link.item:hover, .ui.inverted.menu a.item:hover, .ui.link.inverted.menu .item:hover{
|
||
background: none;
|
||
color: #333;
|
||
}
|
||
.ui.inverted.menu .active.item{
|
||
background: none!important;
|
||
color: #333!important;
|
||
}
|
||
.ui.inverted.menu .active.item:hover{
|
||
color: #333!important;
|
||
}
|
||
.logo{
|
||
object-fit: contain;
|
||
}
|
||
.register{
|
||
padding-right: 0!important;
|
||
}
|
||
</style>
|
||
<div class="ui fixed inverted menu black">
|
||
<div class="ui container contentList">
|
||
<div class="contentList__logo">
|
||
<a href="/docs.php" class="header item">
|
||
<img class="logo" alt="pro" src="/favicon.ico">
|
||
接口大师 </a>
|
||
</div>
|
||
<div class="contentList__nav">
|
||
<!-- <div class="contentList__nav__index">
|
||
<a href="/" class="item" class="nav__index">首页</a>
|
||
<span class="contentList__nav__i"></span>
|
||
</div> -->
|
||
<a href="/" class="item" class="nav__index">首页</a>
|
||
<a href="/docs.php" class="item">OpenAPI</a>
|
||
<a href="/platform" class="item">开放平台</a>
|
||
<a href="/wiki/" target="_blank" class="item">技术文档</a>
|
||
<a href="/admin/" target="_blank" class="item">管理后台</a>
|
||
</div>
|
||
|
||
|
||
|
||
<div class="right menu">
|
||
<div class="ui dropdown item" style="color: #333;">
|
||
语言 <i class="dropdown icon"></i>
|
||
<div class="menu">
|
||
<a class="item" href="/docs.php?language=zh_cn" >简体中文</a>
|
||
<a class="item" href="/docs.php?language=en" >English</a>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<!-- 欢迎/注册 -->
|
||
|
||
<div class="item register">
|
||
<div class="ui blue button"><a style="color:#fff;" href="/platform" target="_blank">登录</a></div>
|
||
|
||
<div class="ui green button"><a style="color:#fff;" href="/platform" target="_blank"><i class="user icon"></i>注册</a></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
|
||
<div class="row"></div>
|
||
|
||
<div class="ui text container" style="max-width: none !important;padding-top: 70px;">
|
||
<div class="ui floating message">
|
||
<div class="ui raised segment">
|
||
<!-- <span class="ui red ribbon label">
|
||
#接口文档 </span> -->
|
||
<div class="newDescTitle">
|
||
<div class="newDescTitle__box">
|
||
<p class="newDescTitle__box__nav">接口大师 / OpenAPI / <span style="color:#333;"> 生成发邮件二维码</span> </p>
|
||
<p class="ui header newDescTitle__box__t">
|
||
生成发邮件二维码 </p>
|
||
</div>
|
||
|
||
</div>
|
||
<div class="ui message newDesc">
|
||
<p class="newDesc__link">接口地址:http://localhost/public/api/app.php?s=App.QrCode.Mailto</p>
|
||
<p class="newDesc__desc">接口描述: 根据邮箱地址,生成后手机扫码后可直接进入邮件发送界面</p>
|
||
|
||
<div class="ui ordered steps">
|
||
<div class="completed step">
|
||
<div class="content">
|
||
<div class="description">HTTP/HTTPS</div>
|
||
<div class="title">请求协议</div>
|
||
</div>
|
||
</div>
|
||
<div class="completed step">
|
||
<div class="content">
|
||
<div class="description">GET/POST</div>
|
||
<div class="title">请求方式</div>
|
||
</div>
|
||
</div>
|
||
<div class="completed step">
|
||
<div class="content">
|
||
<div class="description">UTF-8</div>
|
||
<div class="title">编码格式</div>
|
||
</div>
|
||
</div>
|
||
<div class="completed step">
|
||
<div class="content">
|
||
<div class="description">JSON</div>
|
||
<div class="title">返回格式</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<!-- 接口参数 -->
|
||
<div class="parameter">
|
||
<div class="parameter__title">
|
||
<p>接口参数</p>
|
||
</div>
|
||
<table class="ui red celled striped table" >
|
||
<thead>
|
||
<tr><th>参数名字</th><th>类型</th><th>是否必须</th><th>默认值</th><th>其他</th><th>说明</th></tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr><td>level</td><td>枚举类型</td><td><span class="signGreen"></span><font color="#52C41A">可选</font></td><td>H</td><td>范围:L/M/Q/H</td><td>错误纠正级别,L为最小,H为最佳</td></tr>
|
||
<tr><td>size</td><td>整型</td><td><span class="signGreen"></span><font color="#52C41A">可选</font></td><td>6</td><td>最小:1;最大:10</td><td>二维码尺寸大小</td></tr>
|
||
<tr><td>output</td><td>布尔型</td><td><span class="signGreen"></span><font color="#52C41A">可选</font></td><td>true</td><td></td><td>是否直接显示二维码,否的话通过base64返回二维码数据</td></tr>
|
||
<tr><td>email</td><td>字符串</td><td><span class="signRed"></span><font color="red">必须</font></td><td>-</td><td></td><td>邮箱地址</td></tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<!-- 参数名字 -->
|
||
<div class="parameterName">
|
||
<div class="parameterName__title">
|
||
<p>返回字段</p>
|
||
</div>
|
||
<table class="ui green celled striped table" >
|
||
<thead>
|
||
<tr><th>返回结果</th><th>类型</th><th>说明</th></tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr><td>ret</td><td>整型</td><td>状态码,200表示成功,4xx表示客户端非法请求,5xx表示服务器错误</td></tr>
|
||
<tr><td>data</td><td>对象或混合类型</td><td>业务数据,由各自接口指定,通常为对象</td></tr>
|
||
<tr><td>msg</td><td>字符串</td><td>提示信息,失败时的错误提示</td></tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<!-- 在线测试 -->
|
||
<div class="testing">
|
||
<div class="testing__title">
|
||
<p>在线测试 </p>
|
||
</div>
|
||
<table class="ui green celled striped table" >
|
||
<thead>
|
||
<tr><th width="25%">参数</th><th width="10%">是否必须</th><th width="65%">值</th></tr>
|
||
</thead>
|
||
<tbody id="params">
|
||
<tr>
|
||
<td>service</td>
|
||
<td><span class="signRed"></span><font color="red">必须</font></td>
|
||
<td><div class="ui fluid input disabled"><input name="service" data-source="get" value="App.QrCode.Mailto" style="width:100%;" class="C_input" /></div></td>
|
||
</tr>
|
||
<tr>
|
||
<td>level</td>
|
||
<td><span class="signGreen"></span><font color="#52C41A">可选</font></td>
|
||
<td><div class="ui fluid input"><input name="level" id="level_ipt_id" value="H" data-source="" placeholder="错误纠正级别,L为最小,H为最佳" style="width:100%;" class="C_input" type="text" /> <select style="width: 30%;" id="level_select_ipt_id"><option value="">-- 请选择 --</option><option value="L">L</option><option value="M">M</option><option value="Q">Q</option><option value="H">H</option></select> </div></td>
|
||
</tr> <tr>
|
||
<td>size</td>
|
||
<td><span class="signGreen"></span><font color="#52C41A">可选</font></td>
|
||
<td><div class="ui fluid input"><input name="size" id="size_ipt_id" value="6" data-source="" placeholder="二维码尺寸大小" style="width:100%;" class="C_input" type="text" /> </div></td>
|
||
</tr> <tr>
|
||
<td>output</td>
|
||
<td><span class="signGreen"></span><font color="#52C41A">可选</font></td>
|
||
<td><div class="ui fluid input"><input name="output" id="output_ipt_id" value="1" data-source="" placeholder="是否直接显示二维码,否的话通过base64返回二维码数据" style="width:100%;" class="C_input" type="text" /> </div></td>
|
||
</tr> <tr>
|
||
<td>email</td>
|
||
<td><span class="signRed"></span><font color="red">必须</font></td>
|
||
<td><div class="ui fluid input"><input name="email" id="email_ipt_id" value="" data-source="" placeholder="邮箱地址" style="width:100%;" class="C_input" type="text" /> </div></td>
|
||
</tr> </tbody>
|
||
</table>
|
||
<div class="ui fluid action input">
|
||
<input placeholder="请求的接口链接" type="text" name="request_url" value="http://localhost/public/api/app.php" >
|
||
<button class="ui button green" id="submit" >请求当前接口</button>
|
||
</div>
|
||
</div>
|
||
|
||
<div style="display: flex;align-items:center;">
|
||
<!--<select name="request_type" style="font-size: 14px; padding: 2px;">
|
||
<option value="POST">POST</option>
|
||
<option value="GET">GET</option>
|
||
</select>-->
|
||
</div>
|
||
<div class="ui message blue" id="json_output">
|
||
</div>
|
||
<div class="ui message blue" id="json_output_api_result" style="overflow: auto;">
|
||
</div>
|
||
|
||
<script type="text/javascript">
|
||
$("#level_select_ipt_id").on('change', function(){
|
||
var p1=$(this).children('option:selected').val();//这就是selected的值
|
||
$("#level_ipt_id").val(p1);
|
||
});
|
||
</script>
|
||
<div class="clientCode">
|
||
<div class="clientCode__title">
|
||
<p>客户端请求示例</p>
|
||
</div>
|
||
|
||
</div>
|
||
|
||
|
||
|
||
|
||
<div class="ui tab segment active" data-tab="json">
|
||
<div class="ui top attached tabular menu">
|
||
<a class="active item" data-tab="datatabjson">HTTP通用示例</a>
|
||
</div>
|
||
|
||
<div class="ui bottom attached active tab segment" data-tab="datatabjson"><pre><code># 暂无示例,可添加示例文件:./src/view/docs/demos/App.QrCode.Mailto.json</code></pre></div>
|
||
</div>
|
||
|
||
<!-- 代码高亮 -->
|
||
<!--
|
||
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.13.1/styles/default.min.css">
|
||
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.13.1/highlight.min.js"></script>
|
||
-->
|
||
<link rel="stylesheet" href="./static/highlight.min.css">
|
||
<script src="./static/highlight.min.js"></script>
|
||
<script>hljs.initHighlightingOnLoad();</script>
|
||
<div class="errorList">
|
||
<div class="errorList__title">
|
||
<p id="ret_code_list_id">错误列表</p>
|
||
</div>
|
||
<table class="ui red celled striped table" >
|
||
<thead>
|
||
<tr><th>错误状态码</th><th>错误描述信息</th>
|
||
</thead>
|
||
<tbody><tr><td>400</td><td>表示客户端参数错误</td></tr><tr><td>404</td><td>表示接口服务不存在</td></tr><tr><td>500</td><td>表示服务端内部错误</td></tr> </tbody>
|
||
</table>
|
||
</div>
|
||
<!--
|
||
<div class="ui blue message">
|
||
<strong>温馨提示:</strong> 此接口文档根据接口代码和注释实时自动生成,帮助文档请见<a href="http://docs.phalapi.net/#/v2.0/api-docs" target="_blank">PhalApi 2.x 开发文档</a>。
|
||
</div>
|
||
-->
|
||
<p class="generatedTime"><small>本文档生成时间:2021-03-25 15:10:55</small></p>
|
||
</div>
|
||
|
||
</div>
|
||
|
||
<script src="https://cdn.bootcss.com/semantic-ui/2.2.2/semantic.min.js" ></script>
|
||
<script src="https://cdn.bootcss.com/semantic-ui/2.2.2/components/tab.js"></script>
|
||
|
||
<script type="text/javascript">
|
||
$(function(){
|
||
$("#json_output").hide();
|
||
$("#json_output_api_result").hide();
|
||
$("#submit").on("click",function(){
|
||
$("#json_output").html('<div class="ui active inverted dimmer"><div class="ui text loader">接口请求中……</div></div>');
|
||
$("#json_output").show();
|
||
$("#json_output_api_result").html('');
|
||
|
||
var data = getData();
|
||
var url_arr = $("input[name=request_url]").val().split('?');
|
||
var url = url_arr.shift();
|
||
var param = url_arr.join('?');
|
||
param = param.length > 0 ? param + '&' + data.param : data.param;
|
||
url = url + '?' + param;
|
||
$.ajax({
|
||
url: url,
|
||
type:'post',
|
||
data:data.data,
|
||
cache: false,
|
||
processData: false,
|
||
contentType: false,
|
||
success:function(res,status,xhr){
|
||
var statu = xhr.status + ' ' + xhr.statusText;
|
||
var header = xhr.getAllResponseHeaders();
|
||
var json_text = JSON.stringify(res, null, 4); // 缩进4个空格
|
||
$("#json_output").html('<pre>' + statu + '<br />' + header + '</pre>');
|
||
$("#json_output").show();
|
||
|
||
if (hljs) {
|
||
// var hightLightCode = hljs.highlightAuto(json_text);
|
||
var hightLightCode = hljs.highlight('json', json_text);
|
||
json_text = hightLightCode.value;
|
||
}
|
||
|
||
$("#json_output_api_result").html('<pre><code>' + json_text + '</code></pre>');
|
||
$("#json_output_api_result").show();
|
||
},
|
||
error:function(error){
|
||
$("#json_output").html('接口请求失败:' + error);
|
||
}
|
||
})
|
||
})
|
||
|
||
fillHistoryData();
|
||
|
||
//checkLastestVersion();
|
||
// 选项卡
|
||
$('.tabular.menu .item').tab();
|
||
|
||
$('.ui.dropdown').dropdown({
|
||
// you can use any ui transition
|
||
transition: 'drop'
|
||
});
|
||
})
|
||
|
||
|
||
function getData() {
|
||
var data = new FormData();
|
||
var param = [];
|
||
$("td input").each(function(index,e) {
|
||
if ($.trim(e.value)){
|
||
if (e.type != 'file'){
|
||
if ($(e).data('source') == 'get') {
|
||
param.push(e.name + '=' + e.value);
|
||
} else {
|
||
data.append(e.name, e.value);
|
||
}
|
||
|
||
if (e.name != "service") $.cookie(e.name, e.value, {expires: 30});
|
||
} else{
|
||
var files = e.files;
|
||
if (files.length == 1){
|
||
data.append(e.name, files[0]);
|
||
} else{
|
||
for (var i = 0; i < files.length; i++) {
|
||
data.append(e.name + '[]', files[i]);
|
||
}
|
||
}
|
||
}
|
||
}
|
||
});
|
||
param = param.join('&');
|
||
return {param:param, data:data};
|
||
}
|
||
|
||
// 填充历史数据
|
||
function fillHistoryData() {
|
||
$("td input").each(function(index,e) {
|
||
var cookie_value = $.cookie(e.name);
|
||
if (e.name != "service" && cookie_value !== undefined) {
|
||
e.value = cookie_value;
|
||
}
|
||
});
|
||
}
|
||
</script> |