ranking.php 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196
  1. <?php
  2. $type = array
  3. (
  4. 1 => '门票榜单',
  5. 2 => '购物榜单',
  6. 3 => '贡献榜单',
  7. 4 => '积分榜单',
  8. );
  9. $periods = array
  10. (
  11. 1 => '天',
  12. 2 => '周',
  13. 3 => '月',
  14. 4 => '年',
  15. );
  16. $status = array
  17. (
  18. 1 => '开启',
  19. 2 => '关闭',
  20. );
  21. return array
  22. (
  23. # 表名
  24. 'name' => 'ranking',
  25. # 显示给用户看的名称
  26. 'lang' => '榜单设置',
  27. 'menu' => false,
  28. 'ends' => array
  29. (
  30. 'insert' => 'collection/lib/manage.setRankingCache',
  31. 'update' => 'collection/lib/manage.setRankingCache',
  32. ),
  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. 'value' => Dever::input('where_id')
  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' => '2',
  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' => 'int-11',
  84. 'name' => '榜单类型',
  85. 'default' => '1',
  86. 'desc' => '榜单类型',
  87. 'match' => 'is_numeric',
  88. 'update' => 'radio',
  89. 'option' => $type,
  90. 'list' => true,
  91. ),
  92. 'periods' => array
  93. (
  94. 'type' => 'int-11',
  95. 'name' => '榜单周期',
  96. 'default' => '1',
  97. 'desc' => '榜单周期',
  98. 'match' => 'is_numeric',
  99. 'update' => 'radio',
  100. 'option' => $periods,
  101. 'list' => true,
  102. ),
  103. 'start' => array
  104. (
  105. 'type' => 'int-11',
  106. 'default' => '',
  107. 'name' => '榜单开始时间',
  108. 'match' => 'option',
  109. 'desc' => '榜单开始时间',
  110. 'update' => 'date',
  111. //'list' => 'date("Y-m-d H:i:s", {start})',
  112. 'callback' => 'maketime',
  113. ),
  114. 'end' => array
  115. (
  116. 'type' => 'int-11',
  117. 'default' => '',
  118. 'name' => '榜单结束时间',
  119. 'match' => 'option',
  120. 'desc' => '榜单结束时间',
  121. 'update' => 'date',
  122. //'list' => 'date("Y-m-d H:i:s", {end})',
  123. 'callback' => 'maketime',
  124. ),
  125. 'desc' => array
  126. (
  127. 'type' => 'text-255',
  128. 'name' => '榜单描述',
  129. 'default' => '',
  130. 'desc' => '榜单描述',
  131. 'match' => 'option',
  132. 'update' => 'editor',
  133. 'key' => 1,
  134. //'search' => 'fulltext',
  135. //'list' => true,
  136. ),
  137. 'state' => array
  138. (
  139. 'type' => 'tinyint-1',
  140. 'name' => '状态',
  141. 'default' => '1',
  142. 'desc' => '请选择状态',
  143. 'match' => 'is_numeric',
  144. ),
  145. 'cdate' => array
  146. (
  147. 'type' => 'int-11',
  148. 'name' => '创建时间',
  149. 'match' => array('is_numeric', time()),
  150. 'desc' => '',
  151. # 只有insert时才生效
  152. 'insert' => true,
  153. 'search' => 'date',
  154. //'list' => 'date("Y-m-d H:i:s", {cdate})',
  155. ),
  156. ),
  157. 'manage' => array
  158. (
  159. ),
  160. 'request' => array
  161. (
  162. # 获取提交订单超过12个小时
  163. 'getDataByTime' => array
  164. (
  165. # 匹配的正则或函数 选填项
  166. 'option' => array
  167. (
  168. 'end' => array('yes', '<='),
  169. 'ends' => array('yes-end', '>'),
  170. 'state' => 1,
  171. 'status' => 1,
  172. ),
  173. 'type' => 'all',
  174. 'order' => array('id' => 'desc'),
  175. 'col' => '*',
  176. ),
  177. ),
  178. );