dever 6 years ago
parent
commit
3329cd7f50
1 changed files with 10 additions and 0 deletions
  1. 10 0
      h5/src/View.php

+ 10 - 0
h5/src/View.php

@@ -62,6 +62,16 @@ class View extends Core
                 unset($data['relation'][3]);
             }
 
+            if (isset($data['comment'])) {
+                $comment = $data['comment'];
+                $data['comment'] = array();
+                foreach ($comment as $k => $v) {
+                    if ($k <= 2) {
+                        $data['comment'][$k] = $v;
+                    }
+                }
+            }
+
             return Dever::render($template, $data);
         } else {
             Dever::alert('错误的数据');