user_bind.php 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323
  1. <?php
  2. $status = array
  3. (
  4. 1 => '未核实',
  5. 2 => '已核实',
  6. 3 => '驳回',
  7. );
  8. $manage_audit = array
  9. (
  10. //1 => '未核实',
  11. 2 => '已核实',
  12. 3 => '驳回',
  13. );
  14. $type = array
  15. (
  16. 1 => '个人',
  17. 2 => '公司',
  18. );
  19. $col = Dever::input('col');
  20. return array
  21. (
  22. # 表名
  23. 'name' => 'user_bind',
  24. # 显示给用户看的名称
  25. 'lang' => '零售绑定认证',
  26. 'end' => array
  27. (
  28. 'update' => 'agent/lib/manage.updateUserBind',
  29. ),
  30. 'order' => 1,
  31. # 数据结构
  32. 'struct' => array
  33. (
  34. 'id' => array
  35. (
  36. 'type' => 'int-11',
  37. 'name' => 'ID',
  38. 'default' => '',
  39. 'desc' => '',
  40. 'match' => 'is_numeric',
  41. 'search' => 'order',
  42. //'list' => true,
  43. ),
  44. 'uid' => array
  45. (
  46. 'type' => 'int-11',
  47. 'name' => '绑定用户',
  48. 'default' => '',
  49. 'desc' => '绑定用户',
  50. 'match' => 'is_numeric',
  51. 'update' => 'text',
  52. 'list_name' => '昵称',
  53. 'list' => '{uid} > 0 ? Dever::load("passport/user-find#username", {uid}) : "匿名用户"',
  54. 'list_order' => 1,
  55. ),
  56. 'mid' => array
  57. (
  58. 'type' => 'int-11',
  59. 'name' => '代理商姓名/手机号',
  60. 'default' => '-1',
  61. 'desc' => '代理商',
  62. 'match' => 'is_string',
  63. 'update' => 'text',
  64. 'search' => array
  65. (
  66. 'api' => 'agent/member-getSearch',
  67. 'col' => 'col',
  68. 'result' => 'id',
  69. 'search' => 'mid',
  70. ),
  71. 'list_name' => '代理商信息',
  72. 'list' => 'Dever::load("agent/lib/member.getOne", {mid}, "agent/member", true)',
  73. 'list_order' => 3,
  74. ),
  75. 'name' => array
  76. (
  77. 'type' => 'varchar-100',
  78. 'name' => '绑定姓名',
  79. 'default' => '',
  80. 'desc' => '姓名',
  81. 'match' => 'is_string',
  82. 'update' => 'text',
  83. //'search' => 'fulltext',
  84. //'list' => true,
  85. 'list_order' => 4,
  86. ),
  87. 'mobile' => array
  88. (
  89. 'type' => 'bigint-11',
  90. 'name' => '手机号',
  91. 'default' => '',
  92. 'desc' => '请输入手机号',
  93. 'match' => Dever::rule('mobile'),
  94. 'update' => 'text',
  95. //'search' => 'fulltext',
  96. 'list' => true,
  97. 'list_order' => 2,
  98. ),
  99. 'type' => array
  100. (
  101. 'type' => 'tinyint-1',
  102. 'name' => '类型',
  103. 'default' => '1',
  104. 'desc' => '类型',
  105. 'match' => 'is_numeric',
  106. 'option' => $type,
  107. 'update' => 'radio',
  108. 'control' => 'type',
  109. ),
  110. 'idcard' => array
  111. (
  112. 'type' => 'varchar-32',
  113. 'name' => '身份证号码',
  114. 'default' => '',
  115. 'desc' => '身份证号码',
  116. 'match' => 'is_string',
  117. 'update' => 'text',
  118. 'search' => 'fulltext',
  119. 'list' => true,
  120. 'list_order' => 5,
  121. ),
  122. 'idcard_front' => array
  123. (
  124. 'type' => 'varchar-150',
  125. 'name' => '身份证正面',
  126. 'default' => '',
  127. 'desc' => '身份证正面',
  128. 'match' => 'option',
  129. 'update' => 'image',
  130. 'key' => '8',
  131. 'place' => '660*660',
  132. ),
  133. 'idcard_back' => array
  134. (
  135. 'type' => 'varchar-150',
  136. 'name' => '身份证背面',
  137. 'default' => '',
  138. 'desc' => '身份证背面',
  139. 'match' => 'option',
  140. 'update' => 'image',
  141. 'key' => '8',
  142. 'place' => '660*660',
  143. ),
  144. 'company_name' => array
  145. (
  146. 'type' => 'varchar-100',
  147. 'name' => '公司名称',
  148. 'default' => '',
  149. 'desc' => '公司名称',
  150. 'match' => 'is_string',
  151. 'update' => 'text',
  152. //'search' => 'fulltext',
  153. //'list' => true,
  154. 'show' => 'type=2',
  155. ),
  156. 'company_pic' => array
  157. (
  158. 'type' => 'varchar-150',
  159. 'name' => '营业执照',
  160. 'default' => '',
  161. 'desc' => '营业执照',
  162. 'match' => 'option',
  163. 'update' => 'image',
  164. 'key' => '8',
  165. 'place' => '660*660',
  166. 'show' => 'type=2',
  167. ),
  168. 'company_number' => array
  169. (
  170. 'type' => 'varchar-80',
  171. 'name' => '营业执照号码',
  172. 'default' => '',
  173. 'desc' => '营业执照号码',
  174. 'match' => 'is_string',
  175. 'update' => 'text',
  176. 'show' => 'type=2',
  177. ),
  178. 'status' => array
  179. (
  180. 'type' => 'tinyint-1',
  181. 'name' => '状态',
  182. 'default' => '1',
  183. 'desc' => '状态',
  184. 'match' => 'is_numeric',
  185. 'option' => $status,
  186. 'search' => 'select',
  187. 'list' => true,
  188. ),
  189. 'audit' => array
  190. (
  191. 'type' => 'int-11',
  192. 'name' => '审核状态',
  193. 'default' => '2',
  194. 'desc' => '审核状态',
  195. 'match' => 'is_numeric',
  196. 'update' => $col ? 'radio' : false,
  197. 'option' => $manage_audit,
  198. 'mul' => true,
  199. 'control' => 'audit',
  200. ),
  201. 'audit_desc' => array
  202. (
  203. 'type' => 'varchar-600',
  204. 'name' => '备注',
  205. 'default' => '',
  206. 'desc' => '审核说明',
  207. 'match' => 'is_string',
  208. 'update' => $col ? 'textarea' : false,
  209. // 'list' => '"{audit_desc}" ? "{audit_desc}" : "-"',
  210. // 'list_order' => 9,
  211. 'show' => 'audit=3',
  212. ),
  213. 'audit_date' => array
  214. (
  215. 'type' => 'int-11',
  216. 'name' => '审核时间',
  217. 'default' => '',
  218. 'match' => 'is_numeric',
  219. 'desc' => '审核时间',
  220. ),
  221. 'admin' => array
  222. (
  223. 'type' => 'int-11',
  224. 'name' => '操作人',
  225. 'default' => '',
  226. 'match' => 'is_numeric',
  227. 'desc' => '操作人',
  228. //'list' => '"{admin}" > 0 ? Dever::load("manage/admin-find#username", {admin}) : "-"',
  229. ),
  230. 'state' => array
  231. (
  232. 'type' => 'tinyint-1',
  233. 'name' => '状态',
  234. 'default' => '1',
  235. 'desc' => '请选择状态',
  236. 'match' => 'is_numeric',
  237. ),
  238. 'cdate' => array
  239. (
  240. 'type' => 'int-11',
  241. 'name' => '申请日期',
  242. 'match' => array('is_numeric', time()),
  243. 'desc' => '',
  244. # 只有insert时才生效
  245. 'insert' => true,
  246. 'search' => 'date',
  247. 'list' => 'date("Y-m-d H:i", {cdate})',
  248. 'list_order' => 3,
  249. ),
  250. ),
  251. 'manage' => array
  252. (
  253. 'insert' => false,
  254. 'delete' => false,
  255. 'edit' => false,
  256. 'page_list' => 'user_bind',
  257. 'list_button' => array
  258. (
  259. 'list' => array('查看详情', '"user_bind&id={id}&page_type=1"'),
  260. //'edit' => array('退款', 'status,tk_time,tk_pic,tk_desc,tk_admin,tk_status', '{status} == 6'),
  261. 'edit' => array('审核', 'audit,audit_desc', '{status} == 1'),
  262. //'delete' => array('删除关联', '', '{status} == 2'),
  263. ),
  264. ),
  265. 'request' => array
  266. (
  267. 'getInfo' => array
  268. (
  269. # 匹配的正则或函数 选填项
  270. 'option' => array
  271. (
  272. 'status' => 2,
  273. 'state' => 1,
  274. ),
  275. 'order' => array('id' => 'desc'),
  276. 'type' => 'one',
  277. 'col' => '*',
  278. ),
  279. 'getData' => array
  280. (
  281. # 匹配的正则或函数 选填项
  282. 'option' => array
  283. (
  284. 'idcard' => 'yes',
  285. 'id' => array('yes', '!='),
  286. 'status' => 2,
  287. 'state' => 1,
  288. ),
  289. 'order' => array('id' => 'desc'),
  290. 'type' => 'all',
  291. 'page' => array(20, 'list'),
  292. 'col' => '*',
  293. ),
  294. ),
  295. );