config.php 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378
  1. <?php
  2. $project = function()
  3. {
  4. $array = array();
  5. $data = Dever::load('account/config_project-state');
  6. if($data)
  7. {
  8. $array += $data;
  9. }
  10. return $array;
  11. };
  12. $money = function()
  13. {
  14. $array = array();
  15. $data = Dever::load('account/money-state');
  16. if($data)
  17. {
  18. $array += $data;
  19. }
  20. return $array;
  21. };
  22. $is_withdraw = array
  23. (
  24. 1 => '可以提现',
  25. 2 => '不可以提现',
  26. );
  27. $type = array
  28. (
  29. 1 => '主账户',
  30. 2 => '普通账户',
  31. );
  32. $is_pay = array
  33. (
  34. 1 => '可以充值',
  35. 2 => '不可以充值',
  36. );
  37. $pay_channel = function()
  38. {
  39. return Dever::load('pay/channel-state');
  40. };
  41. $pay_project = function()
  42. {
  43. return Dever::load('pay/project-state');
  44. };
  45. return array
  46. (
  47. # 表名
  48. 'name' => 'config',
  49. # 显示给用户看的名称
  50. 'lang' => '账户名称设置',
  51. # 是否显示在后台菜单
  52. 'check' => 'key',
  53. 'order' => 1,
  54. 'end' => array
  55. (
  56. 'insert' => 'account/lib/manage.config',
  57. 'update' => 'account/lib/manage.config',
  58. ),
  59. # 数据结构
  60. 'struct' => array
  61. (
  62. 'id' => array
  63. (
  64. 'type' => 'int-11',
  65. 'name' => 'ID',
  66. 'default' => '',
  67. 'desc' => '',
  68. 'match' => 'is_numeric',
  69. 'list' => true,
  70. ),
  71. 'name' => array
  72. (
  73. 'type' => 'varchar-32',
  74. 'name' => '账户名称',
  75. 'default' => '',
  76. 'desc' => '请输入账户名称',
  77. 'match' => 'is_string',
  78. 'update' => 'text',
  79. 'search' => 'fulltext',
  80. 'list' => true,
  81. ),
  82. 'key' => array
  83. (
  84. 'type' => 'varchar-50',
  85. 'name' => '账户唯一标识',
  86. 'default' => '',
  87. 'desc' => '账户唯一标识',
  88. 'match' => 'is_string',
  89. 'update' => 'text',
  90. 'search' => 'fulltext',
  91. 'list' => true,
  92. ),
  93. 'type' => array
  94. (
  95. 'type' => 'int-11',
  96. 'name' => '是否主账户-只能有一个主账户,主主账户将作为用户主要账户显示在用户信息中',
  97. 'default' => '2',
  98. 'desc' => '是否主账户',
  99. 'match' => 'is_numeric',
  100. 'update' => 'radio',
  101. 'option' => $type,
  102. 'search' => 'select',
  103. 'list' => true,
  104. ),
  105. 'info' => array
  106. (
  107. 'type' => 'varchar-800',
  108. 'name' => '账户名称介绍',
  109. 'default' => '',
  110. 'desc' => '账户名称介绍',
  111. 'match' => 'option',
  112. 'update' => 'textarea',
  113. ),
  114. 'project_id' => array
  115. (
  116. 'type' => 'int-11',
  117. 'name' => '所属项目',
  118. 'default' => '1',
  119. 'desc' => '所属项目',
  120. 'match' => 'is_numeric',
  121. 'update' => 'radio',
  122. 'option' => $project,
  123. 'list' => true,
  124. ),
  125. 'money_id' => array
  126. (
  127. 'type' => 'int-11',
  128. 'name' => '关联法定货币',
  129. 'default' => '1',
  130. 'desc' => '关联法定货币',
  131. 'match' => 'is_numeric',
  132. 'update' => 'radio',
  133. 'option' => $money,
  134. 'list' => true,
  135. ),
  136. 'balance_alert' => array
  137. (
  138. 'type' => 'varchar-11',
  139. 'name' => '消耗下限-输入100,就是当余额小于等于100时,无法继续消耗,以元为单位,一般为限制授信账户',
  140. 'default' => '0',
  141. 'desc' => '消耗下限',
  142. 'match' => 'option',
  143. 'update' => 'text',
  144. ),
  145. 'is_pay' => array
  146. (
  147. 'type' => 'tinyint-1',
  148. 'name' => '是否可充值',
  149. 'default' => '1',
  150. 'desc' => '是否可充值',
  151. 'match' => 'is_numeric',
  152. 'update' => 'radio',
  153. 'option' => $is_pay,
  154. 'control' => 'is_pay',
  155. 'tab' => 1,
  156. ),
  157. 'pay_info' => array
  158. (
  159. 'type' => 'varchar-800',
  160. 'name' => '充值介绍',
  161. 'default' => '',
  162. 'desc' => '充值介绍',
  163. 'match' => 'option',
  164. 'update' => 'textarea',
  165. 'show' => 'is_pay=1',
  166. 'tab' => 1,
  167. ),
  168. 'pay_channel_id' => array
  169. (
  170. 'type' => 'int-11',
  171. 'name' => '充值支付渠道',
  172. 'default' => '1',
  173. 'desc' => '充值支付渠道',
  174. 'match' => 'is_numeric',
  175. 'update' => 'select',
  176. 'option' => $pay_channel,
  177. 'tab' => 1,
  178. 'show' => 'is_pay=1',
  179. ),
  180. 'pay_project_id' => array
  181. (
  182. 'type' => 'int-11',
  183. 'name' => '充值支付项目',
  184. 'default' => '1',
  185. 'desc' => '充值支付项目',
  186. 'match' => 'is_numeric',
  187. 'update' => 'select',
  188. 'option' => $pay_project,
  189. 'tab' => 1,
  190. 'show' => 'is_pay=1',
  191. ),
  192. 'is_withdraw' => array
  193. (
  194. 'type' => 'tinyint-1',
  195. 'name' => '是否可提现',
  196. 'default' => '1',
  197. 'desc' => '是否可提现',
  198. 'match' => 'is_numeric',
  199. 'update' => 'radio',
  200. 'option' => $is_withdraw,
  201. 'control' => 'is_withdraw',
  202. 'tab' => 2,
  203. ),
  204. 'withdraw_up' => array
  205. (
  206. 'type' => 'varchar-11',
  207. 'name' => '提现上限-每次提现的上限,0不限制,以元为单位',
  208. 'default' => '0',
  209. 'desc' => '提现上限',
  210. 'match' => 'option',
  211. 'update' => 'text',
  212. 'show' => 'is_withdraw=1',
  213. 'tab' => 2,
  214. ),
  215. 'withdraw_down' => array
  216. (
  217. 'type' => 'varchar-11',
  218. 'name' => '提现下限-每次提现的下限,0不限制,输入100,就是余额至少有100才能提现,以元为单位',
  219. 'default' => '0',
  220. 'desc' => '提现下限',
  221. 'match' => 'option',
  222. 'update' => 'text',
  223. 'show' => 'is_withdraw=1',
  224. 'tab' => 2,
  225. ),
  226. 'withdraw_fee' => array
  227. (
  228. 'type' => 'varchar-11',
  229. 'name' => '提现手续费-输入10%就是百分之10%',
  230. 'default' => '10%',
  231. 'desc' => '提现手续费',
  232. 'match' => 'option',
  233. 'update' => 'text',
  234. 'show' => 'is_withdraw=1',
  235. 'tab' => 2,
  236. ),
  237. 'withdraw_audit' => array
  238. (
  239. 'type' => 'tinyint-1',
  240. 'name' => '提现审核',
  241. 'default' => '1',
  242. 'desc' => '提现审核',
  243. 'match' => 'is_numeric',
  244. 'update' => 'radio',
  245. 'option' => array(1 => '需要审核', 2 => '不需要审核'),
  246. 'show' => 'is_withdraw=1',
  247. 'tab' => 2,
  248. ),
  249. 'withdraw_grant' => array
  250. (
  251. 'type' => 'tinyint-1',
  252. 'name' => '发放审核',
  253. 'default' => '1',
  254. 'desc' => '发放审核',
  255. 'match' => 'is_numeric',
  256. 'update' => 'radio',
  257. 'option' => array(1 => '需要审核', 2 => '不需要审核'),
  258. 'show' => 'is_withdraw=1',
  259. 'tab' => 2,
  260. ),
  261. 'withdraw_check' => array
  262. (
  263. 'type' => 'varchar-1500',
  264. 'name' => '提现验证接口-提现时,可以自定义验证接口,仅支持dever::load方法',
  265. 'default' => '',
  266. 'desc' => '提现验证接口',
  267. 'match' => 'option',
  268. 'update' => 'textarea',
  269. 'show' => 'is_withdraw=1',
  270. 'tab' => 2,
  271. ),
  272. 'reorder' => array
  273. (
  274. 'type' => 'int-11',
  275. 'name' => '优先级-扣款时,优先级数字大优先使用',
  276. 'default' => '1',
  277. 'desc' => '优先级',
  278. 'match' => 'option',
  279. 'update' => 'text',
  280. 'search' => 'order',
  281. 'list' => true,
  282. 'order' => 'desc',
  283. 'edit' => true,
  284. ),
  285. 'state' => array
  286. (
  287. 'type' => 'tinyint-1',
  288. 'name' => '状态',
  289. 'default' => '1',
  290. 'desc' => '请选择状态',
  291. 'match' => 'is_numeric',
  292. ),
  293. 'cdate' => array
  294. (
  295. 'type' => 'int-11',
  296. 'name' => '录入时间',
  297. 'match' => array('is_numeric', time()),
  298. 'desc' => '',
  299. # 只有insert时才生效
  300. 'insert' => true,
  301. //'search' => 'date',
  302. //'list' => 'date("Y-m-d H:i:s", {cdate})',
  303. ),
  304. ),
  305. 'manage' => array
  306. (
  307. //'insert_check' => 'info',
  308. 'update_check' => 'info',
  309. 'tab' => array('基本配置', '充值配置', '提现配置'),
  310. 'button' => array
  311. (
  312. '项目配置' => array('list', 'config_project&parent=config'),
  313. '交易类型配置' => array('list', 'config_type&parent=config'),
  314. ),
  315. 'list_button' => array
  316. (
  317. 'list' => array('账户列表', '"info&set_config_id={id}&parent=config"'),
  318. 'list3' => array('收益列表', '"profit&set_config_id={id}&parent=config"'),
  319. 'list1' => array('充值卡列表', '"config_card&set_config_id={id}&parent=config"'),
  320. 'list2' => array('收益设置', '"config_profit&set_config_id={id}&parent=config"'),
  321. )
  322. ),
  323. /*
  324. 'default' => array
  325. (
  326. 'col' => 'name,project_id,state,cdate',
  327. 'value' => array
  328. (
  329. '"默认账户", 1, 1,' . DEVER_TIME,
  330. ),
  331. ),
  332. */
  333. 'request' => array
  334. (
  335. 'getData' => array
  336. (
  337. 'type' => 'all',
  338. 'option' => array
  339. (
  340. 'ids' => array('yes-id', 'in'),
  341. 'state' => 1,
  342. ),
  343. 'col' => '*',
  344. ),
  345. )
  346. );