rkljw hai 2 días
pai
achega
b4bd45d7a0

+ 13 - 0
app/Controller/FormController.php

@@ -339,5 +339,18 @@ class FormController extends AbstractController
         }
         return Result::success($result['data']);
     }
+    /**
+     * 字段类型列表
+     * @return array
+     */
+    public function getGlobalTableFieldTypeList(){
+//        var_dump("fuck==================");
+//        $requireData = $this->request->all();
+        $result = $this->formServiceClient->getGlobalTableFieldTypeList([]);
+        if ($result['code']!= ErrorCode::SUCCESS) {
+            return Result::error($result['message'],0,[]);
+        }
+        return Result::success($result['data']);
+    }
 
 }

+ 1 - 0
app/JsonRpc/FooterService.php

@@ -90,4 +90,5 @@ class FooterService extends AbstractServiceClient implements FooterServiceInterf
     {
         return $this->__request(__FUNCTION__, $data);
     }
+
 }

+ 4 - 0
app/JsonRpc/FormService.php

@@ -89,4 +89,8 @@ class FormService extends AbstractServiceClient implements FormServiceInterface
     {
         return $this->__request(__FUNCTION__, $data);
     }
+    public function getGlobalTableFieldTypeList(array $data)
+    {
+        return $this->__request(__FUNCTION__, $data);
+    }
 }

+ 5 - 1
app/JsonRpc/FormServiceInterface.php

@@ -48,5 +48,9 @@ interface FormServiceInterface
      * @param array $data
      */
     public function getGlobalTableData(array $data);
-    
+    /**
+     * @param array $data
+     * @return mixed
+     */
+    public function getGlobalTableFieldTypeList(array $data);
 }

+ 2 - 0
config/api/form.php

@@ -31,6 +31,8 @@ Router::addGroup(
         Router::get('/getGlobalTableField', [FormController::class, 'getGlobalTableField']);
         //获取表单下面的数据
         Router::get('/getGlobalTableData', [FormController::class, 'getGlobalTableData']);
+        //获取表单字段类型列表
+        Router::get('/getGlobalTableFieldTypeList', [FormController::class, 'getGlobalTableFieldTypeList']);
 
     },
     ['middleware' => [FooMiddleware::class]]