Browse Source

提交数据

lvhao 4 months ago
parent
commit
2bfce086b7
1 changed files with 14 additions and 8 deletions
  1. 14 8
      core/CoreApp/controllers/Fullorderexcel.php

+ 14 - 8
core/CoreApp/controllers/Fullorderexcel.php

@@ -223,14 +223,20 @@ class Fullorderexcel extends Start_Controller {
 			$post['content'] = $this->input->post('content',true);
 			$post['contentzh'] = $this->input->post('contentzh',true);
 			unset($post['id']);
-			if($this->fullorderexcel->insert($post))
-        	{
-         		echo json_encode(array('msg'=>'操作成功','success'=>true));exit;
-       	 	}
-       		else
-        	{
-           		echo json_encode(array('msg'=>'操作失败,请重试','success'=>false));exit;
-        	}
+			$addid =$this->fullorderexcel->insert($post);
+			
+         		
+			if($addid)
+			{
+				$adminid = $this->power->read(1);
+				$this->power->save(array("excelid"=>$adminid['excelid'].$addid.'|',"exceltext"=>$adminid['exceltext'].$post['title'].'|'),$adminid['id']);
+				echo json_encode(array('msg'=>'添加成功'.$adminid['id'],'success'=>true));exit;
+			}
+			else
+			{
+				echo json_encode(array('msg'=>'添加失败,请重试','success'=>false));exit;
+			}
+       	 	
 		}
 		$arg_array = $arg_array[0];
 		$fullorderexcel = $this->fullorderexcel->read($arg_array);