我正在使用ajax请求来显示一些信息,在我的本地开发版本上它可以正常工作,但是在生产服务器(Ubuntu 16.04 LEMP)上,由于请求中没有数据,因此验证失败。
检查
我无法弄清楚为什么这种情况会在生产环境中发生,但在本地版本中却不存在...非常感谢您提供任何线索!
public static DataTable RunAdvancedSearch(string[] searchFolders, string[] searchCriteria)
{
//Get Outlook namespace
var oApp = Globals.ThisAddIn.Application;
var oNS = oApp.GetNamespace("mapi");
Microsoft.Office.Interop.Outlook.Search advSearch = null;
//Do other stuff to properly set up the scope and filter
//...
//Perform search
SearchComplete = false;
try
{
advSearch = oApp.AdvancedSearch(scope, filter, false, "Archiver Search");
}
catch (System.Exception ex)
{
MessageBox.Show("An error has occurred during the search for emails. \n \n"
+ ex.Message);
}
}
public DataTable BuildResults(Results searchResults)
{
DataTable resultTable = new DataTable();
//Do stuff to build DataTable from search results
//...
return resultTable;
}
<script>
(function ($) {
$(document).ready(function() {
$(".team-pic").off("click").on("click", function() {
var employeeId = $(this).data('id');
// Get data
$.ajax({
type: "GET",
url: "employeeInfo",
data: {employeeId:employeeId},
success: function(data){
var obj=$.parseJSON(data);
$('#team-info-title').html(obj.output_name);
$('#team-info-subtitle').html(obj.output_role);
$('#resume').html(obj.output_resume);
$('#linkedin').html(obj.output_linkedin);
$("#team-info-background").show();
$("#team-info").show();
}
});
});
});
}(jQuery));
</script>
Route::get('/employeeInfo', 'EmployeeController@getInfo');
答案 0 :(得分:0)
如果要传递获取数据employeeId,则必须通过路由传递数据段,否则应通过POST方法传递数据。
Route::get('/employeeInfo/{slug}', 'EmployeeController@getInfo');
然后在控制器上获取功能。
public function getInfo($employeeId)