|
|
@@ -1,73 +0,0 @@
|
|
|
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
|
-<html xmlns="http://www.w3.org/1999/xhtml">
|
|
|
-<head>
|
|
|
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
|
|
- <title>测试接口</title>
|
|
|
- <script type="text/javascript" src="js/jquery.1.9.1.min.js"></script>
|
|
|
- <script type="text/javascript" src="js/func.common.js"></script>
|
|
|
- <script type="text/javascript" src="js/func.js"></script>
|
|
|
- <script type="text/javascript" src="js/jquery.md5.js">//$.md5()</script>
|
|
|
- <script type="text/javascript" src="js/jquery.base64.js">//$.base64.encode()</script>
|
|
|
- <script src="js/c.js" type="text/javascript"></script>
|
|
|
- <script src="js/urchin.js" type="text/javascript"></script>
|
|
|
- <link href="css/s.css" type="text/css" rel="stylesheet">
|
|
|
- <link href="css/base.css" type="text/css" rel="stylesheet">
|
|
|
- <script type="text/javascript">
|
|
|
- $(function(){
|
|
|
- $('#btn').click(function(){
|
|
|
- var method = $('input[name="method"]').val();
|
|
|
- var timestamp = $('input[name="timestamp"]').val();
|
|
|
- var sign = $.md5(method+timestamp);
|
|
|
- $('#sign').val(sign);
|
|
|
- $.ajax({
|
|
|
- type : 'GET',
|
|
|
- data : {
|
|
|
- 'method' :method,
|
|
|
- 'timestamp' :timestamp,
|
|
|
- 'sign' : sign
|
|
|
- },
|
|
|
- url : "../api.php",
|
|
|
- beforeSend : function(data){
|
|
|
-
|
|
|
- $('#Canvas').html('<p>请求处理中...</p>');
|
|
|
- },
|
|
|
- success : function(data){
|
|
|
- Process(data);
|
|
|
- },
|
|
|
- error : function(request, errtext, e){
|
|
|
- $('#Canvas').html('<p><b>发生错误</b></p><p>'+request.status+'<br/>'+errtext+'</p>');
|
|
|
- }
|
|
|
- });
|
|
|
- });
|
|
|
- });
|
|
|
- </script>
|
|
|
-</head>
|
|
|
-<body>
|
|
|
-<div id="head"><p>测试接口</p></div>
|
|
|
-<div id="content">
|
|
|
- <div id="left">
|
|
|
- <div class ="message"><p>接口返回:</p></div>
|
|
|
- <div id="Canvas" class="Canvas"></div>
|
|
|
- </div>
|
|
|
- <div id="right">
|
|
|
- <div class ="message"><p>请求数据:</p></div>
|
|
|
- <form>
|
|
|
- <p>
|
|
|
- <span>method:</span>
|
|
|
- <input type="text" class="input-text" name="method" value="index_list"/>
|
|
|
- </p>
|
|
|
-
|
|
|
- <p>
|
|
|
- <span>timestamp:</span>
|
|
|
- <input type="text" class="input-text" name="timestamp" value="11111111"/>
|
|
|
- </p>
|
|
|
-
|
|
|
- <p><span>校验码:</span><input type="text" class="input-text" id="sign" readonly/></p>
|
|
|
- <p><button class="button success small" id="btn" type="button">发送请求</button></p>
|
|
|
- </form>
|
|
|
- </div>
|
|
|
-</div>
|
|
|
-
|
|
|
-
|
|
|
-</body>
|
|
|
-</html>
|