auth.php 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308
  1. <?php
  2. $type = array
  3. (
  4. 1 => '个人',
  5. 2 => '个体户',
  6. 3 => '企业',
  7. );
  8. $status = array
  9. (
  10. 1 => '审核中',
  11. 2 => '已认证',
  12. 3 => '认证失败',
  13. );
  14. $audit_status = array
  15. (
  16. //1 => '审核中',
  17. 2 => '已审核',
  18. 3 => '审核失败',
  19. );
  20. $col = Dever::input('col');
  21. return array
  22. (
  23. # 表名
  24. 'name' => 'auth',
  25. # 显示给用户看的名称
  26. 'lang' => '认证管理',
  27. # 是否显示在后台菜单
  28. 'order' => 9,
  29. 'end' => array
  30. (
  31. 'update' => 'user/lib/auth.manage_update',
  32. 'updatemul' => 'user/lib/auth.manage_update',
  33. ),
  34. # 数据结构
  35. 'struct' => array
  36. (
  37. 'id' => array
  38. (
  39. 'type' => 'int-11',
  40. 'name' => 'ID',
  41. 'default' => '',
  42. 'desc' => '',
  43. 'match' => 'is_numeric',
  44. ),
  45. 'uid' => array
  46. (
  47. 'type' => 'int-11',
  48. 'name' => '用户名',
  49. 'default' => '0',
  50. 'desc' => '请选择用户',
  51. 'match' => 'is_numeric',
  52. 'update' => 'hidden',
  53. 'search' => array
  54. (
  55. 'api' => 'user/info-like',
  56. 'col' => 'search',
  57. 'result' => 'id',
  58. ),
  59. 'value' => Dever::input('search_option_uid'),
  60. 'list' => 'Dever::load("user/lib/info.get#name", {uid})',
  61. ),
  62. 'name' => array
  63. (
  64. 'type' => 'varchar-100',
  65. 'name' => '真实姓名',
  66. 'default' => '',
  67. 'desc' => '真实姓名',
  68. 'match' => 'is_string',
  69. 'update' => 'text',
  70. 'search' => 'fulltext',
  71. 'list' => true,
  72. ),
  73. 'idcard' => array
  74. (
  75. 'type' => 'varchar-150',
  76. 'name' => '身份证号',
  77. 'default' => '',
  78. 'desc' => '身份证号',
  79. 'match' => 'option',
  80. 'update' => 'text',
  81. 'list' => true,
  82. ),
  83. 'idcard_front' => array
  84. (
  85. 'type' => 'varchar-150',
  86. 'name' => '身份证正面-如果是个人,这里上传联系人身份证,如果是个体户或者企业,这里上传法人身份证',
  87. 'default' => '',
  88. 'desc' => '身份证正面',
  89. 'match' => 'option',
  90. 'update' => 'image',
  91. 'key' => '8',
  92. ),
  93. 'idcard_back' => array
  94. (
  95. 'type' => 'varchar-150',
  96. 'name' => '身份证背面-如果是个人,这里上传联系人身份证,如果是个体户或者企业,这里上传法人身份证',
  97. 'default' => '',
  98. 'desc' => '身份证背面',
  99. 'match' => 'option',
  100. 'update' => 'image',
  101. 'key' => '8',
  102. ),
  103. 'type' => array
  104. (
  105. 'type' => 'tinyint-1',
  106. 'name' => '认证身份',
  107. 'default' => '1',
  108. 'desc' => '认证身份',
  109. 'match' => 'is_numeric',
  110. 'update' => 'radio',
  111. 'search' => 'select',
  112. 'option' => $type,
  113. 'control' => 'type',
  114. 'list' => true,
  115. ),
  116. 'company_license' => array
  117. (
  118. 'type' => 'varchar-150',
  119. 'name' => '营业执照',
  120. 'default' => '',
  121. 'desc' => '企业营业执照',
  122. 'match' => 'option',
  123. 'update' => 'image',
  124. 'key' => '8',
  125. 'show' => 'identity=2,3',
  126. ),
  127. 'company_name' => array
  128. (
  129. 'type' => 'varchar-200',
  130. 'name' => '企业全称',
  131. 'default' => '',
  132. 'desc' => '企业全称',
  133. 'match' => 'option',
  134. //'update' => 'text',
  135. 'show' => 'identity=2,3',
  136. ),
  137. 'company_number' => array
  138. (
  139. 'type' => 'varchar-200',
  140. 'name' => '社会信用代码',
  141. 'default' => '',
  142. 'desc' => '社会信用代码',
  143. 'match' => 'option',
  144. //'update' => 'text',
  145. 'show' => 'identity=2,3',
  146. ),
  147. 'tel' => array
  148. (
  149. 'type' => 'varchar-50',
  150. 'name' => '联系电话',
  151. 'default' => '',
  152. 'desc' => '联系电话',
  153. 'match' => 'is_string',
  154. 'update' => 'text',
  155. //'search' => 'fulltext',
  156. //'list' => true,
  157. ),
  158. 'email' => array
  159. (
  160. 'type' => 'varchar-50',
  161. 'name' => '联系邮箱',
  162. 'default' => '',
  163. 'desc' => '联系邮箱',
  164. 'match' => 'option',
  165. 'update' => 'text',
  166. //'search' => 'fulltext',
  167. //'list' => true,
  168. ),
  169. 'area' => array
  170. (
  171. 'type' => 'varchar-500',
  172. 'name' => '城市地区',
  173. 'default' => '',
  174. 'desc' => '城市地区',
  175. 'match' => 'option',
  176. 'search' => 'linkage',
  177. 'update' => 'linkage',
  178. 'option' => Dever::url('api.get?level_total=3', 'area'),
  179. //'list' => 'Dever::load("area/api.string", "{area}")',
  180. ),
  181. 'address' => array
  182. (
  183. 'type' => 'varchar-1000',
  184. 'name' => '联系地址',
  185. 'default' => '',
  186. 'desc' => '联系地址',
  187. 'match' => 'option',
  188. 'update' => 'text',
  189. //'list' => true,
  190. ),
  191. 'status' => array
  192. (
  193. 'type' => 'int-11',
  194. 'name' => '状态',
  195. 'default' => '1',
  196. 'desc' => '状态',
  197. 'match' => 'is_numeric',
  198. 'update' => 'select',
  199. 'option' => $status,
  200. 'search' => 'select',
  201. 'list' => true,
  202. //'edit' => true,
  203. ),
  204. 'audit_admin' => array
  205. (
  206. 'type' => 'int-11',
  207. 'name' => '审核人',
  208. 'default' => '',
  209. 'match' => 'is_numeric',
  210. 'desc' => '审核人',
  211. 'list' => '"{audit_admin}" > 0 ? Dever::load("manage/admin-find#username", {audit_admin}) : "-"',
  212. ),
  213. 'audit_status' => array
  214. (
  215. 'type' => 'tinyint-1',
  216. 'name' => '审核状态',
  217. 'default' => '2',
  218. 'desc' => '审核状态',
  219. 'match' => 'is_numeric',
  220. 'option' => $audit_status,
  221. 'update' => $col ? 'radio' : false,
  222. 'control' => 'audit_status',
  223. ),
  224. 'audit_desc' => array
  225. (
  226. 'type' => 'varchar-500',
  227. 'name' => '审核备注',
  228. 'default' => '',
  229. 'desc' => '审核备注',
  230. 'match' => 'is_string',
  231. 'update' => $col ? 'textarea' : false,
  232. 'show' => 'audit_status=3',
  233. 'list' => '"{audit_desc}" ? "{audit_desc}" : "-"',
  234. ),
  235. 'audit_date' => array
  236. (
  237. 'type' => 'int-11',
  238. 'name' => '审核时间',
  239. 'match' => 'is_numeric',
  240. 'desc' => '审核时间',
  241. 'default' => '',
  242. 'list' => '{audit_date} ? date("Y-m-d H:i:s", {audit_date}) : "-"',
  243. ),
  244. 'state' => array
  245. (
  246. 'type' => 'tinyint-1',
  247. 'name' => '状态',
  248. 'default' => '1',
  249. 'desc' => '请选择状态',
  250. 'match' => 'is_numeric',
  251. ),
  252. 'cdate' => array
  253. (
  254. 'type' => 'int-11',
  255. 'name' => '申请时间',
  256. 'match' => array('is_numeric', time()),
  257. 'desc' => '',
  258. # 只有insert时才生效
  259. //'insert' => true,
  260. 'search' => 'date',
  261. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  262. ),
  263. ),
  264. 'index' => array
  265. (
  266. 1 => array (
  267. 'uid' => 'uid',
  268. ),
  269. 'version' => 1,
  270. ),
  271. 'manage' => array
  272. (
  273. 'delete' => false,
  274. 'edit' => false,
  275. 'insert' => false,
  276. # 列表
  277. 'list_button' => array
  278. (
  279. 'edit' => array('审核', 'audit_status,audit_desc', '{status} == 1'),
  280. ),
  281. ),
  282. );