The submission address I filled in is checkLogin, why is index submitted?
你哟
你哟 2018-03-07 12:26:33
0
4
1622

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
                    });
           );


#

你哟
你哟

reply all(2)
轻微强迫症

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

5GGMB$FM]VU3XA@%ZS~VK_S.jpg

你哟

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)

});

})

})


  • reply You can write the actual address in url: and then check whether the redirected url is correct?
    换个网名 author 2018-03-07 12:50:33
  • reply I have solved the problem, the submit button is not cleared
    你哟 author 2018-03-07 15:11:55
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template