function.php 5.7 KB

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