查看: 4497|回复: 4

js遍历人员数量最大是200 这是哪里的问题呢?

升级   0.58%

4

主题

10

回帖

58

积分

注册会员

Rank: 2

积分
58
发表于 2022-10-23 20:10:05 | 显示全部楼层 |阅读模式
以下是我的 jquery 程序:

<!DOCTYPE html>
<html>
<head>
    <meta charset='utf-8'>
    <meta http-equiv='X-UA-Compatible' content='IE=edge'>
    <title>Page Title</title>
    <meta name='viewport' content='width=device-width, initial-scale=1'>
    <link rel='stylesheet' type='text/css' media='screen' href='main.css'>
    <link rel="stylesheet" href="jquery.jsonview.css" />
    <script src='main.js'></script>
    <script src='jquery-3.6.1.min.js'></script>
    <script src="jquery.jsonview.min.js"></script>
    <script>      
        $(document).ready(function(){
            var myToken =null;
            var personJson = null;
            $(".p0").click(function(){
               
                var data = {
                    "credential" : "于小鲲",
                    "password" : "865851"
                }
                $.ajax({
                        type : 'POST',
                        dataType : 'json',
                        url : 'http://192.168.200.99/x_organization_assemble_authentication/jaxrs/authentication',
                        headers : {'x-debugger' : true},
                        contentType : 'application/json',
                        xhrFields : {'withCredentials' : true},
                        crossDomain : true,
                    data : JSON.stringify(data)
                }).always(function(resultJson) {
                        var myJson = JSON.stringify(resultJson, null, 4);
                        myToken = resultJson.data.token;
                        alert("登录成功 !!!");                       
                        //alert(resultJson.data.token);                       
                });
            });
            $(".p1").click(function(){               
                $.ajax({
                        type : 'GET',
                        dataType : 'json',
                        url : 'http://192.168.200.99/x_organization_assemble_control/jaxrs/person/list/(0)/next/999',
                        headers : {'x-debugger' : true, 'x-token':""+myToken},
                        contentType : 'application/json',
                        xhrFields : {'withCredentials' : true},                       
                        crossDomain : true,                        
                }).always(function(resultJson) {
                         personJson = resultJson;
                         alert("数据后取成功 !!!");
                         $("#json").JSONView(personJson);
                         alert(personJson.data.length);
                        //alert(JSON.stringify(resultJson, null, 4))
                });
            });
            $(".p2").click(function(){
                var data = {
                        "value" : "参数"
                    }

                    $.ajax({
                            type : 'PUT',
                            dataType : 'json',
                            url : 'http://192.168.200.99/x_organization_assemble_control/jaxrs/person/替换参数0/set/password',
                            headers : {'x-debugger' : true},
                            contentType : 'application/json',
                            xhrFields : {'withCredentials' : true},
                            crossDomain : true,
                        data : JSON.stringify(data)
                    }).always(function(resultJson) {
                            alert(JSON.stringify(resultJson, null, 4))
                    });
            });
        });     
    </script>   
</head>
<body>   
    <button class="p0">登录</button>
    <button class="p1">执行</button>  
    <button class="p1">替换</button>  
    <div id="json"></div>
</body>
</html>




本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

x
回复

使用道具 举报

升级   0.58%

4

主题

10

回帖

58

积分

注册会员

Rank: 2

积分
58
发表于 2022-10-23 20:12:42 | 显示全部楼层
最多就返回200个成员的信息,返回值结尾是这样的:
"message": "",
"date": "2022-10-23 19:59:51",
"spent": 3,
"size": 200,
"count": 378,
"position": 0
回复

使用道具 举报

升级   100%

139

主题

1万

回帖

4万

积分

超级版主

Rank: 8Rank: 8

积分
41458
发表于 2022-10-24 10:14:55 | 显示全部楼层
您用的哪个接口?
回复

使用道具 举报

升级   0.58%

4

主题

10

回帖

58

积分

注册会员

Rank: 2

积分
58
发表于 2022-10-24 16:15:23 | 显示全部楼层
http://192.168.200.99/x_organiza ... ol/jest/index.html#
PersonAction (个人操作)
jaxrs/person/list/{flag}/next/{count}
我的 url 是: http://192.168.200.99/x_organiza ... /jaxrs/person/list/(0)/next/999
最多返回200个,我一共录入了将近400人呢


回复

使用道具 举报

升级   100%

139

主题

1万

回帖

4万

积分

超级版主

Rank: 8Rank: 8

积分
41458
发表于 2022-10-25 09:33:25 | 显示全部楼层


分页是只能200,列示所有你可以这样

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

x
回复

使用道具 举报

发表回复

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

联系客服 关注微信 下载APP 返回顶部 返回列表
viewthread