Parcourir la source

修改数据类型

liaofei il y a 2 ans
Parent
commit
2ae341ff24
1 fichiers modifiés avec 3 ajouts et 0 suppressions
  1. 3 0
      crmeb/crmeb/services/crud/Service.php

+ 3 - 0
crmeb/crmeb/services/crud/Service.php

@@ -78,6 +78,9 @@ class Service extends Make
                         if (in_array($item['type'], ['checkbox'])) {
                             $valueContent = '[]';
                             $input = '(array)(' . $input . $valueContent . ')';
+                        } else if ($item['type'] == 'radio') {
+                            $valueContent = '-1';
+                            $input = '(int)(' . $input . $valueContent . ')';
                         } else {
                             $input = $input . $valueContent;
                         }