(function(){ var serviceNamespace = abp.utils.createNamespace(abp, 'services.front.newsFrontend'); serviceNamespace.getNews = function(id, ajaxParams) { return abp.ajax($.extend({ url: abp.appPath + 'api/services/front/newsFrontend/GetNews' + abp.utils.buildQueryString([{ name: 'id', value: id }]) + '', type: 'POST', data: JSON.stringify({}) }, ajaxParams)); }; serviceNamespace.getNewsListAsync = function(input, ajaxParams) { return abp.ajax($.extend({ url: abp.appPath + 'api/services/front/newsFrontend/GetNewsListAsync', type: 'POST', data: JSON.stringify(input) }, ajaxParams)); }; serviceNamespace.getTopNewsListAsync = function(kind, top, ajaxParams) { return abp.ajax($.extend({ url: abp.appPath + 'api/services/front/newsFrontend/GetTopNewsListAsync' + abp.utils.buildQueryString([{ name: 'kind', value: kind }, { name: 'top', value: top }]) + '', type: 'POST', data: JSON.stringify({}) }, ajaxParams)); }; serviceNamespace.loadPreAndNext = function(news, ajaxParams) { return abp.ajax($.extend({ url: abp.appPath + 'api/services/front/newsFrontend/LoadPreAndNext', type: 'POST', data: JSON.stringify(news) }, ajaxParams)); }; serviceNamespace.getTopNewsIndexListAsync = function(kind, top, ajaxParams) { return abp.ajax($.extend({ url: abp.appPath + 'api/services/front/newsFrontend/GetTopNewsIndexListAsync' + abp.utils.buildQueryString([{ name: 'kind', value: kind }, { name: 'top', value: top }]) + '', type: 'POST', data: JSON.stringify({}) }, ajaxParams)); }; serviceNamespace.getAllNewsListAsync = function(kind, ajaxParams) { return abp.ajax($.extend({ url: abp.appPath + 'api/services/front/newsFrontend/GetAllNewsListAsync' + abp.utils.buildQueryString([{ name: 'kind', value: kind }]) + '', type: 'POST', data: JSON.stringify({}) }, ajaxParams)); }; serviceNamespace.getAllNewsPicurlListAsync = function(iD, top, ajaxParams) { return abp.ajax($.extend({ url: abp.appPath + 'api/services/front/newsFrontend/GetAllNewsPicurlListAsync' + abp.utils.buildQueryString([{ name: 'iD', value: iD }, { name: 'top', value: top }]) + '', type: 'POST', data: JSON.stringify({}) }, ajaxParams)); }; serviceNamespace.getFistNewsListAsync = function(kind, ajaxParams) { return abp.ajax($.extend({ url: abp.appPath + 'api/services/front/newsFrontend/GetFistNewsListAsync' + abp.utils.buildQueryString([{ name: 'kind', value: kind }]) + '', type: 'POST', data: JSON.stringify({}) }, ajaxParams)); }; serviceNamespace.updateNewsHitAsync = function(input, ajaxParams) { return abp.ajax($.extend({ url: abp.appPath + 'api/services/front/newsFrontend/UpdateNewsHitAsync', type: 'POST', data: JSON.stringify(input) }, ajaxParams)); }; serviceNamespace.getTNewsListAsync = function(input, ajaxParams) { return abp.ajax($.extend({ url: abp.appPath + 'api/services/front/newsFrontend/GetTNewsListAsync', type: 'POST', data: JSON.stringify(input) }, ajaxParams)); }; serviceNamespace.getSearchNewsListAsync = function(input, ajaxParams) { return abp.ajax($.extend({ url: abp.appPath + 'api/services/front/newsFrontend/GetSearchNewsListAsync', type: 'POST', data: JSON.stringify(input) }, ajaxParams)); }; if(typeof define === 'function' && define.amd){ define(function (require, exports, module) { return { 'getNews' : serviceNamespace.getNews, 'getNewsListAsync' : serviceNamespace.getNewsListAsync, 'getTopNewsListAsync' : serviceNamespace.getTopNewsListAsync, 'loadPreAndNext' : serviceNamespace.loadPreAndNext, 'getTopNewsIndexListAsync' : serviceNamespace.getTopNewsIndexListAsync, 'getAllNewsListAsync' : serviceNamespace.getAllNewsListAsync, 'getAllNewsPicurlListAsync' : serviceNamespace.getAllNewsPicurlListAsync, 'getFistNewsListAsync' : serviceNamespace.getFistNewsListAsync, 'updateNewsHitAsync' : serviceNamespace.updateNewsHitAsync, 'getTNewsListAsync' : serviceNamespace.getTNewsListAsync, 'getSearchNewsListAsync' : serviceNamespace.getSearchNewsListAsync }; }); } })();
链接链接链接链接链接链接链接链接