user_report.php 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264
  1. <?php
  2. $status = array
  3. (
  4. 1 => '待审核',
  5. 2 => '审核通过',
  6. 3 => '审核未通过',
  7. );
  8. $score_status = array
  9. (
  10. 1 => '未入账',
  11. 2 => '已入账',
  12. );
  13. return array
  14. (
  15. # 表名
  16. 'name' => 'user_report',
  17. # 显示给用户看的名称
  18. 'lang' => '用户报告',
  19. 'menu' => 'passport',
  20. 'order' => 99,
  21. 'status' => $status,
  22. 'score_status' => $score_status,
  23. 'end' => array
  24. (
  25. 'update' => 'task/lib/manage.report_audit',
  26. ),
  27. # 数据结构
  28. 'struct' => array
  29. (
  30. 'id' => array
  31. (
  32. 'type' => 'int-11',
  33. 'name' => 'ID',
  34. 'default' => '',
  35. 'desc' => '',
  36. 'match' => 'is_numeric',
  37. //'search' => 'order',
  38. 'order' => 'desc',
  39. 'list' => true,
  40. ),
  41. 'uid' => array
  42. (
  43. 'type' => 'int-11',
  44. 'name' => '用户名',
  45. 'default' => '',
  46. 'desc' => '用户名',
  47. 'match' => 'is_numeric',
  48. //'update' => 'text',
  49. 'search' => array
  50. (
  51. 'api' => 'passport/user-all',
  52. 'col' => 'username',
  53. 'result' => 'id',
  54. ),
  55. 'list' => 'Dever::load("passport/user-one#username", {uid})',
  56. ),
  57. 'task_id' => array
  58. (
  59. 'type' => 'int-11',
  60. 'name' => '任务名',
  61. 'default' => '-1',
  62. 'desc' => '任务名',
  63. 'match' => 'is_numeric',
  64. //'update' => 'select',
  65. 'search' => array
  66. (
  67. 'api' => 'task/info-all',
  68. 'col' => 'name',
  69. 'result' => 'id',
  70. ),
  71. 'list' => '{task_id} > 0 ? Dever::load("task/info-one#name", {task_id}) : "系统"',
  72. ),
  73. 'username' => array
  74. (
  75. 'type' => 'varchar-100',
  76. 'name' => '账号名',
  77. 'default' => '',
  78. 'desc' => '账号名',
  79. 'match' => 'is_string',
  80. 'update' => 'text',
  81. 'list_name' => '报告信息',
  82. 'list' => 'Dever::load("task/lib/manage.report", {id})',
  83. ),
  84. 'pic' => array
  85. (
  86. 'type' => 'text-255',
  87. 'name' => '任务截屏',
  88. 'default' => '',
  89. 'desc' => '任务截屏',
  90. 'match' => 'is_string',
  91. 'update' => 'images',
  92. 'key' => '1',
  93. 'place' => '150',
  94. ),
  95. 'link' => array
  96. (
  97. 'type' => 'varchar-100',
  98. 'name' => '链接',
  99. 'default' => '',
  100. 'desc' => '请输入链接',
  101. 'match' => 'is_string',
  102. 'update' => 'text',
  103. //'list' => true,
  104. ),
  105. 'desc' => array
  106. (
  107. 'type' => 'varchar-800',
  108. 'name' => '文字说明',
  109. 'default' => '',
  110. 'desc' => '文字说明',
  111. 'match' => 'option',
  112. 'update' => 'textarea',
  113. ),
  114. 'status' => array
  115. (
  116. 'type' => 'tinyint-1',
  117. 'name' => '审核状态',
  118. 'default' => '1',
  119. 'desc' => '审核状态',
  120. 'match' => 'is_numeric',
  121. 'update' => 'select',
  122. 'option' => $status,
  123. 'search' => 'select',
  124. 'list' => true,
  125. //'edit' => true,
  126. ),
  127. 'status_desc' => array
  128. (
  129. 'type' => 'varchar-300',
  130. 'name' => '审核说明',
  131. 'default' => '',
  132. 'desc' => '请输入审核说明',
  133. 'match' => 'option',
  134. 'update' => 'textarea',
  135. ),
  136. 'score' => array
  137. (
  138. 'type' => 'varchar-11',
  139. 'name' => '积分',
  140. 'default' => '',
  141. 'desc' => '积分',
  142. 'match' => 'is_numeric',
  143. 'update' => 'text',
  144. ),
  145. 'group_score' => array
  146. (
  147. 'type' => 'varchar-11',
  148. 'name' => '下线提成酬劳',
  149. 'default' => '0',
  150. 'match' => '下线提成酬劳',
  151. 'match' => 'is_numeric',
  152. 'update' => 'text',
  153. //'list' => true,
  154. ),
  155. 'score_status' => array
  156. (
  157. 'type' => 'tinyint-1',
  158. 'name' => '是否入账',
  159. 'default' => '1',
  160. 'desc' => '是否入账',
  161. 'match' => 'is_numeric',
  162. 'update' => 'select',
  163. 'option' => $score_status,
  164. 'search' => 'select',
  165. 'list' => true,
  166. ),
  167. 'state' => array
  168. (
  169. 'type' => 'tinyint-1',
  170. 'name' => '状态',
  171. 'default' => '1',
  172. 'desc' => '请选择状态',
  173. 'match' => 'is_numeric',
  174. ),
  175. 'cdate' => array
  176. (
  177. 'type' => 'int-11',
  178. 'name' => '领取时间',
  179. 'match' => array('is_numeric', time()),
  180. 'desc' => '',
  181. # 只有insert时才生效
  182. 'insert' => true,
  183. 'search' => 'date',
  184. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  185. ),
  186. ),
  187. # 更新表结构
  188. 'alter' => array
  189. (
  190. 1 => array
  191. (
  192. array('update', 'score', 'score', 'varchar-11 0 积分'),
  193. array('update', 'group_score', 'group_score', 'varchar-11 0 下线提成酬劳'),
  194. ),
  195. 'version' => 1,
  196. ),
  197. 'manage' => array
  198. (
  199. 'insert' => false,
  200. 'edit' => false,
  201. 'delete' => false,
  202. # page_type = 1
  203. 'page_list_table' => 'photo',
  204. 'photo' => 'task/lib/manage.report_photo',
  205. # 快捷更新
  206. 'list_button' => array
  207. (
  208. 'edit' => array('审核', 'status,status_desc', '{status} == 1'),
  209. ),
  210. ),
  211. 'request' => array
  212. (
  213. 'getAll' => array
  214. (
  215. # 匹配的正则或函数 选填项
  216. 'option' => array
  217. (
  218. 'task_id' => 'yes',
  219. 'uid' => 'yes',
  220. 'status' => 'yes',
  221. 'state' => 1,
  222. ),
  223. 'type' => 'all',
  224. 'order' => array('cdate' => 'desc'),
  225. 'page' => array(15, 'list'),
  226. 'col' => '*',
  227. ),
  228. 'getTotal' => array
  229. (
  230. # 匹配的正则或函数 选填项
  231. 'option' => array
  232. (
  233. 'task_id' => 'yes',
  234. 'uid' => 'yes',
  235. 'status' => array(3, '!='),
  236. 'state' => 1,
  237. ),
  238. 'type' => 'count',
  239. ),
  240. )
  241. );