AccountOrderCheckingDetailService.js
1.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
"use strict";
var AccountOrderCheckingDetailService = angular.module('AccountOrderCheckingDetailService',[]);
AccountOrderCheckingDetailService.service("AccountOrderCheckingDetailService", [
'$rootScope',
'BaseService',
function ($rootScope,BaseService) {
var _service = {
orders:[],
orderDetailBean:[],
//获取订单列表
orderPagerList:function(queryParam){
BaseService.request({
url:BaseService.url.accountOrderPager_url,
method:'post',
mark:true,
data:queryParam,
fn:function(response) {
if(response.code == 0) {
_service.orders = response.data;
$rootScope.$broadcast('orders.list');
}
}
});
},
//获取订单详情
orderDetail:function(orderCode){
BaseService.request({
url:BaseService.url.accountOrder_detail_url+orderCode,
method:'POST',
mark:true,
fn:function(response) {
if(response.code == 0) {
_service.orderDetailBean = response.data;
$rootScope.$broadcast('orders.detail');
}
}
});
},
//获取订单状态列表
statusList:function(){
BaseService.request({
url:BaseService.url.accountOrder_status_url,
method:'post',
mark:true,
fn:function(response) {
if(response.code == 0) {
_service.orderStatusList = response.data;
$rootScope.$broadcast('orders.orderStatusList');
}
}
});
},
};
return _service;
}]);