diff --git a/apollo-portal/src/main/resources/static/index.html b/apollo-portal/src/main/resources/static/index.html index 13eaceefe4f5e7161a185b58300baf1f0ec05a65..a61db7bcc7e8c968fc460ee44c0d4cc65c6bc462 100644 --- a/apollo-portal/src/main/resources/static/index.html +++ b/apollo-portal/src/main/resources/static/index.html @@ -93,27 +93,12 @@ diff --git a/apollo-portal/src/main/resources/static/scripts/controller/IndexController.js b/apollo-portal/src/main/resources/static/scripts/controller/IndexController.js index 46587e719ae89d180f3a95db929e1e92af0618e3..d36794967367792e2743943181ba3b2703152e09 100644 --- a/apollo-portal/src/main/resources/static/scripts/controller/IndexController.js +++ b/apollo-portal/src/main/resources/static/scripts/controller/IndexController.js @@ -8,7 +8,6 @@ function IndexController($scope, $window, toastr, AppUtil, AppService, UserServi $scope.getUserCreatedApps = getUserCreatedApps; $scope.getUserFavorites = getUserFavorites; - $scope.addFavorite = addFavorite; $scope.goToAppHomePage = goToAppHomePage; $scope.goToCreateAppPage = goToCreateAppPage; @@ -102,22 +101,6 @@ function IndexController($scope, $window, toastr, AppUtil, AppService, UserServi } - function addFavorite(appId) { - var favorite = { - userId: $scope.userId, - appId: appId - }; - - FavoriteService.addFavorite(favorite) - .then(function (result) { - $scope.favoriteId = result.id; - toastr.success("收藏成功"); - reload(); - }, function (result) { - toastr.error(AppUtil.errorMsg(result), "收藏失败"); - }) - }; - function goToCreateAppPage() { $window.location.href = "/app.html"; }