xieruidong 2 gadi atpakaļ
vecāks
revīzija
6bd1521239
1 mainītis faili ar 12 papildinājumiem un 1 dzēšanām
  1. 12 1
      application/admin/controller/Goods.php

+ 12 - 1
application/admin/controller/Goods.php

@@ -78,7 +78,18 @@ class Goods extends Backend
         if($this->request->isGet()){
             return $this->fetch();
         }else{
-            $data=$this->makeAdd();
+            $this->makeAdd();
+        }
+    }
+
+    public function edit($ids = null)
+    {
+        if($this->request->isGet()){
+            $row=$this->model->findOrFail($ids);
+            $this->assign('row',$row);
+            return $this->fetch('add');
+        }else{
+            $this->makeAdd();
         }
     }