video_short.php 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347
  1. <?php
  2. $status = Dever::config('base')->status;
  3. $is_button = array
  4. (
  5. 1 => '显示',
  6. 2 => '不显示',
  7. );
  8. $text = array
  9. (
  10. 1 => '上左',
  11. 2 => '上中',
  12. 3 => '上右',
  13. 4 => '中左',
  14. 5 => '正中',
  15. 6 => '中右',
  16. 7 => '下左',
  17. 8 => '下中',
  18. 9 => '下右',
  19. //10 => '自定义',
  20. );
  21. $bgcolor_type = array
  22. (
  23. 1 => '设置背景颜色',
  24. 2 => '不设置背景颜色',
  25. );
  26. $type = array
  27. (
  28. 1 => '竖屏',
  29. 2 => '横屏',
  30. );
  31. return array
  32. (
  33. # 表名
  34. 'name' => 'video_short',
  35. # 显示给用户看的名称
  36. 'lang' => '短视频',
  37. 'order' => 100,
  38. 'menu' => false,
  39. 'end' => array
  40. (
  41. 'insert' => 'collection/lib/content.updateTypeId',
  42. 'update' => 'collection/lib/content.updateTypeId',
  43. ),
  44. # 数据结构
  45. 'struct' => array
  46. (
  47. 'id' => array
  48. (
  49. 'type' => 'int-11',
  50. 'name' => 'ID',
  51. 'default' => '',
  52. 'desc' => '',
  53. 'match' => 'is_numeric',
  54. //'list' => true,
  55. ),
  56. 'info_id' => array
  57. (
  58. 'type' => 'int-11',
  59. 'name' => '合集',
  60. 'default' => '',
  61. 'desc' => '合集',
  62. 'match' => 'is_numeric',
  63. 'update' => 'hidden',
  64. 'value' => Dever::input('search_option_info_id')
  65. ),
  66. 'content_id' => array
  67. (
  68. 'type' => 'int-11',
  69. 'name' => '合集内容id',
  70. 'default' => '',
  71. 'desc' => '合集内容id',
  72. 'match' => 'is_numeric',
  73. 'update' => 'hidden',
  74. 'value' => Dever::input('search_option_content_id')
  75. ),
  76. 'name' => array
  77. (
  78. 'type' => 'varchar-80',
  79. 'name' => '标题-暂时无用处,仅做区分用',
  80. 'default' => '',
  81. 'desc' => '标题',
  82. 'match' => 'option',
  83. 'update' => 'text',
  84. //'list' => true,
  85. 'search' => 'fulltext',
  86. //增加预览
  87. 'preview' => true,
  88. ),
  89. 'type' => array
  90. (
  91. 'type' => 'tinyint-1',
  92. 'name' => '展示类型',
  93. 'default' => '1',
  94. 'desc' => '展示类型',
  95. 'match' => 'is_numeric',
  96. 'update' => 'radio',
  97. 'option' => $type,
  98. ),
  99. 'pic' => array
  100. (
  101. 'type' => 'varchar-150',
  102. 'name' => '封面图-封面图图片尺寸750*1386px或等比尺寸,上传大小不能超过2M,支持JPG、PNG、GIF格式,建议上传JPG格式',
  103. 'default' => '',
  104. 'desc' => '封面图',
  105. 'match' => 'option',
  106. 'update' => 'image',
  107. 'key' => '1',
  108. 'place' => '750*1386',
  109. 'list' => '"<img src=\"{pic}\" class=\"dever-pic\" width=\"150\" \/>"',
  110. ),
  111. 'video' => array
  112. (
  113. 'type' => 'varchar-800',
  114. 'name' => '上传视频-视频格式mp4,上传大小不能超过4G',
  115. 'default' => '',
  116. 'desc' => '上传点播视频',
  117. 'match' => 'is_string',
  118. 'update' => 'upload',
  119. 'key' => '5',
  120. 'place' => '150',
  121. 'upload' => 'qiniu',
  122. 'large' => true,
  123. //不覆盖原文件,生成新文件
  124. 'cover' => 2,
  125. ),
  126. 'udate' => array
  127. (
  128. 'type' => 'int-11',
  129. 'name' => '更新时间',
  130. 'match' => array('is_numeric', time()),
  131. 'desc' => '',
  132. ),
  133. 'video_info' => array
  134. (
  135. 'type' => 'text-255',
  136. 'name' => '视频信息',
  137. 'default' => '',
  138. 'desc' => '视频信息',
  139. 'match' => 'is_string',
  140. ),
  141. 'text' => array
  142. (
  143. 'type' => 'text-1000',
  144. 'name' => '文字设置',
  145. 'default' => '',
  146. 'desc' => '文字设置',
  147. 'match' => 'is_string',
  148. 'option' => $text,
  149. 'update' => array
  150. (
  151. array
  152. (
  153. 'col' => 'name',
  154. 'name' => '文字内容',
  155. 'default' => '',
  156. 'desc' => '文字内容',
  157. 'match' => 'is_string',
  158. 'update' => 'textarea',
  159. ),
  160. array
  161. (
  162. 'col' => 'color',
  163. 'name' => '文字颜色',
  164. 'default' => '#000000',
  165. 'desc' => '文字颜色',
  166. 'match' => 'is_string',
  167. 'update' => 'color',
  168. ),
  169. array
  170. (
  171. 'col' => 'bgcolor_type',
  172. 'name' => '是否设置背景颜色',
  173. 'default' => '2',
  174. 'desc' => '是否设置背景颜色',
  175. 'match' => 'is_string',
  176. 'update' => 'radio',
  177. 'option' => $bgcolor_type,
  178. 'control' => 'bgcolor_type',
  179. ),
  180. array
  181. (
  182. 'col' => 'bgcolor',
  183. 'name' => '背景颜色',
  184. 'default' => '#000000',
  185. 'desc' => '背景颜色',
  186. 'match' => 'is_string',
  187. 'update' => 'color',
  188. 'show' => 'bgcolor_type=1'
  189. ),
  190. array
  191. (
  192. 'col' => 'size',
  193. 'name' => '文字大小-直接输入像素数字',
  194. 'default' => '16',
  195. 'desc' => '结果描述',
  196. 'match' => 'is_numeric',
  197. 'update' => 'text',
  198. ),
  199. array
  200. (
  201. 'col' => 'goods_id',
  202. 'name' => '选择商品',
  203. 'default' => '',
  204. 'desc' => '选择商品',
  205. 'match' => 'option',
  206. 'update' => 'select',
  207. 'update_search' => 'goods/lib/manage.search',
  208. ),
  209. ),
  210. ),
  211. 'is_button' => array
  212. (
  213. 'type' => 'int-11',
  214. 'name' => '是否显示保存按钮',
  215. 'default' => '2',
  216. 'desc' => '是否显示保存按钮',
  217. 'match' => 'is_numeric',
  218. 'update' => 'radio',
  219. 'option' => $is_button,
  220. 'control' => 'is_button',
  221. ),
  222. 'button_name' => array
  223. (
  224. 'type' => 'varchar-80',
  225. 'name' => '保存按钮文字内容',
  226. 'default' => '保存图片',
  227. 'desc' => '保存按钮文字内容',
  228. 'match' => 'option',
  229. 'update' => 'textarea',
  230. 'show' => 'is_button=1',
  231. ),
  232. 'button_color' => array
  233. (
  234. 'type' => 'varchar-10',
  235. 'name' => '保存按钮文字颜色',
  236. 'default' => '#000000',
  237. 'desc' => '保存按钮文字颜色',
  238. 'match' => 'option',
  239. 'update' => 'color',
  240. 'show' => 'is_button=1',
  241. ),
  242. 'udate' => array
  243. (
  244. 'type' => 'int-11',
  245. 'name' => '更新时间',
  246. 'match' => array('is_numeric', time()),
  247. 'desc' => '',
  248. ),
  249. 'status' => array
  250. (
  251. 'type' => 'int-11',
  252. 'name' => '发布状态',
  253. 'default' => '1',
  254. 'desc' => '发布状态',
  255. 'match' => 'is_numeric',
  256. //'update' => 'select',
  257. 'option' => $status,
  258. //'search' => 'select',
  259. //'list' => true,
  260. //'edit' => true,
  261. ),
  262. 'reorder' => array
  263. (
  264. 'type' => 'int-11',
  265. 'name' => '排序(数值越大越靠前)',
  266. 'default' => '1',
  267. 'desc' => '请输入排序',
  268. 'match' => 'option',
  269. //'update' => 'text',
  270. 'search' => 'order',
  271. 'list' => true,
  272. 'order' => 'desc',
  273. 'edit' => true,
  274. ),
  275. 'state' => array
  276. (
  277. 'type' => 'tinyint-1',
  278. 'name' => '状态',
  279. 'default' => '1',
  280. 'desc' => '请选择状态',
  281. 'match' => 'is_numeric',
  282. ),
  283. 'cdate' => array
  284. (
  285. 'type' => 'int-11',
  286. 'name' => '录入时间',
  287. 'match' => array('is_numeric', time()),
  288. 'desc' => '',
  289. # 只有insert时才生效
  290. 'insert' => true,
  291. ),
  292. ),
  293. # 管理功能
  294. 'manage' => array
  295. (
  296. ),
  297. # request 请求接口定义
  298. 'request' => array
  299. (
  300. 'getAll' => array
  301. (
  302. # 匹配的正则或函数 选填项
  303. 'option' => array
  304. (
  305. 'info_id' => 'yes',
  306. 'content_id' => 'yes',
  307. 'state' => 1,
  308. ),
  309. 'type' => 'all',
  310. 'order' => array('reorder' => 'desc', 'id' => 'desc'),
  311. 'col' => '*',
  312. ),
  313. ),
  314. );