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

+ 3 - 2
app/collection/src/Api.php

@@ -477,7 +477,7 @@ class Api extends Core
             
             $data['show'] = array();
             foreach ($data['cate'] as $k => $v) {
-                if ($v['id'] == $page_id) {
+                if ($v['id'] == $parent_page_id) {
                     $data['show'][$v['id']] = 1;
                 } else {
                     $data['show'][$v['id']] = 2;
@@ -498,8 +498,9 @@ class Api extends Core
     public function getCodeByPage()
     {
         $page_id = Dever::input('page_id');
+        $parent_page_id = Dever::input('parent_page_id', $this->parent_page_id);
         $index = Dever::input('index', 0);
-        $data['code'] = $this->getCode($this->id, $this->parent_page_id, $page_id, $index, $this->times, $this->day, $this->share_uid, $this->ticket_id);
+        $data['code'] = $this->getCode($this->id, $parent_page_id, $page_id, $index, $this->times, $this->day, $this->share_uid, $this->ticket_id);
 
         return $data;
     }