function.php 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200
  1. <?php
  2. $type = array
  3. (
  4. 'cate' => '集合',
  5. 'community' => '社区',
  6. 'shop' => '商城',
  7. 'times' => '时光',
  8. //'jump' => '穿越',
  9. //'befall' => '降临',
  10. //'music' => '音乐',
  11. //'ranking' => '排行',
  12. );
  13. $status = array
  14. (
  15. 1 => '开启',
  16. 2 => '关闭',
  17. );
  18. $direction = array
  19. (
  20. 'left' => '左侧展开',
  21. );
  22. return array
  23. (
  24. # 表名
  25. 'name' => 'function',
  26. # 显示给用户看的名称
  27. 'lang' => '功能设置',
  28. 'menu' => false,
  29. 'check' => 'type',
  30. # 数据结构
  31. 'struct' => array
  32. (
  33. 'id' => array
  34. (
  35. 'type' => 'int-11',
  36. 'name' => 'ID',
  37. 'default' => '',
  38. 'desc' => '',
  39. 'match' => 'is_numeric',
  40. 'search' => 'order',
  41. 'update' => 'hidden',
  42. //'list' => true,
  43. ),
  44. 'info_id' => array
  45. (
  46. 'type' => 'int-11',
  47. 'name' => '合集',
  48. 'default' => '',
  49. 'desc' => '合集',
  50. 'match' => 'is_numeric',
  51. 'update' => 'hidden',
  52. 'value' => Dever::input('search_option_info_id')
  53. ),
  54. 'name' => array
  55. (
  56. 'type' => 'varchar-80',
  57. 'name' => '功能名称',
  58. 'default' => '',
  59. 'desc' => '功能名称',
  60. 'match' => 'is_string',
  61. 'update' => 'text',
  62. 'search' => 'fulltext',
  63. 'list' => true,
  64. ),
  65. 'status' => array
  66. (
  67. 'type' => 'int-11',
  68. 'name' => '功能状态',
  69. 'default' => '1',
  70. 'desc' => '功能状态',
  71. 'match' => 'is_numeric',
  72. 'update' => 'radio',
  73. 'option' => $status,
  74. 'list' => true,
  75. 'edit' => true,
  76. ),
  77. 'type' => array
  78. (
  79. 'type' => 'varchar-20',
  80. 'name' => '功能类型',
  81. 'default' => 'cate',
  82. 'desc' => '功能类型',
  83. 'match' => 'is_string',
  84. 'update' => 'radio',
  85. 'option' => $type,
  86. 'list' => true,
  87. ),
  88. 'color' => array
  89. (
  90. 'type' => 'varchar-10',
  91. 'name' => '文字颜色-默认为白色',
  92. 'default' => '#ffffff',
  93. 'desc' => '文字颜色',
  94. 'match' => 'is_string',
  95. 'update' => 'color',
  96. ),
  97. 'bgcolor' => array
  98. (
  99. 'type' => 'varchar-10',
  100. 'name' => '背景颜色-默认为蓝色',
  101. 'default' => '#16C2C2',
  102. 'desc' => '背景颜色',
  103. 'match' => 'is_string',
  104. 'update' => 'color',
  105. ),
  106. 'width' => array
  107. (
  108. 'type' => 'varchar-10',
  109. 'name' => '页面展开的宽度',
  110. 'default' => '86%',
  111. 'desc' => '页面展开的宽度',
  112. 'match' => 'is_string',
  113. 'update' => 'text',
  114. ),
  115. 'direction' => array
  116. (
  117. 'type' => 'varchar-10',
  118. 'name' => '页面展开方式',
  119. 'default' => 'left',
  120. 'desc' => '页面展开方式',
  121. 'match' => 'is_string',
  122. 'update' => 'radio',
  123. 'option' => $direction,
  124. ),
  125. 'reorder' => array
  126. (
  127. 'type' => 'int-11',
  128. 'name' => '排序(数值越大越靠前)',
  129. 'default' => '1',
  130. 'desc' => '请输入排序',
  131. 'match' => 'option',
  132. //'update' => 'text',
  133. 'search' => 'order',
  134. 'list' => true,
  135. 'order' => 'desc',
  136. 'edit' => true,
  137. ),
  138. 'state' => array
  139. (
  140. 'type' => 'tinyint-1',
  141. 'name' => '状态',
  142. 'default' => '1',
  143. 'desc' => '请选择状态',
  144. 'match' => 'is_numeric',
  145. ),
  146. 'cdate' => array
  147. (
  148. 'type' => 'int-11',
  149. 'name' => '创建时间',
  150. 'match' => array('is_numeric', time()),
  151. 'desc' => '',
  152. # 只有insert时才生效
  153. 'insert' => true,
  154. 'search' => 'date',
  155. //'list' => 'date("Y-m-d H:i:s", {cdate})',
  156. ),
  157. ),
  158. 'manage' => array
  159. (
  160. //'delete' => false,
  161. # 列表 商城要加入选品列表
  162. 'list_button' => array
  163. (
  164. ),
  165. ),
  166. 'request' => array
  167. (
  168. 'getAll' => array
  169. (
  170. # 匹配的正则或函数 选填项
  171. 'option' => array
  172. (
  173. 'info_id' => 'yes',
  174. 'state' => 1,
  175. 'status' => 1,
  176. ),
  177. 'type' => 'all',
  178. 'order' => array('reorder' => 'desc', 'id' => 'desc'),
  179. 'col' => '*',
  180. ),
  181. ),
  182. );