rabin před 2 dny
rodič
revize
5860452a3c
2 změnil soubory, kde provedl 7 přidání a 3 odebrání
  1. 6 2
      app/Lib/Page.php
  2. 1 1
      app/Lib/Util.php

+ 6 - 2
app/Lib/Page.php

@@ -732,8 +732,12 @@ class Page extends Auth
             if ($i) {
                 $icon = $i;
             }
-            if ($key == 'button' && $data && is_array($p)) {
-                if (!$p) {
+            if ($key == 'button' && $data) {
+                if ($p) {
+                    if (is_string($p)) {
+                        $p = explode(',', $p);
+                    }
+                } else {
                     $p = [];
                 }
                 $p += $data;

+ 1 - 1
app/Lib/Util.php

@@ -9,7 +9,7 @@ class Util
     # 获取后台传入的数据
     public function request($col, $other = '')
     {
-        $info = Dever::input(['field', 'set'])[$col] ?? 0;
+        $info = Dever::input(['set', 'field'])[$col] ?? 0;
         if ($other && !$info) {
             $info = Dever::input($other);
         }