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