Browse Source

修改类目关注问题

shenjj 7 years ago
parent
commit
8d582fb437

+ 14 - 2
src/main/webapp/resources/js/vendor/controllers/forstore/purchasAttendtion_ctrl.js

@@ -92,9 +92,19 @@ define(['app/app'], function (app) {
                 }
               }
             }
-            ComputedAttendFn(_arr)
+            if (_arr.length === 0) {
+              toaster.pop('warnning', '警告', "未勾选任何条目");
+            } else {
+              ComputedAttendFn(_arr)
+            }
           }
-
+          document.onkeydown = function (ev) {
+            var onEvent = ev || event;
+            if (onEvent.keyCode === 13 && $scope.keyWord !== '' && $scope.keyWord.trim() !== '') {
+              $scope.seekPurchaseTableParams.page(1);
+              $scope.seekPurchaseTableParams.reload();
+            }
+          };
           // 批量关注或者 批量取消
           function ComputedAttendFn(arr) {
             if ($scope.Attend_tab === 'isAttend') {
@@ -102,6 +112,7 @@ define(['app/app'], function (app) {
                 if (data.success) {
                   $scope.seekPurchaseTableParams.page($scope.page);
                   $scope.seekPurchaseTableParams.reload();
+                  $scope.checkBoxAll = false
                   toaster.pop('success', '取消关注成功');
                 } else {
                   toaster.pop('error', data.message);
@@ -112,6 +123,7 @@ define(['app/app'], function (app) {
                 if (data.success) {
                   $scope.seekPurchaseTableParams.page($scope.page);
                   $scope.seekPurchaseTableParams.reload();
+                  $scope.checkBoxAll = false
                   toaster.pop('success', '关注成功');
                 } else {
                   toaster.pop('error', data.message);

+ 33 - 3
src/main/webapp/resources/view/vendor/forstore/purchasAttendtion.html

@@ -128,7 +128,29 @@
     /* margin-top: 5px; */
     padding-right: 22px
   }
-
+ .no-price{
+    width:100%;
+    height:150px;
+    display:inline-flex;
+    justify-content: center;
+    align-items: center;
+    background: white;
+  }
+ .no-price p{
+    padding-top:10px;
+    font-size: 14px;
+    color: #999;
+    margin-left:15px;
+    line-height: 28px;
+    width:140px;
+  }
+ .no-price p a{
+    color: #5078cb;
+    display: block;
+    background: url(static/img/all/icon_nianxian.jpg)no-repeat;
+    background-position: 0px 7px;
+    padding-left: 25px;
+  }
 
 </style>
 <div class="user_right fr seek-purchase">
@@ -169,7 +191,7 @@
           <th width="310">操作</th>
         </tr>
       </thead>
-      <tbody>
+      <tbody ng-if="totalElements > 0">
         <tr ng-repeat="item in AttendListData">
           <th ng-click="onCheckBoxOnce(item, $index)"><input type="checkbox" class="checkbox" ng-checked="item.checkBox === true"></th>
           <th>{{$index + 1}}</th>
@@ -178,7 +200,15 @@
         </tr>
       </tbody>
     </table>
-    <div class="record-line text-right ng-binding ng-scope" ng-if="currenctGoods.length != 0">显示 1-
+    <div class="no-price ng-scope" ng-if="totalElements === 0">
+      <img src="static/img/all/empty-cart.png">
+      <p>
+        暂无关注商机
+        <br>
+        <a ng-click="toggleAttend('isAttend')" >马上去逛一逛</a>
+      </p>
+    </div>
+    <div class="record-line text-right ng-binding ng-scope" ng-if="totalElements > 0">显示 1-
       <span ng-bind="endNumber" class="ng-binding">10</span>, 共: <span style="color: #5078cb;" class="ng-binding">{{totalElements}}</span> 个
     </div>
   </div>