the interface display is inconsistent with the response result.
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);