dever 4 年之前
父节点
当前提交
afa51df4bf
共有 4 个文件被更改,包括 16 次插入6 次删除
  1. 13 2
      app/collection/database/button.php
  2. 1 2
      app/collection/database/info.php
  3. 1 1
      app/collection/src/Api.php
  4. 1 1
      app/user/lib/Ticket.php

+ 13 - 2
app/collection/database/button.php

@@ -68,7 +68,7 @@ return array
             'option'    => $type,
             'search'    => 'select',
             'list'      => true,
-            'edit'      => true,
+            //'edit'      => true,
             'control'	=> 'type',
         ),
 
@@ -151,6 +151,17 @@ return array
 
     'request' => array
     (
-        
+        'getAll' => array
+        (
+            # 匹配的正则或函数 选填项
+            'option' => array
+            (
+                'info_id' => 'yes',
+                'state' => 1,
+            ),
+            'type' => 'all',
+            'order' => array('reorder' => 'asc', 'id' => 'desc'),
+            'col' => '*',
+        ),
     ),
 );

+ 1 - 2
app/collection/database/info.php

@@ -450,14 +450,13 @@ $config = array
             'edit'      => true,
         ),
 
-        /*
+        
         'hr4'       => array
         (
             'name'      => '首页按钮配置',
             'class'     => '',//本项必须填写
             'attr'      => '',
         ),
-        */
 
         'button'      => array
         (

+ 1 - 1
app/collection/src/Api.php

@@ -317,7 +317,7 @@ class Api extends Core
             }
         }
 
-        $data['button'] = Dever::db('collection/button')->state(array('info_id' => $data['info']['id']));
+        $data['button'] = Dever::db('collection/button')->getAll(array('info_id' => $data['info']['id']));
 
         /*
         $score = Dever::load('score/lib/core')->getUserScore($this->uid, $data['info']['score_id'], 'collection/info', $data['info']['id']);

+ 1 - 1
app/user/lib/Ticket.php

@@ -70,7 +70,7 @@ class Ticket
         
         $num = Dever::db('user/ticket')->num($where);
         if ($num) {
-            return $num['num'];
+            return $num['num'] ? $num['num'] : 0;
         }
         return 0;
     }