|
|
@@ -37,29 +37,26 @@ define([ 'app/app' ], function(app) {
|
|
|
$scope.endDate = new Date(currentTime + 23 * 60 * 60 * 1000 + 59 * 60 * 1000 + 59 * 1000);
|
|
|
$scope.startFormatDate = _formatDate($scope.startDate, 'yyyy-MM-dd');
|
|
|
$scope.endFormatDate = _formatDate($scope.endDate, 'yyyy-MM-dd');
|
|
|
+ var addStartDate = new Date($scope.startDate.getTime() + 24 * 60 * 60 * 1000)
|
|
|
+ var addEndDate = new Date($scope.endDate.getTime() + 24 * 60 * 60 * 1000)
|
|
|
+ $scope.addStartFormatDate = _formatDate(addStartDate, 'yyyy-MM-dd');
|
|
|
+ $scope.addEndFormatDate = _formatDate(addEndDate, 'yyyy-MM-dd');
|
|
|
|
|
|
$scope.setFilters = function (type, val) {
|
|
|
$scope[type] = val;
|
|
|
if (type == 'dateArea') {
|
|
|
// 时间筛选
|
|
|
var currentTime = _getClearDay(new Date());
|
|
|
- console.log(currentTime, 'currentTime')
|
|
|
var endDate = new Date(currentTime + 23 * 60 * 60 * 1000 + 59 * 60 * 1000 + 59 * 1000);
|
|
|
if (val == 'oneMonth') {
|
|
|
$scope.startDate = new Date(currentTime - 30 * 24 * 60 * 60 * 1000 - 24 * 60 * 60 * 1000);
|
|
|
$scope.endDate = endDate;
|
|
|
- $scope.startFormatDate = _formatDate($scope.startDate, 'yyyy-MM-dd');
|
|
|
- $scope.endFormatDate = _formatDate($scope.endDate, 'yyyy-MM-dd');
|
|
|
} else if (val == 'threeMonth') {
|
|
|
$scope.startDate = new Date(currentTime - 3 * 30 * 24 * 60 * 60 * 1000 - 24 * 60 * 60 * 1000);
|
|
|
$scope.endDate = endDate;
|
|
|
- $scope.startFormatDate = _formatDate($scope.startDate, 'yyyy-MM-dd');
|
|
|
- $scope.endFormatDate = _formatDate($scope.endDate, 'yyyy-MM-dd');
|
|
|
} else if (val == 'sixMonth') {
|
|
|
$scope.startDate = new Date(currentTime - 6 * 30 * 24 * 60 * 60 * 1000 - 24 * 60 * 60 * 1000);
|
|
|
$scope.endDate = endDate;
|
|
|
- $scope.startFormatDate = _formatDate($scope.startDate, 'yyyy-MM-dd');
|
|
|
- $scope.endFormatDate = _formatDate($scope.endDate, 'yyyy-MM-dd');
|
|
|
}
|
|
|
}
|
|
|
if (val != 'autoMonth') {
|
|
|
@@ -128,7 +125,7 @@ define([ 'app/app' ], function(app) {
|
|
|
method: 'get',
|
|
|
dataType: 'json',
|
|
|
url: $scope.ssoUrl + '/api/userspace/inputTime/count/apps',
|
|
|
- params: {start: $scope.startFormatDate, end: $scope.endFormatDate, fromApps:'mall,b2b'}
|
|
|
+ params: {start: $scope.addStartFormatDate, end: $scope.addEndFormatDate, fromApps:'mall,b2b'}
|
|
|
}).success(function (data) {
|
|
|
$scope.newAddUserSpaceData = data.content
|
|
|
}).error(function () {
|
|
|
@@ -139,7 +136,7 @@ define([ 'app/app' ], function(app) {
|
|
|
method: 'get',
|
|
|
dataType: 'json',
|
|
|
url: $scope.ssoUrl + '/api/user/inputTime/count/apps',
|
|
|
- params: {start: $scope.startFormatDate, end: $scope.endFormatDate, fromApps:'mall,b2b'}
|
|
|
+ params: {start: $scope.addStartFormatDate, end: $scope.addEndFormatDate, fromApps:'mall,b2b'}
|
|
|
}).success(function (data) {
|
|
|
$scope.newAddUserData = data.content
|
|
|
}).error(function () {
|
|
|
@@ -150,7 +147,7 @@ define([ 'app/app' ], function(app) {
|
|
|
method: 'get',
|
|
|
dataType: 'json',
|
|
|
url: $scope.ssoUrl + '/api/user/count/notlgoin/month',
|
|
|
- params: {start: $scope.startFormatDate, end: $scope.endFormatDate, months: '6,12,24'}
|
|
|
+ params: {start: $scope.addStartFormatDate, end: $scope.addEndFormatDate, months: '6,12,24'}
|
|
|
}).success(function (data) {
|
|
|
$scope.monthLogoData = data
|
|
|
}).error(function () {
|
|
|
@@ -160,9 +157,14 @@ define([ 'app/app' ], function(app) {
|
|
|
toaster.pop('error', '获取运行环境失败');
|
|
|
});
|
|
|
};
|
|
|
-
|
|
|
// 获取不同时间阶段的相关数据
|
|
|
var initData = function () {
|
|
|
+ var addStartDate = new Date($scope.startDate.getTime() + 24 * 60 * 60 * 1000)
|
|
|
+ var addEndDate = new Date($scope.endDate.getTime() + 24 * 60 * 60 * 1000)
|
|
|
+ $scope.addStartFormatDate = _formatDate(addStartDate, 'yyyy-MM-dd');
|
|
|
+ $scope.addEndFormatDate = _formatDate(addEndDate, 'yyyy-MM-dd');
|
|
|
+ $scope.startFormatDate = _formatDate($scope.startDate, 'yyyy-MM-dd');
|
|
|
+ $scope.endFormatDate = _formatDate($scope.endDate, 'yyyy-MM-dd');
|
|
|
getDevOrProdData();
|
|
|
// 上传产品个数
|
|
|
Goods.getProductsCmp({fromDate: $scope.startDate.getTime(), toDate: $scope.endDate.getTime()}, function (data) {
|