dever 4 years ago
parent
commit
0d0c3845f3
1 changed files with 3 additions and 1 deletions
  1. 3 1
      app/collection/lib/Manage.php

+ 3 - 1
app/collection/lib/Manage.php

@@ -191,9 +191,11 @@ class Manage
                 # 验证有没有数据
                 $info = Dever::db($table)->one(array('content_id' => $v['id'], 'info_id' => $v['info_id']));
 
+                $id = false;
                 if ($list) {
                     $data[$k]['data_name'] = '内容列表';
                 } elseif ($info) {
+                    $id = $info['id'];
                     $data[$k]['data_name'] = '更新内容';
                 } else {
                     $data[$k]['data_name'] = '新增内容';
@@ -230,7 +232,7 @@ class Manage
                     $param['top_project'] = 'collection';
                 }
                 
-                $data[$k]['data_editurl'] = $database->url($method, false, $table_name, '', $project_name, $param);
+                $data[$k]['data_editurl'] = $database->url($method, $id, $table_name, '', $project_name, $param);
                 
                 $data[$k]['delete'] = $database->url('delete', $v['id']);
             }