今天改一個前端框架(angularjs,不兼容ie內核,須要修改),後臺框架是已經寫好了的,不用修改。前端
接口接收參數以下:vue
[HttpPost] public async Task<ScheduleEntity> QueryJob([FromBody]JobKey job) { return await scheduler.QueryJobAsync(job.Group, job.Name); }
前端框架由於是angularjs寫的封裝好了,改爲adminlte+vueangularjs
前端調用方法以下:ajax
var objBody={ name: that.name, group: that.group }; $.ajax({ type: "Post", url: "/api/Job/QueryJob", data: JSON.stringify(objBody), contentType: "application/json; charset=UTF-8", success: function (data) { that.model = data; }, beforeSend: function () { layer.load(); }, complete: function () { layer.closeAll('loading');} });