app_func.php 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. <?php
  2. $app_id = Dever::input('set')['app_id'] ?? 0;
  3. return array
  4. (
  5. 'list' => array
  6. (
  7. 'where' => array('app_id' => $app_id),
  8. 'field' => array
  9. (
  10. 'id',
  11. 'name',
  12. 'key',
  13. 'type',
  14. 'status' => array
  15. (
  16. 'type' => 'switch',
  17. 'show' => '{status}',
  18. 'active_value' => 1,
  19. 'inactive_value' => 2,
  20. ),
  21. 'cdate',
  22. ),
  23. 'data_button' => array
  24. (
  25. '编辑' => array('edit', array('app_id' => $app_id)),
  26. ),
  27. 'button' => array
  28. (
  29. '新增' => array('add', array('app_id' => $app_id)),
  30. ),
  31. 'search' => array
  32. (
  33. 'app_id' => 'hidden',
  34. 'name',
  35. 'key',
  36. 'type',
  37. ),
  38. ),
  39. 'update' => array
  40. (
  41. 'end' => 'api/app.update',
  42. 'tab' => array
  43. (
  44. '基本设置' => 'app_id,name,key,desc,cron_date,cron_time',
  45. '接口设置' => 'type,api/app_func_work',
  46. ),
  47. 'field' => array
  48. (
  49. 'app_id' => 'hidden',
  50. 'name',
  51. 'type',
  52. 'key' => array
  53. (
  54. 'desc' => '如果为空,将自动按照名称拼音生成',
  55. ),
  56. 'desc' => 'textarea',
  57. 'status' => array
  58. (
  59. 'type' => 'radio',
  60. ),
  61. 'cron_date' => array
  62. (
  63. 'type' => 'date',
  64. 'date_type' => 'datetime',
  65. ),
  66. 'cron_time' => array
  67. (
  68. 'type' => 'text',
  69. 'desc' => '直接输入秒数,如60,就是间隔60秒执行一次,为0则不定时执行',
  70. ),
  71. 'api/app_func_work' => array
  72. (
  73. 'name' => '功能接口',
  74. 'desc' => '设置功能包含的接口',
  75. 'where' => array('app_func_id' => 'id'),
  76. ),
  77. ),
  78. ),
  79. );