Files
phalapi-pro/public/docs/Admin.ApiDesign.UpdateApiDesign.html
2022-03-21 11:16:38 +08:00

659 lines
29 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<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> 更新接口设计 - Admin.ApiDesign.UpdateApiDesign - 接口大师 - 在线接口文档</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>
&nbsp;
<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">接口大师 / 后台接口 / <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/admin.php?s=Admin.ApiDesign.UpdateApiDesign</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>access_token</td><td>字符串</td><td><span class="signGreen"></span><font color="#52C41A">可选</font></td><td></td><td></td><td>访问令牌仅当开启签名验证时需要传递生成令牌可使用App.Auth.ApplyToken接口</td></tr>
<tr><td>id</td><td>整型</td><td><span class="signRed"></span><font color="red">必须</font></td><td>-</td><td></td><td>要更新的id</td></tr>
<tr><td>api_name</td><td>字符串</td><td><span class="signGreen"></span><font color="#52C41A">可选</font></td><td>-</td><td>最大100</td><td>接口服务名称必须以App开头</td></tr>
<tr><td>api_modules</td><td>字符串</td><td><span class="signGreen"></span><font color="#52C41A">可选</font></td><td>-</td><td></td><td>接口模块名称</td></tr>
<tr><td>api_title</td><td>字符串</td><td><span class="signGreen"></span><font color="#52C41A">可选</font></td><td>-</td><td></td><td>接口服务名称</td></tr>
<tr><td>api_desc</td><td>字符串</td><td><span class="signGreen"></span><font color="#52C41A">可选</font></td><td>-</td><td></td><td>接口服务描述</td></tr>
<tr><td>api_request_params</td><td>字符串</td><td><span class="signGreen"></span><font color="#52C41A">可选</font></td><td>-</td><td></td><td>接口请求参数所有的参数传递json字符串
<br>请求的参数key分别对应name:参数名称(英文), type:类型, desc:参数说明, require:必须(true或者false), default:默认值, max:最大值, min:最小值。当为空时填null。
<br>示例: [{"name":"yesapi","type":"string","require":true,"default":"phalapi","min":1,"max":100,"desc":"描述"},{"name":"age","type":"int","require":false,"default":"1","min":0,"max":100,"desc":"年龄"}]
<br>更多详细规则参考:<a href="http://docs.phalapi.net/#/v2.0/api-params" target="_blank">接口参数规则</a></td></tr>
<tr><td>api_response_params</td><td>字符串</td><td><span class="signGreen"></span><font color="#52C41A">可选</font></td><td>-</td><td></td><td>接口返回参数所有的参数传递json字符串请求的参数key分别对应<br>
name:返回字段名称(英文), type:返回字段类型, desc:返回字段说明。 type的值可能为stringintfloatboolarrayobjectdate
示例: [{"name":"yesapi","type":"string","desc":"描述"},{"name":"age","type":"int","desc":"年龄"}]</td></tr>
<tr><td>api_response_example</td><td>字符串</td><td><span class="signGreen"></span><font color="#52C41A">可选</font></td><td>-</td><td></td><td>接口返回示例(json)</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>data.isUpdate</td><td>bool</td><td>是否更新成功true表示更新成功false无更新</td></tr><tr><td>data.msg</td><td>字符串</td><td>更新信息</td></tr><tr><td>data.time</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>在线测试 &nbsp;&nbsp;</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="Admin.ApiDesign.UpdateApiDesign" style="width:100%;" class="C_input" /></div></td>
</tr>
<tr>
<td>access_token</td>
<td><span class="signGreen"></span><font color="#52C41A">可选</font></td>
<td><div class="ui fluid input"><input name="access_token" id="access_token_ipt_id" value="" data-source="" placeholder="访问令牌仅当开启签名验证时需要传递生成令牌可使用App.Auth.ApplyToken接口" style="width:100%;" class="C_input" type="text" /> </div></td>
</tr> <tr>
<td>id</td>
<td><span class="signRed"></span><font color="red">必须</font></td>
<td><div class="ui fluid input"><input name="id" id="id_ipt_id" value="" data-source="" placeholder="要更新的id" style="width:100%;" class="C_input" type="text" /> </div></td>
</tr> <tr>
<td>api_name</td>
<td><span class="signGreen"></span><font color="#52C41A">可选</font></td>
<td><div class="ui fluid input"><input name="api_name" id="api_name_ipt_id" value="" data-source="" placeholder="接口服务名称必须以App开头" style="width:100%;" class="C_input" type="text" /> </div></td>
</tr> <tr>
<td>api_modules</td>
<td><span class="signGreen"></span><font color="#52C41A">可选</font></td>
<td><div class="ui fluid input"><input name="api_modules" id="api_modules_ipt_id" value="" data-source="" placeholder="接口模块名称" style="width:100%;" class="C_input" type="text" /> </div></td>
</tr> <tr>
<td>api_title</td>
<td><span class="signGreen"></span><font color="#52C41A">可选</font></td>
<td><div class="ui fluid input"><input name="api_title" id="api_title_ipt_id" value="" data-source="" placeholder="接口服务名称" style="width:100%;" class="C_input" type="text" /> </div></td>
</tr> <tr>
<td>api_desc</td>
<td><span class="signGreen"></span><font color="#52C41A">可选</font></td>
<td><div class="ui fluid input"><input name="api_desc" id="api_desc_ipt_id" value="" data-source="" placeholder="接口服务描述" style="width:100%;" class="C_input" type="text" /> </div></td>
</tr> <tr>
<td>api_request_params</td>
<td><span class="signGreen"></span><font color="#52C41A">可选</font></td>
<td><div class="ui fluid input"><input name="api_request_params" id="api_request_params_ipt_id" value="" data-source="" placeholder="接口请求参数所有的参数传递json字符串
&lt;br&gt;请求的参数key分别对应name:参数名称(英文), type:类型, desc:参数说明, require:必须(true或者false), default:默认值, max:最大值, min:最小值。当为空时填null。
&lt;br&gt;示例: [{&quot;name&quot;:&quot;yesapi&quot;,&quot;type&quot;:&quot;string&quot;,&quot;require&quot;:true,&quot;default&quot;:&quot;phalapi&quot;,&quot;min&quot;:1,&quot;max&quot;:100,&quot;desc&quot;:&quot;描述&quot;},{&quot;name&quot;:&quot;age&quot;,&quot;type&quot;:&quot;int&quot;,&quot;require&quot;:false,&quot;default&quot;:&quot;1&quot;,&quot;min&quot;:0,&quot;max&quot;:100,&quot;desc&quot;:&quot;年龄&quot;}]
&lt;br&gt;更多详细规则参考:&lt;a href=&quot;http://docs.phalapi.net/#/v2.0/api-params&quot; target=&quot;_blank&quot;&gt;接口参数规则&lt;/a&gt;" style="width:100%;" class="C_input" type="text" /> </div></td>
</tr> <tr>
<td>api_response_params</td>
<td><span class="signGreen"></span><font color="#52C41A">可选</font></td>
<td><div class="ui fluid input"><input name="api_response_params" id="api_response_params_ipt_id" value="" data-source="" placeholder="接口返回参数所有的参数传递json字符串请求的参数key分别对应&lt;br&gt;
name:返回字段名称(英文), type:返回字段类型, desc:返回字段说明。 type的值可能为stringintfloatboolarrayobjectdate
示例: [{&quot;name&quot;:&quot;yesapi&quot;,&quot;type&quot;:&quot;string&quot;,&quot;desc&quot;:&quot;描述&quot;},{&quot;name&quot;:&quot;age&quot;,&quot;type&quot;:&quot;int&quot;,&quot;desc&quot;:&quot;年龄&quot;}]" style="width:100%;" class="C_input" type="text" /> </div></td>
</tr> <tr>
<td>api_response_example</td>
<td><span class="signGreen"></span><font color="#52C41A">可选</font></td>
<td><div class="ui fluid input"><input name="api_response_example" id="api_response_example_ipt_id" value="" data-source="" placeholder="接口返回示例(json)" 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/admin.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>
<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/Admin.ApiDesign.UpdateApiDesign.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>ret=400客户端参数错误或非法请求</td></tr><tr><td>404</td><td>表示接口服务不存在</td></tr><tr><td>406</td><td>ret=406access_token令牌校验不通过</td></tr><tr><td>407</td><td>ret=407app_key权限不足或未知应用</td></tr><tr><td>408</td><td>ret=408当前用户禁止使用或用户未登录</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>