$.ajax({ url: 'http://192.168.1.85:8080/api/System/Login', type: 'post', contentType: "application/json; charset=utf-8", dataType: 'json', data: JSON.stringify(loginData), success: function (data) { console.log(data.data); token = data.data; }, error: function (data) { console.log("error"); } });