Is the execution order of tp5 ajax access page different from that of URL access?

as shown in the figure, my Role controller inherits the Common controller

I perform permission verification in the initialization constructor in the Common controller. When asked to access Role/index directly in the browser, the verification is successful, but when I access Role/index with ajax, I do not perform validation, I directly execute the index method!

Why is this?

Mar.17,2021

Sorry, this is a rubbish problem! When I look back, it looks like I even hide my face.

return exits the execution of the function and returns to the call place of the function!

exit should be used

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-1e549eb-452ce.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-1e549eb-452ce.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?