xieruidong 2 yıl önce
ebeveyn
işleme
6bd1521239
1 değiştirilmiş dosya ile 12 ekleme ve 1 silme
  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();
         }
     }