cate.php 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239
  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' => array
  29. (
  30. 'passport/lib/manage.updateSystem',
  31. 'manage/top.sync',
  32. ),
  33. 'insert' => array
  34. (
  35. 'passport/lib/manage.updateSystem',
  36. 'manage/top.sync',
  37. )
  38. ),
  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. 'list' => true,
  51. 'order' => 'desc',
  52. ),
  53. 'name' => array
  54. (
  55. 'type' => 'varchar-32',
  56. 'name' => '分类名称',
  57. 'default' => '',
  58. 'desc' => '请输入名称',
  59. 'match' => 'is_string',
  60. 'update' => 'text',
  61. 'search' => 'fulltext',
  62. 'list' => true,
  63. ),
  64. 'type' => array
  65. (
  66. 'type' => 'varchar-100',
  67. 'name' => '内容类型-定义小刊下的内页内容类型',
  68. 'default' => '1,2,3,4,5,6,11,12,13',
  69. 'desc' => '内容类型',
  70. 'match' => 'is_numeric',
  71. 'update' => 'checkbox',
  72. 'option' => $type,
  73. ),
  74. 'journal_id' => array
  75. (
  76. 'type' => 'int-11',
  77. 'name' => '主推小刊',
  78. 'default' => '',
  79. 'desc' => '主推小刊',
  80. 'match' => 'is_numeric',
  81. 'update' => $id ? 'select' : 'hidden',
  82. 'update_search' => 'journal/lib/manage.search_journal?cate=' . $id,
  83. ),
  84. 'title' => array
  85. (
  86. 'type' => 'varchar-32',
  87. 'name' => '页面title-公众号支付中的页面标题',
  88. 'default' => '',
  89. 'desc' => '页面title',
  90. 'match' => 'is_string',
  91. 'update' => 'text',
  92. 'search' => 'fulltext',
  93. // 'list' => true,
  94. ),
  95. 'desc' => array
  96. (
  97. 'type' => 'text-255',
  98. 'name' => '简介',
  99. 'default' => '',
  100. 'desc' => '简介',
  101. 'match' => 'option',
  102. 'update' => 'textarea',
  103. ),
  104. 'cover' => array
  105. (
  106. 'type' => 'varchar-150',
  107. 'name' => '封面图-公众号支付中的封面图,图片尺寸460*759px或等比尺寸,上传大小不能超过2M,支持JPG、PNG、GIF格式,建议上传JPG格式',
  108. 'default' => '',
  109. 'desc' => '封面图',
  110. 'match' => 'option',
  111. 'update' => 'image',
  112. 'key' => '1',
  113. 'place' => '150',
  114. ),
  115. 'logo' => array
  116. (
  117. 'type' => 'varchar-150',
  118. 'name' => 'logo图-当前分类的logo图,图片尺寸100*100px或等比尺寸,上传大小不能超过2M,支持JPG、PNG、GIF格式,建议上传JPG格式',
  119. 'default' => '',
  120. 'desc' => 'logo图',
  121. 'match' => 'option',
  122. 'update' => 'image',
  123. 'key' => '1',
  124. 'place' => '150',
  125. ),
  126. 'reorder' => array
  127. (
  128. 'type' => 'int-11',
  129. 'name' => '排序(数值越大越靠前)',
  130. 'default' => '1',
  131. 'desc' => '请输入排序',
  132. 'match' => 'option',
  133. 'update' => 'text',
  134. 'search' => 'order',
  135. 'list' => true,
  136. 'order' => 'desc',
  137. 'edit' => true,
  138. ),
  139. 'code_desc' => array
  140. (
  141. 'type' => 'text-255',
  142. 'name' => '兑换说明',
  143. 'default' => '',
  144. 'desc' => '兑换说明',
  145. 'match' => 'option',
  146. 'update' => 'editor',
  147. ),
  148. 'state' => array
  149. (
  150. 'type' => 'tinyint-1',
  151. 'name' => '状态',
  152. 'default' => '1',
  153. 'desc' => '请选择状态',
  154. 'match' => 'is_numeric',
  155. ),
  156. 'cdate' => array
  157. (
  158. 'type' => 'int-11',
  159. 'name' => '录入时间',
  160. 'match' => array('is_numeric', time()),
  161. 'desc' => '',
  162. # 只有insert时才生效
  163. 'insert' => true,
  164. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  165. ),
  166. ),
  167. # 默认值
  168. 'default' => array
  169. (
  170. 'col' => 'name,state,cdate',
  171. 'value' => array
  172. (
  173. '"默认分类",1,' . time(),
  174. ),
  175. ),
  176. 'manage' => array
  177. (
  178. //'insert' => false,
  179. //'edit' => false,
  180. ),
  181. 'top' => array
  182. (
  183. # 数据来源
  184. 'data' => 'state',
  185. # 菜单名
  186. 'name' => '项目选择',
  187. # 默认值
  188. 'value' => 1,
  189. # 对应的字段值,设置这个之后,所有设置等于这个值的字段,都要遵循这个权限的控制
  190. 'key' => Dever::config('base')->top,
  191. # 本表中代表名称的字段
  192. 'col' => 'name',
  193. ),
  194. 'request' => array
  195. (
  196. 'getAll' => array
  197. (
  198. # 匹配的正则或函数 选填项
  199. 'option' => array
  200. (
  201. 'state' => 1,
  202. ),
  203. 'type' => 'all',
  204. 'order' => array('reorder' => 'desc','id' => 'desc'),
  205. 'col' => '*',
  206. ),
  207. 'getIds' => array
  208. (
  209. # 匹配的正则或函数 选填项
  210. 'option' => array
  211. (
  212. 'ids' => array('yes-id', 'in'),
  213. 'state' => 1,
  214. ),
  215. 'type' => 'all',
  216. 'order' => array('reorder' => 'desc','id' => 'desc'),
  217. 'col' => '*,id as value|id',
  218. ),
  219. ),
  220. );