cate.php 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204
  1. <?php
  2. $type = array
  3. (
  4. # 默认类型
  5. 3 => '图文内容',
  6. 1 => '全屏图',
  7. 2 => '长图',
  8. # 2018-12-11 增加3个类型
  9. 4 => '全屏视频',
  10. 5 => '留言视频',
  11. 6 => '留言音频',
  12. # 关联类型 > 10
  13. 11 => '关联图文',
  14. 12 => '关联视频',
  15. 13 => '关联直播',
  16. );
  17. $id = Dever::input('where_id');
  18. return array
  19. (
  20. # 表名
  21. 'name' => 'cate',
  22. # 显示给用户看的名称
  23. 'lang' => '小刊分类设置',
  24. # 后台菜单排序
  25. 'order' => 9,
  26. 'end' => array
  27. (
  28. 'update' => 'passport/lib/manage.updateSystem',
  29. 'insert' => 'passport/lib/manage.updateSystem',
  30. ),
  31. # 数据结构
  32. 'struct' => array
  33. (
  34. 'id' => array
  35. (
  36. 'type' => 'int-11',
  37. 'name' => 'ID',
  38. 'default' => '',
  39. 'desc' => '',
  40. 'match' => 'is_numeric',
  41. 'search' => 'order',
  42. 'list' => true,
  43. 'order' => 'desc',
  44. ),
  45. 'name' => array
  46. (
  47. 'type' => 'varchar-32',
  48. 'name' => '分类名称',
  49. 'default' => '',
  50. 'desc' => '请输入名称',
  51. 'match' => 'is_string',
  52. 'update' => 'text',
  53. 'search' => 'fulltext',
  54. 'list' => true,
  55. ),
  56. 'type' => array
  57. (
  58. 'type' => 'varchar-100',
  59. 'name' => '内容类型-定义小刊下的内页内容类型',
  60. 'default' => '1,2,3,4,5,6,11,12,13',
  61. 'desc' => '内容类型',
  62. 'match' => 'is_numeric',
  63. 'update' => 'checkbox',
  64. 'option' => $type,
  65. ),
  66. 'journal_id' => array
  67. (
  68. 'type' => 'int-11',
  69. 'name' => '主推小刊',
  70. 'default' => '',
  71. 'desc' => '主推小刊',
  72. 'match' => 'is_numeric',
  73. 'update' => $id ? 'select' : 'hidden',
  74. 'update_search' => 'journal/lib/manage.search_journal?cate=' . $id,
  75. ),
  76. 'title' => array
  77. (
  78. 'type' => 'varchar-32',
  79. 'name' => '页面title-公众号支付中的页面标题',
  80. 'default' => '',
  81. 'desc' => '页面title',
  82. 'match' => 'is_string',
  83. 'update' => 'text',
  84. 'search' => 'fulltext',
  85. // 'list' => true,
  86. ),
  87. 'desc' => array
  88. (
  89. 'type' => 'text-255',
  90. 'name' => '简介',
  91. 'default' => '',
  92. 'desc' => '简介',
  93. 'match' => 'option',
  94. 'update' => 'textarea',
  95. ),
  96. 'cover' => array
  97. (
  98. 'type' => 'varchar-150',
  99. 'name' => '封面图-公众号支付中的封面图,图片尺寸460*759px或等比尺寸,上传大小不能超过2M,支持JPG、PNG、GIF格式,建议上传JPG格式',
  100. 'default' => '',
  101. 'desc' => '封面图',
  102. 'match' => 'option',
  103. 'update' => 'image',
  104. 'key' => '1',
  105. 'place' => '150',
  106. ),
  107. 'logo' => array
  108. (
  109. 'type' => 'varchar-150',
  110. 'name' => 'logo图-当前分类的logo图,图片尺寸100*100px或等比尺寸,上传大小不能超过2M,支持JPG、PNG、GIF格式,建议上传JPG格式',
  111. 'default' => '',
  112. 'desc' => 'logo图',
  113. 'match' => 'option',
  114. 'update' => 'image',
  115. 'key' => '1',
  116. 'place' => '150',
  117. ),
  118. 'reorder' => array
  119. (
  120. 'type' => 'int-11',
  121. 'name' => '排序(数值越大越靠前)',
  122. 'default' => '1',
  123. 'desc' => '请输入排序',
  124. 'match' => 'option',
  125. 'update' => 'text',
  126. 'search' => 'order',
  127. 'list' => true,
  128. 'order' => 'desc',
  129. 'edit' => true,
  130. ),
  131. 'code_desc' => array
  132. (
  133. 'type' => 'text-255',
  134. 'name' => '兑换说明',
  135. 'default' => '',
  136. 'desc' => '兑换说明',
  137. 'match' => 'option',
  138. 'update' => 'editor',
  139. ),
  140. 'state' => array
  141. (
  142. 'type' => 'tinyint-1',
  143. 'name' => '状态',
  144. 'default' => '1',
  145. 'desc' => '请选择状态',
  146. 'match' => 'is_numeric',
  147. ),
  148. 'cdate' => array
  149. (
  150. 'type' => 'int-11',
  151. 'name' => '录入时间',
  152. 'match' => array('is_numeric', time()),
  153. 'desc' => '',
  154. # 只有insert时才生效
  155. 'insert' => true,
  156. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  157. ),
  158. ),
  159. # 默认值
  160. 'default' => array
  161. (
  162. 'col' => 'name,state,cdate',
  163. 'value' => array
  164. (
  165. '"默认分类",1,' . time(),
  166. ),
  167. ),
  168. 'manage' => array
  169. (
  170. //'insert' => false,
  171. //'edit' => false,
  172. ),
  173. 'request' => array
  174. (
  175. 'getAll' => array
  176. (
  177. # 匹配的正则或函数 选填项
  178. 'option' => array
  179. (
  180. 'state' => 1,
  181. ),
  182. 'type' => 'all',
  183. 'order' => array('reorder' => 'desc','id' => 'desc'),
  184. 'col' => '*',
  185. ),
  186. ),
  187. );