前后端简单的接口测试

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <script src="https://cdn.bootcss.com/jquery/1.11.1-beta1/jquery.js"></script>
</head>
<body>
    <script>
        var host = "http://test.idata3d.com:18080";
 
        var data = {
            username: "user",
            password: "user"
        };
         
        $.ajax({
            url: host+"/login",
            type: "post",
            data:$.param(data),
            contentType: "application/x-www-form-urlencoded;charset=utf-8;",
            async:true
        })
 
        var param = {
            groupList:['北汽'],
            brandList:[],
            seriesList:[],
            carTypeList:[],
            carSegmentList:[],
            carSubSegmentList:[],
            luxuryList:[],
            energyList:[]
        };
        $.ajax({
            url: host+"/market/showSelectOption",
            type: "post",
            data:param,
            success: function(data){
                debugger;
            },
            error: function(data){
                debugger;
            }
        })
    </script>
</body>
</html>

  

posted @   飘然离去  阅读(454)  评论(0编辑  收藏  举报
点击右上角即可分享
微信分享提示