dever 3 tahun lalu
induk
melakukan
f6b5745ee8
1 mengubah file dengan 7 tambahan dan 3 penghapusan
  1. 7 3
      app/collection/lib/Spider.php

+ 7 - 3
app/collection/lib/Spider.php

@@ -36,7 +36,8 @@ class Spider
     {
     	$id = Dever::input('info_id');
     	$name = Dever::input('time_name');
-    	if (!$id || !$name) {
+        $page_desc = Dever::input('page_desc');
+    	if (!$id || !$name || !$page_desc) {
     		return;
     	}
         if (!isset($data['pic'])) {
@@ -60,6 +61,9 @@ class Spider
 
         $main_name = '收集者';
 
+        $content_name = $data['name'];
+        $content_name = $year . '年' . $month . $day;
+
         # 按项目生成主时光
         $times_id_parent = $this->createTimes($id, $source_id, $main_name);
         if ($times_id_parent) {
@@ -72,10 +76,10 @@ class Spider
                     $cover = $pic[0];
                     $cover = Dever::load('upload/view')->get($cover, 't', 1);
                     $cover = Dever::load('upload/view')->get($cover, 'c', 1);
-        			$page_id = $this->createPage($id, $source_id, $month, $parent_page_id, $times_id_parent, $times_id, $data['name'], $cover);
+        			$page_id = $this->createPage($id, $source_id, $month, $parent_page_id, $times_id_parent, $times_id, $page_desc, $cover);
 
         			if ($page_id) {
-        				$content_id = $this->createContent($id, $source_id, $page_id, 11, $data['name'], $cover);
+        				$content_id = $this->createContent($id, $source_id, $page_id, 11, $content_name, $cover);
         				if ($content_id) {
         					$this->createPic($id, $content_id, $pic);
         				}