yuxk2001 发表于 2022-10-23 20:10:05

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

以下是我的 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>




yuxk2001 发表于 2022-10-23 20:12:42

最多就返回200个成员的信息,返回值结尾是这样的:
"message": "",
"date": "2022-10-23 19:59:51",
"spent": 3,
"size": 200,
"count": 378,
"position": 0

论坛管理员 发表于 2022-10-24 10:14:55

您用的哪个接口?

yuxk2001 发表于 2022-10-24 16:15:23

http://192.168.200.99/x_organization_assemble_control/jest/index.html#
PersonAction (个人操作)
jaxrs/person/list/{flag}/next/{count}
我的 url 是: http://192.168.200.99/x_organization_assemble_control/jaxrs/person/list/(0)/next/999
最多返回200个,我一共录入了将近400人呢


论坛管理员 发表于 2022-10-25 09:33:25



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

页: [1]
查看完整版本: js遍历人员数量最大是200 这是哪里的问题呢?