|
|
|
@ -128,15 +128,20 @@ define(['angular', 'static/commons/commons', 'static/commons/angular-ueditor', '
|
|
|
|
|
$http.get('/analysis/customers/ranking/'+$scope.params.openid_type, {params: params}).then(function (resp) {
|
|
|
|
|
$scope.customer_loading = false;
|
|
|
|
|
$scope.customers = resp.data.data;
|
|
|
|
|
$scope.checkoutCustomer($scope.customers[0]);
|
|
|
|
|
$scope.generatorEcharts($scope.customers[0].customer_id);
|
|
|
|
|
$scope.customers_type = resp.data.openid_type;
|
|
|
|
|
$scope.pagination = resp.data.pagination;
|
|
|
|
|
if($scope.customers.length>0){
|
|
|
|
|
$scope.order_params.customer_id = $scope.customers[0].customer_id;
|
|
|
|
|
$scope.customer_loading = false;
|
|
|
|
|
$scope.listCustomerOrders(1);
|
|
|
|
|
}else{
|
|
|
|
|
$scope.checkoutCustomer($scope.customers[0]);
|
|
|
|
|
$scope.generatorEcharts($scope.customers[0].customer_id);
|
|
|
|
|
$scope.customers_type = resp.data.openid_type;
|
|
|
|
|
$scope.pagination = resp.data.pagination;
|
|
|
|
|
if($scope.customers.length>0){
|
|
|
|
|
$scope.order_params.customer_id = $scope.customers[0].customer_id;
|
|
|
|
|
$scope.customer_loading = false;
|
|
|
|
|
$scope.listCustomerOrders(1);
|
|
|
|
|
}else{
|
|
|
|
|
$scope.orders=[];
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else{
|
|
|
|
|
$scope.orders=[];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|