north 7 tahun lalu
induk
melakukan
03f74ac7bf

+ 3 - 3
www/protected/modules/j/controllers/HouseKeepingController.php

@@ -39,12 +39,12 @@ class HouseKeepingController extends JBaseController
         $c= new EMongoCriteria();
         $c->status('==',2);
         $tmp = Store::model()->findAll($c);
-
+        $i = 0;
         $data = array();
         foreach ($tmp as $k => $v) {
 
-            $data[$k]['store_id'] = $v->store_id;
-            $data[$k]['store_name'] = $v->store_name;
+            $data[$i]['store_id'] = $v->store_id;
+            $data[$i++]['store_name'] = $v->store_name;
         }
         echo json_encode($data);
     }