Quantcast
Channel: CNode:Node.js专业中文社区
Viewing all articles
Browse latest Browse all 14821

express测试时,为什么用postman能够正常登陆,浏览器ajax发送字段就不行

$
0
0

untitled1.png

浏览器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’; }; } });


Viewing all articles
Browse latest Browse all 14821

Trending Articles