function.php 6.5 KB

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