Last active
January 20, 2019 13:04
-
-
Save ZhenDeng/bac5c812692a679b9d7e969597d07c7f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.ajax({ | |
url: '/Account/Login', | |
type: 'POST', | |
contentType: 'application/json; charset=utf-8', | |
data: JSON.stringify(loginInfo), | |
dataType: 'json', | |
success: function (output) { | |
if (output.Status == 'fail') { | |
hideProgress(); | |
$('#btnLogin').hideProgress(); | |
$('#btnLogin').showValidator(output.Message, 'error', msgPosition, true); | |
$('#btnLogin').html(loginText); | |
} | |
else { | |
$('#btnLogin').html('Authenticated'); | |
if (window.location.search.substr(0, 11) == '?ReturnUrl=') { | |
window.location = decodeURIComponent(window.location.search.slice(11)); | |
} | |
else | |
window.location.reload(); | |
} | |
}, | |
error: function (request, status, error) { | |
hideProgress(); | |
$('#btnLogin').hideProgress(); | |
$('#btnLogin').html(loginText); | |
$('#btnLogin').showValidator(error, 'error', msgPosition, true); | |
} | |
}); | |
$.ajax({ | |
type: "GET", | |
url: 'api/Checkout/GetPartnerByMPNId?mpnId=' + mpnId, | |
async: false, | |
success: function (data) { | |
if (data.result != 'Success') { | |
$('#tenant_next').showValidator(data.info, 'error'); | |
isValid = false; | |
} | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment