auditing.php 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204
  1. <?php
  2. /**
  3. * tester
  4. */
  5. $status = array
  6. (
  7. 1 => '审核中',
  8. 2 => '审核成功',
  9. 3 => '审核失败',
  10. );
  11. $user = function()
  12. {
  13. $array = array();
  14. $info = Dever::load('component/user-state');
  15. if($info)
  16. {
  17. $array += $info;
  18. }
  19. return $array;
  20. };
  21. $template = function()
  22. {
  23. $array = array();
  24. $info = Dever::load('component_applet/template-state');
  25. if($info)
  26. {
  27. $array += $info;
  28. }
  29. return $array;
  30. };
  31. $version = function()
  32. {
  33. $array = array();
  34. $info = Dever::load('component_applet/version-state');
  35. if($info)
  36. {
  37. $array += $info;
  38. }
  39. return $array;
  40. };
  41. return array
  42. (
  43. # 表名
  44. 'name' => 'auditing',
  45. # 显示给用户看的名称
  46. 'lang' => '审核历史',
  47. 'desc' => '这里会实时请求微信审核接口,访问速度会慢一些。后续放到cron里。',
  48. 'order' => 2,
  49. # 数据结构
  50. 'struct' => array
  51. (
  52. 'id' => array
  53. (
  54. 'type' => 'int-11',
  55. 'name' => 'ID',
  56. 'default' => '',
  57. 'desc' => '',
  58. 'match' => 'is_numeric',
  59. 'search' => 'order',
  60. //'list' => true,
  61. ),
  62. 'project_id' => array
  63. (
  64. 'type' => 'int-11',
  65. 'name' => '项目',
  66. 'default' => '',
  67. 'desc' => '请输入项目',
  68. 'match' => 'is_numeric',
  69. ),
  70. 'version_id' => array
  71. (
  72. 'type' => 'int-11',
  73. 'name' => '版本',
  74. 'default' => '',
  75. 'desc' => '版本',
  76. 'match' => 'is_numeric',
  77. //'search' => 'order,fulltext',
  78. 'update' => 'checkbox',
  79. 'option' => $version,
  80. //'list' => true,
  81. ),
  82. 'name' => array
  83. (
  84. 'type' => 'varchar-60',
  85. 'name' => '版本号',
  86. 'default' => '',
  87. 'desc' => '版本号',
  88. 'match' => 'is_string',
  89. 'update' => 'text',
  90. 'search' => 'fulltext',
  91. 'list' => '"{name}" ? "{name}" : Dever::load("component_applet/version-one#name", {version_id})',
  92. ),
  93. 'user_id' => array
  94. (
  95. 'type' => 'int-11',
  96. 'name' => '用户',
  97. 'default' => '',
  98. 'desc' => '用户',
  99. 'match' => 'is_numeric',
  100. //'search' => 'order,fulltext',
  101. 'update' => 'select',
  102. 'option' => $user,
  103. 'list' => true,
  104. ),
  105. 'auditid' => array
  106. (
  107. 'type' => 'varchar-40',
  108. 'name' => '审核id',
  109. 'default' => '',
  110. 'desc' => '审核id',
  111. 'match' => 'option',
  112. 'update' => 'text',
  113. 'list' => true,
  114. 'edit' => true,
  115. ),
  116. 'result' => array
  117. (
  118. 'type' => 'text-255',
  119. 'name' => '微信返回信息',
  120. 'default' => '',
  121. 'desc' => '微信返回信息',
  122. 'match' => 'option',
  123. 'update' => 'textarea',
  124. 'list' => true,
  125. 'modal' => '查看详情',
  126. ),
  127. 'status' => array
  128. (
  129. 'type' => 'tinyint-1',
  130. 'name' => '审核状态',
  131. 'default' => '1',
  132. 'desc' => '审核状态',
  133. 'match' => 'is_numeric',
  134. 'update' => 'select',
  135. 'option' => $status,
  136. //'list' => true,
  137. //'edit' => true,
  138. ),
  139. 'statusDesc' => array
  140. (
  141. 'type' => 'varchar-140',
  142. 'name' => '审核说明',
  143. 'default' => '',
  144. 'desc' => '审核说明',
  145. 'match' => 'option',
  146. 'update' => 'textarea',
  147. 'list' => 'Dever::load("component_applet/auditing.view", {id})',
  148. ),
  149. 'state' => array
  150. (
  151. 'type' => 'tinyint-1',
  152. 'name' => '状态',
  153. 'default' => '1',
  154. 'desc' => '请选择状态',
  155. 'match' => 'is_numeric',
  156. ),
  157. 'mdate' => array
  158. (
  159. 'type' => 'int-11',
  160. 'name' => '审核时间',
  161. 'match' => array('is_numeric', time()),
  162. 'desc' => '',
  163. 'default' => '',
  164. 'order' => 'desc',
  165. 'list' => 'date("Y-m-d H:i:s", {mdate})',
  166. ),
  167. 'cdate' => array
  168. (
  169. 'type' => 'int-11',
  170. 'name' => '提交时间',
  171. 'match' => array('is_numeric', time()),
  172. 'desc' => '',
  173. # 只有insert时才生效
  174. 'insert' => true,
  175. //'list' => 'date("Y-m-d H:i:s", {cdate})',
  176. ),
  177. ),
  178. 'top' => Dever::config('base', 'component')->top,
  179. 'manage' => array
  180. (
  181. 'edit' => false,
  182. 'delete' => false,
  183. 'insert' => false,
  184. ),
  185. );