info.php 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. <?php
  2. $cate = function()
  3. {
  4. $array = array();
  5. $cate = Dever::load('set/cate-mainAll');
  6. if($cate)
  7. {
  8. $array += $cate;
  9. }
  10. return $array;
  11. };
  12. return array
  13. (
  14. # 表名
  15. 'name' => 'info',
  16. # 显示给用户看的名称
  17. 'lang' => '小程序管理',
  18. 'order' => -10,
  19. # 数据结构
  20. 'struct' => array
  21. (
  22. 'id' => array
  23. (
  24. 'type' => 'int-11',
  25. 'name' => 'ID',
  26. 'default' => '',
  27. 'desc' => '',
  28. 'match' => 'is_numeric',
  29. //'search' => 'order',
  30. 'order' => 'desc',
  31. 'list' => true,
  32. ),
  33. 'name' => array
  34. (
  35. 'type' => 'varchar-60',
  36. 'name' => '小程序名称',
  37. 'default' => '',
  38. 'desc' => '请输入小程序名称',
  39. 'match' => 'is_string',
  40. 'update' => 'text',
  41. 'search' => 'fulltext',
  42. 'list' => true,
  43. ),
  44. 'cate_id' => array
  45. (
  46. 'type' => 'int-11',
  47. 'name' => '所属栏目',
  48. 'default' => '0',
  49. 'desc' => '请选择所属栏目',
  50. 'match' => 'is_numeric',
  51. 'update' => 'select',
  52. //'search' => 'order,select',
  53. 'list' => '{cate_id} > 0 ? Dever::load("set/cate-one#name", {cate_id}) : "临时栏目"',
  54. 'option' => $cate,
  55. ),
  56. 'logo' => array
  57. (
  58. 'type' => 'varchar-150',
  59. 'name' => 'logo图片-大小为150X150px',
  60. 'default' => '',
  61. 'desc' => '请选择logo图片',
  62. 'match' => 'is_string',
  63. 'update' => 'image',
  64. 'key' => '1',
  65. 'place' => '150',
  66. ),
  67. 'title' => array
  68. (
  69. 'type' => 'varchar-60',
  70. 'name' => '首页标题',
  71. 'default' => '',
  72. 'desc' => '请输入首页标题',
  73. 'match' => 'is_string',
  74. 'update' => 'text',
  75. 'search' => 'fulltext',
  76. 'list' => true,
  77. ),
  78. 'pic' => array
  79. (
  80. 'type' => 'varchar-150',
  81. 'name' => '首页头图',
  82. 'default' => '',
  83. 'desc' => '请选择首页头图',
  84. 'match' => 'is_string',
  85. 'update' => 'image',
  86. 'key' => '1',
  87. 'place' => '150',
  88. ),
  89. 'appid' => array
  90. (
  91. 'type' => 'varchar-200',
  92. 'name' => '小程序appid',
  93. 'default' => '',
  94. 'desc' => '小程序appid',
  95. 'match' => 'option',
  96. 'update' => 'text',
  97. //'search' => 'fulltext',
  98. //'list' => true,
  99. ),
  100. 'secret' => array
  101. (
  102. 'type' => 'varchar-200',
  103. 'name' => '小程序secret',
  104. 'default' => '',
  105. 'desc' => '请输入小程序secret',
  106. 'match' => 'option',
  107. 'update' => 'textarea',
  108. //'search' => 'fulltext',
  109. //'list' => true,
  110. ),
  111. 'state' => array
  112. (
  113. 'type' => 'tinyint-1',
  114. 'name' => '状态',
  115. 'default' => '1',
  116. 'desc' => '请选择状态',
  117. 'match' => 'is_numeric',
  118. ),
  119. 'cdate' => array
  120. (
  121. 'type' => 'int-11',
  122. 'name' => '录入时间',
  123. 'match' => array('is_numeric', time()),
  124. 'desc' => '',
  125. # 只有insert时才生效
  126. 'insert' => true,
  127. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  128. ),
  129. ),
  130. 'manage' => array
  131. (
  132. ),
  133. # request 请求接口定义
  134. 'request' => array
  135. (
  136. ),
  137. );