Browse Source

买家中心推荐器件

yangc 7 years ago
parent
commit
96166407d4

+ 1 - 0
src/main/webapp/resources/js/common/query/recommendation.js

@@ -18,6 +18,7 @@ define(['ngResource'], function () {
          getRecommendComps: {
              url: 'recommendation/comps',
              method: 'GET',
+             isArray: true
          }
 
       })

+ 5 - 5
src/main/webapp/resources/js/usercenter/controllers/forstore/buyer_home_ctrl.js

@@ -7,14 +7,14 @@ define(['app/app', 'calendar'], function(app) {
         $rootScope.active = 'home';
         document.title='买家中心-优软商城';
         $scope.userInfo = $rootScope.userInfo;
-        var getRecommendComps = function (userUU, usedFor, pageable) {
-            Recommendation.getRecommendComps({page: pageable.page, size: pageable.size}, function (data) {
-                $scope.recommendComps = data.content;
+        var getRecommendComps = function () {
+            Recommendation.getRecommendComps([], function (data) {
+                $scope.recommendComps = data;
             }, function (error) {
                 toaster.pop('error', '获取推荐器件失败', error);
-            })
+            });
         };
-        getRecommendComps(null, null, {page: 0, size: 12});
+        getRecommendComps();
 
         //安全设置提醒框
       // $scope.openHomeCenterModel = function() {