浏览器ajax $.ajax({ type: “post”, url: “http://localhost:3000/user/login”, ContentType: “application/json; charset=utf-8”, data:json1, success: function(data:any){ console.log(json1); if(data.code==‘1’){ console.log(data); alert(‘手机或密码错误’) }else if(data.username){ location.href=’/p’; }; } });
↧