前台页面中,model转json:
var Accounts = @(Html.MvcJson(Model.Accounts.Select(a => new {
AccountId = a.AccountId,
AccountName = a.AccountName,
CustomerId = a.CustomerId,
FullName = a.FullName
})));
json失败&&session获取失败&&登陆超时
.fail(function (jqXHR, error, errorThrown) {
if (jqXHR.status == 0 || jqXHR.status == 401) {
window.top.location = logoutUrl;
}
else {
showAlert("获取Campaign失败!" + "
" + jqXHR + "
" + error + "
" + errorThrown + "
");
return false;
}
});