Why are you reporting such an error to me
[0] HttpException in App.php line 590
##Method does not exist: app\index\ controller\User->index()
The code is as follows:$(function () { $('#loginbtn').on('click', function (event) {
$.ajax({
type:'POST',//Set the request method to submit data
url:"{:url('ckeckLogin')}",//Set Data submission path
data:$('form').serialize(),//Serialize the form data and submit it
dataType:'json',
success:function (data) {//data It is a Map collection corresponding to the method return in PHP, passed in json format
});
);
#
轻微强迫症2018-05-24 20:52:10
Isn’t the url submitted to the checkLogin method in User.php? Why does the source code become the /index.php/index/user/checklogin.html file
你哟2018-03-07 12:41:24
It is correct to view the source code of the web page!
$(function () {
$('#loginbtn').on('click',function (event) {
$.ajax({
type:'POST',//Set the request method for submitting data
url:"/index.php/index/user/checklogin.html",//Set the data submission path
data:$('form').serialize(),//Serialize the form data and submit it
dataType:'json',
success:function (data)
});
})
})