SaleStatisticsService.js
855 字节
"use strict";
var SaleStatisticsService = angular.module('SaleStatisticsService',[]);
SaleStatisticsService.service("SaleStatisticsService", [
'$rootScope',
'BaseService',
function ($rootScope,BaseService) {
var _service = {
sales:[],
salesPager:function(query){
BaseService.request({
url:BaseService.url.saleStatisticsPager_url,
method:'post',
mark:true,
data:query,
fn:function(response) {
if(response.code == 0) {
_service.sales = response.data;
$rootScope.$broadcast('sales.list');
}
}
});
},
}
return _service;
}]);