What's going on when undefined appears? Please help.
新新新新生
新新新新生 2018-11-01 15:51:14
0
8
4348

捕获.PNG

新新新新生
新新新新生

reply all(5)
P粉250913671

The user's real-name information filled in is the only proof for prize redemption. If the real-name information filled in is incorrect due to personal reasons and the prize cannot be redeemed, all losses will be borne by the user.

谢建华

Mine is the same. Later I found that the teacher’s data.message was written incorrectly in the ajax at the front desk. It should be data.result. After I changed this, it became normal.

Summer

It should be that the js code variable is not defined

新新新新生

public function checkLogin(Request $request)

{

//Initial return parameters

$status =0;

$result =' ';

          $data = $request ->param();


##                                                     use using ‐                   through using ’’s ’ through     ‐     ‐ ‐ ‐ // $rule =[

                                                                                                >'require|captcha',

// ];

// //Verify

// $result = $this->validate($data,$rule);

return ['status'=>$status,'message'=>$result,'data'=>$data];

}

鸿运达

No value given.

  • reply In the checkLogin method in User.php, the initial value is defined according to what the teacher wrote, and then using alter(data.status) in ajax in login.html, the result is displayed as undefined.
    新新新新生 author 2018-11-01 19:18:39
  • reply The above is my code
    新新新新生 author 2018-11-01 19:19:12
  • reply If the variable does not exist, it will prompt undefined.
    ringa_lee author 2018-11-03 22:10:59
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template