page.php 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. <?php
  2. $type = array
  3. (
  4. 1 => 'H5',
  5. 2 => '安卓APP',
  6. 3 => '苹果APP',
  7. 4 => '微信小程序',
  8. );
  9. return array
  10. (
  11. # 表名
  12. 'name' => 'page',
  13. # 显示给用户看的名称
  14. 'lang' => '页面管理',
  15. 'order' => 10,
  16. # 数据结构
  17. 'struct' => array
  18. (
  19. 'id' => array
  20. (
  21. 'type' => 'int-11',
  22. 'name' => 'ID',
  23. 'default' => '',
  24. 'desc' => '',
  25. 'match' => 'is_numeric',
  26. //'search' => 'order',
  27. 'order' => 'desc',
  28. //'list' => true,
  29. ),
  30. 'name' => array
  31. (
  32. 'type' => 'varchar-60',
  33. 'name' => '页面标题',
  34. 'default' => '',
  35. 'desc' => '请输入页面标题',
  36. 'match' => 'is_string',
  37. 'update' => 'text',
  38. 'search' => 'fulltext',
  39. 'list' => true,
  40. 'edit' => true,
  41. ),
  42. 'key' => array
  43. (
  44. 'type' => 'varchar-800',
  45. 'name' => '页面标识-可以根据路由获取页面里的广告信息,也可以约定一个标识值,直接通过获取广告的接口来获取信息',
  46. 'default' => '',
  47. 'desc' => '页面标识',
  48. 'match' => 'is_string',
  49. 'update' => 'text',
  50. 'search' => 'fulltext',
  51. 'list' => true,
  52. 'edit' => true,
  53. ),
  54. 'type' => array
  55. (
  56. 'type' => 'int-11',
  57. 'name' => '页面类型',
  58. 'default' => '1',
  59. 'desc' => '请选择页面类型',
  60. 'match' => 'is_numeric',
  61. 'option' => $type,
  62. 'update' => 'radio',
  63. 'search' => 'select',
  64. 'list' => true,
  65. ),
  66. 'reorder' => array
  67. (
  68. 'type' => 'int-11',
  69. 'name' => '排序(数值越大越靠前)',
  70. 'default' => '1',
  71. 'desc' => '请输入排序',
  72. 'match' => 'option',
  73. 'update' => 'text',
  74. 'search' => 'order',
  75. 'list_name' => '排序',
  76. 'list' => true,
  77. 'order' => 'desc',
  78. //'edit' => true,
  79. ),
  80. 'state' => array
  81. (
  82. 'type' => 'tinyint-1',
  83. 'name' => '状态',
  84. 'default' => '1',
  85. 'desc' => '请选择状态',
  86. 'match' => 'is_numeric',
  87. ),
  88. 'cdate' => array
  89. (
  90. 'type' => 'int-11',
  91. 'name' => '录入时间',
  92. 'match' => array('is_numeric', time()),
  93. 'desc' => '',
  94. # 只有insert时才生效
  95. 'insert' => true,
  96. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  97. ),
  98. ),
  99. 'manage' => array
  100. (
  101. ),
  102. # request 请求接口定义
  103. 'request' => array
  104. (
  105. ),
  106. );