function.php 6.5 KB

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