SysConfigService.js
1.3 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
"use strict";
var SysConfigService = angular.module('SysConfigService',[]);
SysConfigService.service("SysConfigService", [
'$rootScope',
'BaseService',
function ($rootScope,BaseService) {
var _service = {
loanSysConfig:function() {
BaseService.request({
url:BaseService.url.sysConfig_gain_url,
method: 'post',
mark: true,
fn: function (response) {
_service.period = response.data;
$rootScope.$broadcast('sys.period');
}
});
},
updatePeriodConfiguration:function(val) {
BaseService.request({
url:BaseService.url.updatePeriodConfiguration_url,
method: 'post',
mark: true,
data:{type:0,content:val},
fn: function (response) {
if(response.code =="0"){
BaseService.updateAlert("修改成功");
window.location.reload();
}else{
BaseService.updateAlert(response.message);
}
}
});
}
};
return _service;
}
]);