dever 4 年之前
父節點
當前提交
292f5b2e9b
共有 2 個文件被更改,包括 5 次插入5 次删除
  1. 0 5
      app/collection/lib/Core.php
  2. 5 0
      app/collection/src/Api.php

+ 0 - 5
app/collection/lib/Core.php

@@ -173,11 +173,6 @@ class Core
             $day = 0;
         }
 
-        $page = Dever::db('collection/page')->one($page_id);
-        if ($page && $page['desc']) {
-            $index = $index + 1;
-        }
-
         $code = 'dlv1_' . $id. '_' . $parent_page_id . '_' . $page_id . '_' . $index . '_' . $times_id . '_' . $day . '_' . $uid . '_' . $ticket_id;
         
         if ($encode) {

+ 5 - 0
app/collection/src/Api.php

@@ -500,6 +500,11 @@ class Api extends Core
         $page_id = Dever::input('page_id');
         $parent_page_id = Dever::input('parent_page_id', $this->parent_page_id);
         $index = Dever::input('index', 0);
+
+        $page = Dever::db('collection/page')->one($page_id);
+        if ($page && $page['desc']) {
+            $index = $index + 1;
+        }
         $data['code'] = $this->getCode($this->id, $parent_page_id, $page_id, $index, $this->times, $this->day, $this->share_uid, $this->ticket_id);
 
         return $data;