The interface display is not consistent with the result of response.

the interface display is inconsistent with the response result.

,var_dump

where the red box is, response gets the correct data, but the interface is wrong.

printed in var_dump, different

frontend request:

<script>
    var investigationTaskId = "";
    function receiveMessage(event) {
        var origin = event.origin
        if (origin !== "http://localhost:8082")
            return;
        investigationTaskId = event.data;

        $.post("/member/project",{
            "investigationTaskId":investigationTaskId
        },function(result){})
    }
    $(function(){
        window.addEventListener("message", receiveMessage, false);
    })
</script>

backend receives and queries

$investigationTaskId = $_REQUEST["investigationTaskId"];
    $sql = "SELECT a.name ,COUNT(w.pk_works_main) AS num ,a.atlas_type,a.pk_atlas_main FROM ".$Base->table("atlasmain")." a LEFT JOIN ".$Base->table("worksmain")." w ON a.pk_atlas_main = w.pk_atlas_main WHERE a.investigationTaskId="".$investigationTaskId."" AND a.pk_user_main= ".$user["pk_user_main"]." GROUP BY a.pk_atlas_main ";
    var_dump($investigationTaskId);
    $result = $Db->query($sql);
    $tp->assign("atlas",$result);
Jul.20,2021

question of the first picture:

responseCSS

question of the second picture:

htmlNULLhtml

if it is not a request page, it is recommended that the data returned by the backend should be in json format. Other formats are not convenient for js to extract

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1bfd3eb-3234d.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1bfd3eb-3234d.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?