api.php 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. <?php
  2. return [
  3. 'name' => '接口配置',
  4. 'order' => 'sort asc',
  5. 'struct' => [
  6. 'platform_id' => [
  7. 'name' => '平台',
  8. 'type' => 'int(11)',
  9. 'value' => 'api/platform',
  10. ],
  11. 'name' => [
  12. 'name' => '接口名称',
  13. 'type' => 'varchar(32)',
  14. ],
  15. 'uri' => [
  16. 'name' => '接口地址',
  17. 'type' => 'varchar(100)',
  18. ],
  19. 'method' => [
  20. 'name' => '请求方式',
  21. 'type' => 'tinyint(1)',
  22. 'default' => '-1',
  23. 'value' => [
  24. -1 => '使用平台标准请求方式',
  25. 1 => 'get',
  26. 2 => 'post',
  27. ],
  28. ],
  29. 'post_method' => [
  30. 'name' => '请求头设置',
  31. 'type' => 'tinyint(1)',
  32. 'default' => '1',
  33. 'value' => [
  34. 1 => '普通表单:application/x-www-form-urlencoded',
  35. 2 => '文件表单:multipart/form-data',
  36. 3 => 'JSON:application/json',
  37. ],
  38. ],
  39. 'notify' => [
  40. 'name' => '是否有回调',
  41. 'type' => 'tinyint(1)',
  42. 'default' => '2',
  43. 'value' => [
  44. 1 => '有回调',
  45. 2 => '无回调',
  46. ],
  47. ],
  48. 'env' => [
  49. 'name' => '运行环境',
  50. 'type' => 'tinyint(1)',
  51. 'default' => 1,
  52. 'value' => [
  53. 1 => '通用',
  54. 2 => 'h5',
  55. 3 => 'jsapi',
  56. 4 => 'app',
  57. 5 => '小程序',
  58. 6 => 'pc',
  59. ],
  60. ],
  61. 'status' => [
  62. 'name' => '状态',
  63. 'type' => 'tinyint(1)',
  64. 'default' => 1,
  65. 'value' => [
  66. 1 => '展示',
  67. 2 => '不展示',
  68. ],
  69. ],
  70. 'sort' => [
  71. 'name' => '排序',
  72. 'type' => 'int(11)',
  73. 'default' => '1',
  74. ],
  75. ],
  76. ];