|
@@ -520,7 +520,21 @@ class FormService implements FormServiceInterface
|
|
|
'b.field_type as type_definition'
|
|
|
)
|
|
|
->get();
|
|
|
-
|
|
|
+ $fields->transform(function ($field) {
|
|
|
+ $optionValue = [];
|
|
|
+ $optionStr = trim((string) $field->option);
|
|
|
+ if (!empty($optionStr)) {
|
|
|
+ $options = explode("\n", $optionStr);
|
|
|
+ foreach ($options as $option) {
|
|
|
+ $parts = explode('|', $option);
|
|
|
+ if (count($parts) === 2) {
|
|
|
+ $optionValue[$parts[1]] = $parts[0];
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ $field->option_value = $optionValue;
|
|
|
+ return $field;
|
|
|
+ });
|
|
|
$config = new \EasySwoole\VerifyCode\Config();
|
|
|
$code = new \EasySwoole\VerifyCode\VerifyCode($config);
|
|
|
$img_code = '';
|