xieruidong 2 年之前
父節點
當前提交
6bd1521239
共有 1 個文件被更改,包括 12 次插入1 次删除
  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();
         }
     }