function.php 5.7 KB

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