dialogue.php 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233
  1. <?php
  2. $status = Dever::config('base')->status;
  3. $type = array
  4. (
  5. 1 => '文字',
  6. 2 => '图片',
  7. 3 => '音频',
  8. );
  9. $location = array
  10. (
  11. 1 => '显示在左侧',
  12. 2 => '显示在右侧',
  13. );
  14. return array
  15. (
  16. # 表名
  17. 'name' => 'dialogue',
  18. # 显示给用户看的名称
  19. 'lang' => '对话模板',
  20. 'order' => 100,
  21. 'menu' => false,
  22. # 数据结构
  23. 'struct' => array
  24. (
  25. 'id' => array
  26. (
  27. 'type' => 'int-11',
  28. 'name' => 'ID',
  29. 'default' => '',
  30. 'desc' => '',
  31. 'match' => 'is_numeric',
  32. 'list' => true,
  33. ),
  34. 'info_id' => array
  35. (
  36. 'type' => 'int-11',
  37. 'name' => '合集',
  38. 'default' => '',
  39. 'desc' => '合集',
  40. 'match' => 'is_numeric',
  41. 'update' => 'hidden',
  42. 'value' => Dever::input('search_option_info_id')
  43. ),
  44. 'content_id' => array
  45. (
  46. 'type' => 'int-11',
  47. 'name' => '合集内容id',
  48. 'default' => '',
  49. 'desc' => '合集内容id',
  50. 'match' => 'is_numeric',
  51. 'update' => 'hidden',
  52. 'value' => Dever::input('search_option_content_id')
  53. ),
  54. 'pic' => array
  55. (
  56. 'type' => 'varchar-150',
  57. 'name' => '置顶图片-图片尺寸750*422px或等比尺寸,上传大小不能超过2M,支持JPG、PNG、GIF格式,建议上传JPG格式。为空则不显示',
  58. 'default' => '',
  59. 'desc' => '图片',
  60. 'match' => 'option',
  61. 'update' => 'image',
  62. 'key' => '1',
  63. 'place' => '750*422',
  64. ),
  65. 'num' => array
  66. (
  67. 'type' => 'int-11',
  68. 'name' => '默认显示多少条',
  69. 'default' => '4',
  70. 'desc' => '默认显示多少条',
  71. 'match' => 'is_numeric',
  72. 'update' => 'text',
  73. ),
  74. 'text' => array
  75. (
  76. 'type' => 'text-1000',
  77. 'name' => '对话设置',
  78. 'default' => '',
  79. 'desc' => '对话设置',
  80. 'match' => 'is_string',
  81. 'update' => array
  82. (
  83. array
  84. (
  85. 'col' => 'location',
  86. 'name' => '对话位置',
  87. 'default' => '1',
  88. 'desc' => '对话位置',
  89. 'match' => 'is_string',
  90. 'update' => 'radio',
  91. 'option' => $location,
  92. ),
  93. array
  94. (
  95. 'col' => 'avatar',
  96. 'name' => '头像-图片尺寸120*120px或等比尺寸,上传大小不能超过2M,支持JPG、PNG、GIF格式,建议上传JPG格式。',
  97. 'default' => '',
  98. 'desc' => '头像',
  99. 'match' => 'option',
  100. 'update' => 'image',
  101. 'key' => 1,
  102. 'place' => '120*120',
  103. ),
  104. array
  105. (
  106. 'col' => 'type',
  107. 'name' => '对话类型',
  108. 'default' => '1',
  109. 'desc' => '对话类型',
  110. 'match' => 'is_string',
  111. 'update' => 'radio',
  112. 'option' => $type,
  113. 'control' => 'type',
  114. ),
  115. array
  116. (
  117. 'col' => 'words',
  118. 'name' => '文字内容-为空则不显示',
  119. 'default' => '',
  120. 'desc' => '文字内容',
  121. 'match' => 'option',
  122. 'update' => 'textarea',
  123. 'show' => 'type=1'
  124. ),
  125. array
  126. (
  127. 'col' => 'pic',
  128. 'name' => '图片-图片尺寸750*1386px或不限尺寸,上传大小不能超过2M,支持JPG、PNG、GIF格式,建议上传JPG格式,可以上传GIF格式。为空则不显示',
  129. 'default' => '',
  130. 'desc' => '图片',
  131. 'match' => 'option',
  132. 'update' => 'image',
  133. 'key' => 1,
  134. 'place' => '750*1386',
  135. 'show' => 'type=2',
  136. ),
  137. array
  138. (
  139. 'col' => 'audio',
  140. 'name' => '音频-音频格式mp3,上传大小不能超过100M,为空则不显示',
  141. 'default' => '',
  142. 'desc' => '音频',
  143. 'match' => 'option',
  144. 'update' => 'upload',
  145. 'key' => 2,
  146. 'show' => 'type=3'
  147. ),
  148. ),
  149. ),
  150. 'udate' => array
  151. (
  152. 'type' => 'int-11',
  153. 'name' => '更新时间',
  154. 'match' => array('is_numeric', time()),
  155. 'desc' => '',
  156. ),
  157. 'status' => array
  158. (
  159. 'type' => 'int-11',
  160. 'name' => '发布状态',
  161. 'default' => '1',
  162. 'desc' => '发布状态',
  163. 'match' => 'is_numeric',
  164. //'update' => 'select',
  165. 'option' => $status,
  166. 'search' => 'select',
  167. 'list' => true,
  168. 'edit' => true,
  169. ),
  170. 'reorder' => array
  171. (
  172. 'type' => 'int-11',
  173. 'name' => '排序(数值越大越靠前)',
  174. 'default' => '1',
  175. 'desc' => '请输入排序',
  176. 'match' => 'option',
  177. //'update' => 'text',
  178. 'search' => 'order',
  179. 'list' => true,
  180. 'order' => 'desc',
  181. 'edit' => true,
  182. ),
  183. 'state' => array
  184. (
  185. 'type' => 'tinyint-1',
  186. 'name' => '状态',
  187. 'default' => '1',
  188. 'desc' => '请选择状态',
  189. 'match' => 'is_numeric',
  190. ),
  191. 'cdate' => array
  192. (
  193. 'type' => 'int-11',
  194. 'name' => '录入时间',
  195. 'match' => array('is_numeric', time()),
  196. 'desc' => '',
  197. # 只有insert时才生效
  198. 'insert' => true,
  199. ),
  200. ),
  201. # 管理功能
  202. 'manage' => array
  203. (
  204. ),
  205. # request 请求接口定义
  206. 'request' => array
  207. (
  208. ),
  209. );