Browse Source

Merge branch 'master' of https://github.com/linlinjava/litemall

Junling Bu 5 years ago
parent
commit
0b0f95f3bd

+ 4 - 2
litemall-wx-api/src/main/java/org/linlinjava/litemall/wx/web/WxCatalogController.java

@@ -63,7 +63,9 @@ public class WxCatalogController {
         if (id != null) {
             currentCategory = categoryService.findById(id);
         } else {
-            currentCategory = l1CatList.get(0);
+             if (l1CatList.size() > 0) {
+                currentCategory = l1CatList.get(0);
+            }
         }
 
         // 当前一级分类目录对应的二级分类目录
@@ -143,4 +145,4 @@ public class WxCatalogController {
         data.put("currentSubCategory", currentSubCategory);
         return ResponseUtil.ok(data);
     }
-}
+}