Files
OldPeopleHome/web/html/js/login.js
vickihe 7488fe6bb6 update
2019-09-09 21:07:51 +08:00

21 lines
657 B
JavaScript

function login(){
$.ajax({
url:'http://39.105.65.209:8080/admin/login',
type:'POST',
data:[{"account": "root"},{"password": "root"}],
success:function (data) {
// if(data){
// var jsonArray =typeof data=='string' ?JSON.parse(data):data;
// }
// console.log(jsonArray);
// $.each(jsonArray, function(i, n){
// console.log(jsonArray[i])
// });
// $('body').html(jsonArray[0]);
if(account=='root'&&password=='root')
$.open('html/firstPage.html');
}
});
}