info.php 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205
  1. <?php
  2. $share = function()
  3. {
  4. $array = array();
  5. $info = Dever::load('poster/template-state');
  6. if($info)
  7. {
  8. $array += $info;
  9. }
  10. return $array;
  11. };
  12. return array
  13. (
  14. # 表名
  15. 'name' => 'info',
  16. # 显示给用户看的名称
  17. 'lang' => '产品列表',
  18. # 后台菜单排序
  19. 'order' => 10,
  20. 'end' => array
  21. (
  22. 'update' => 'code/lib/manage.create',
  23. 'insert' => 'code/lib/manage.create',
  24. ),
  25. # 数据结构
  26. 'struct' => array
  27. (
  28. 'id' => array
  29. (
  30. 'type' => 'int-11',
  31. 'name' => 'ID',
  32. 'default' => '',
  33. 'desc' => '',
  34. 'match' => 'is_numeric',
  35. 'search' => 'order',
  36. //'list' => true,
  37. 'order' => 'desc',
  38. ),
  39. 'name' => array
  40. (
  41. 'type' => 'varchar-80',
  42. 'name' => '产品名称',
  43. 'default' => '',
  44. 'desc' => '请输入产品名称',
  45. 'match' => 'is_string',
  46. 'update' => 'text',
  47. 'search' => 'fulltext',
  48. 'list' => true,
  49. ),
  50. 'pic' => array
  51. (
  52. 'type' => 'varchar-150',
  53. 'name' => '产品封面-图片大小:750px*390px',
  54. 'default' => '',
  55. 'desc' => '产品封面',
  56. 'match' => 'is_string',
  57. 'update' => 'image',
  58. 'key' => '1',
  59. 'place' => '150',
  60. ),
  61. 'price' => array
  62. (
  63. 'type' => 'varchar-100',
  64. 'name' => '显示价格-前台显示的价格,请加上单位',
  65. 'default' => '',
  66. 'desc' => '显示价格',
  67. 'match' => 'is_string',
  68. 'update' => 'text',
  69. 'search' => 'fulltext',
  70. 'list' => true,
  71. ),
  72. 'pay_price' => array
  73. (
  74. 'type' => 'varchar-100',
  75. 'name' => '支付价格-直接输入数字,单位人民币',
  76. 'default' => '',
  77. 'desc' => '支付价格',
  78. 'match' => 'is_string',
  79. 'update' => 'text',
  80. 'search' => 'fulltext',
  81. 'list' => true,
  82. ),
  83. 'code' => array
  84. (
  85. 'type' => 'varchar-50',
  86. 'name' => '兑换码数量-直接填写数字即可,系统将自动生成对应数量的兑换码',
  87. 'default' => '',
  88. 'desc' => '兑换码数量',
  89. 'match' => 'is_string',
  90. 'update' => 'text',
  91. 'show' => 'type=2',
  92. ),
  93. 'focus' => array
  94. (
  95. 'type' => 'text-255',
  96. 'name' => '产品焦点图',
  97. 'default' => '',
  98. 'desc' => '产品焦点图',
  99. 'match' => 'option',
  100. //'update' => 'images',
  101. 'key' => '1',
  102. 'place' => '150',
  103. ),
  104. 'share' => array
  105. (
  106. 'type' => 'text-255',
  107. 'name' => '产品分享海报',
  108. 'default' => '',
  109. 'desc' => '产品分享海报',
  110. 'match' => 'option',
  111. 'update' => 'checkbox',
  112. 'option' => $share,
  113. ),
  114. /*
  115. 'share_pic' => array
  116. (
  117. 'type' => 'varchar-150',
  118. 'name' => '分享海报图-如果为空,则读取基本配置中的海报图。图片大小:750px*390px',
  119. 'default' => '',
  120. 'desc' => '分享海报图',
  121. 'match' => 'option',
  122. 'update' => 'image',
  123. 'key' => '1',
  124. 'place' => '150',
  125. ),
  126. */
  127. 'content' => array
  128. (
  129. 'type' => 'text-255',
  130. 'name' => '产品介绍',
  131. 'default' => '',
  132. 'desc' => '产品介绍',
  133. 'match' => 'is_string',
  134. 'update' => 'editor',
  135. ),
  136. 'reorder' => array
  137. (
  138. 'type' => 'int-11',
  139. 'name' => '排序(数值越大越靠前)',
  140. 'default' => '1',
  141. 'desc' => '请输入排序',
  142. 'match' => 'option',
  143. 'update' => 'text',
  144. 'search' => 'order',
  145. 'list' => true,
  146. 'order' => 'desc',
  147. 'edit' => true,
  148. ),
  149. 'state' => array
  150. (
  151. 'type' => 'tinyint-1',
  152. 'name' => '状态',
  153. 'default' => '1',
  154. 'desc' => '请选择状态',
  155. 'match' => 'is_numeric',
  156. ),
  157. 'cdate' => array
  158. (
  159. 'type' => 'int-11',
  160. 'name' => '录入时间',
  161. 'match' => array('is_numeric', time()),
  162. 'desc' => '',
  163. # 只有insert时才生效
  164. 'insert' => true,
  165. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  166. ),
  167. ),
  168. 'manage' => array
  169. (
  170. 'list_button' => array
  171. (
  172. 'list1' => array('兑换码列表', '"info&project=code&search_option_product_id={id}&oper_parent=info&oper_project=product"'),
  173. )
  174. ),
  175. 'request' => array
  176. (
  177. 'getAll' => array
  178. (
  179. # 匹配的正则或函数 选填项
  180. 'option' => array
  181. (
  182. 'state' => 1,
  183. ),
  184. 'type' => 'all',
  185. 'order' => array('reorder' => 'desc', 'cdate' => 'desc'),
  186. 'page' => array(10, 'list'),
  187. 'col' => 'id,name,pic,price,pay_price,reorder,cdate,state,share,focus',
  188. ),
  189. ),
  190. );