prize.php 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182
  1. <?php
  2. $type = array
  3. (
  4. //1 => '街道',
  5. 2 => '直推佣金',
  6. //3 => '九阳自动炒菜机套餐',
  7. );
  8. $role = function()
  9. {
  10. $info = Dever::db('setting/role')->select();
  11. return $info;
  12. };
  13. $level = function()
  14. {
  15. $info = Dever::db('area/level')->select();
  16. return $info;
  17. };
  18. return array
  19. (
  20. # 表名
  21. 'name' => 'prize',
  22. # 显示给用户看的名称
  23. 'lang' => '名额配置',
  24. # 后台菜单排序
  25. 'order' => 1,
  26. # 数据结构
  27. 'struct' => array
  28. (
  29. 'id' => array
  30. (
  31. 'type' => 'int-11',
  32. 'name' => 'ID',
  33. 'default' => '',
  34. 'desc' => '',
  35. 'match' => 'is_numeric',
  36. 'search' => 'order',
  37. 'list' => true,
  38. 'order' => 'desc',
  39. ),
  40. 'name' => array
  41. (
  42. 'type' => 'varchar-200',
  43. 'name' => '名称',
  44. 'default' => '',
  45. 'desc' => '名称',
  46. 'match' => 'is_string',
  47. 'update' => 'text',
  48. 'search' => 'fulltext',
  49. 'list' => true,
  50. ),
  51. 'desc' => array
  52. (
  53. 'type' => 'varchar-500',
  54. 'name' => '描述',
  55. 'default' => '',
  56. 'desc' => '描述',
  57. 'match' => 'option',
  58. 'update' => 'textarea',
  59. //'search' => 'fulltext',
  60. //'list' => true,
  61. ),
  62. 'type' => array
  63. (
  64. 'type' => 'tinyint-1',
  65. 'name' => '名额类型',
  66. 'default' => '2',
  67. 'desc' => '名额类型',
  68. 'match' => 'is_numeric',
  69. 'update' => 'radio',
  70. 'option' => $type,
  71. 'search' => 'select',
  72. 'list' => true,
  73. 'control' => 'type',
  74. ),
  75. 'role' => array
  76. (
  77. 'type' => 'int-11',
  78. 'name' => '推荐角色',
  79. 'default' => '-1',
  80. 'desc' => '推荐角色',
  81. 'match' => 'is_numeric',
  82. 'update' => 'radio',
  83. 'option' => $role,
  84. 'show' => 'type=2',
  85. ),
  86. 'level' => array
  87. (
  88. 'type' => 'int-11',
  89. 'name' => '城市等级',
  90. 'default' => '-1',
  91. 'desc' => '城市等级',
  92. 'match' => 'is_numeric',
  93. //'update' => 'radio',
  94. 'option' => $level,
  95. 'show' => 'type=1',
  96. ),
  97. 'price' => array
  98. (
  99. 'type' => 'varchar-11',
  100. 'name' => '价值-以元为单位,如输入40000,就是4万元,选择街道时,代表赠送价值4万元的街道',//,如果为空,则按照选择的城市等级赠送
  101. 'default' => '0',
  102. 'desc' => '价值',
  103. 'match' => 'option',
  104. 'update' => 'text',
  105. 'list' => true,
  106. ),
  107. 'per' => array
  108. (
  109. 'type' => 'varchar-11',
  110. 'name' => '百分比数值-输入60代表60%,选择创客时,代表推荐创客可以获得60%的佣金',
  111. 'default' => '0',
  112. 'desc' => '价值',
  113. 'match' => 'option',
  114. 'update' => 'text',
  115. 'show' => 'type=2,3',
  116. ),
  117. 'num' => array
  118. (
  119. 'type' => 'int-11',
  120. 'name' => '默认数量',
  121. 'default' => '1',
  122. 'desc' => '数量',
  123. 'match' => 'is_numeric',
  124. 'update' => 'text',
  125. 'list' => true,
  126. ),
  127. 'state' => array
  128. (
  129. 'type' => 'tinyint-1',
  130. 'name' => '状态',
  131. 'default' => '1',
  132. 'desc' => '请选择状态',
  133. 'match' => 'is_numeric',
  134. ),
  135. 'cdate' => array
  136. (
  137. 'type' => 'int-11',
  138. 'name' => '创建时间',
  139. 'match' => array('is_numeric', time()),
  140. 'desc' => '',
  141. # 只有insert时才生效
  142. 'insert' => true,
  143. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  144. ),
  145. ),
  146. 'manage' => array
  147. (
  148. 'list_button' => array
  149. (
  150. 'location1' => array('权益设置', Dever::url('lib/prize_set.home', 'agent')),
  151. )
  152. ),
  153. 'request' => array
  154. (
  155. 'getInfo' => array
  156. (
  157. # 匹配的正则或函数 选填项
  158. 'option' => array
  159. (
  160. 'type' => array('yes', 'in'),
  161. 'state' => 1,
  162. ),
  163. 'type' => 'all',
  164. 'col' => '*',
  165. ),
  166. ),
  167. );