rabin 5 years ago
parent
commit
366ce11cc3
1 changed files with 9 additions and 3 deletions
  1. 9 3
      lib/Data.php

+ 9 - 3
lib/Data.php

@@ -36,11 +36,17 @@ class Data
             $time = time();
             $source_type = $this->config(Dever::input('source_type', 'h5'));
             foreach ($data as $k => $v) {
-                foreach ($v['data'] as $k1 => $v1) {
+                $child = $v['data'];
+                $v['data'] = array();
+                $i = 0;
+                foreach ($child as $k1 => $v1) {
                     if ($v1['type'] == 2 && ($time < $v1['sdate'] || $time > $v1['edate'])) {
-                        unset($data[$k]['data'][$k1]);
+                        //unset($data[$k]['data'][$k1]);
                     } elseif ($v1['system'] > 0 && $source_type != $v1['system']) {
-                        unset($data[$k]['data'][$k1]);
+                        //unset($data[$k]['data'][$k1]);
+                    } else {
+                        $v['data'][$i] = $v1;
+                        $i++;
                     }
                 }
             }