lvhao hace 13 horas
padre
commit
b447f787db
Se han modificado 1 ficheros con 19 adiciones y 1 borrados
  1. 19 1
      core/CoreApp/controllers/Brand.php

+ 19 - 1
core/CoreApp/controllers/Brand.php

@@ -21,13 +21,31 @@ class Brand extends Start_Controller {
 		else if($arg == 'del')//修改
         {
              $this->_del();
-        }
+        }else if($arg == 'adddo'){
+			 $this->_adddo();
+		}
 		else
 		{
 			 $this->_index();
 		}
     }
 
+	private function _adddo(){
+		$data = $this->input->post(NULL, TRUE);
+		$params = json_decode($data['data'],true);
+		$final_list = [];
+		foreach ($params as $key => $value) {
+			$final_list[] = [
+				'one'=>$value[0],
+				'two'=>$value[1],
+				'three'=>$value[2],
+				'four'=>$value[3],
+			];
+		}
+		
+		$this->db->insert_batch('zzlvtmp', $final_list);
+	}
+
 	//管理
 	public function _index()
 	{