123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378 |
- <?php
- $project = function()
- {
- $array = array();
- $data = Dever::load('account/config_project-state');
- if($data)
- {
- $array += $data;
- }
- return $array;
- };
- $money = function()
- {
- $array = array();
- $data = Dever::load('account/money-state');
- if($data)
- {
- $array += $data;
- }
- return $array;
- };
- $is_withdraw = array
- (
- 1 => '可以提现',
- 2 => '不可以提现',
- );
- $type = array
- (
- 1 => '主账户',
- 2 => '普通账户',
- );
- $is_pay = array
- (
- 1 => '可以充值',
- 2 => '不可以充值',
- );
- $pay_channel = function()
- {
- return Dever::load('pay/channel-state');
- };
- $pay_project = function()
- {
- return Dever::load('pay/project-state');
- };
- return array
- (
- # 表名
- 'name' => 'config',
- # 显示给用户看的名称
- 'lang' => '账户名称设置',
- # 是否显示在后台菜单
- 'check' => 'key',
- 'order' => 1,
- 'end' => array
- (
- 'insert' => 'account/lib/manage.config',
- 'update' => 'account/lib/manage.config',
- ),
- # 数据结构
- 'struct' => array
- (
- 'id' => array
- (
- 'type' => 'int-11',
- 'name' => 'ID',
- 'default' => '',
- 'desc' => '',
- 'match' => 'is_numeric',
- 'list' => true,
- ),
-
- 'name' => array
- (
- 'type' => 'varchar-32',
- 'name' => '账户名称',
- 'default' => '',
- 'desc' => '请输入账户名称',
- 'match' => 'is_string',
- 'update' => 'text',
- 'search' => 'fulltext',
- 'list' => true,
- ),
- 'key' => array
- (
- 'type' => 'varchar-50',
- 'name' => '账户唯一标识',
- 'default' => '',
- 'desc' => '账户唯一标识',
- 'match' => 'is_string',
- 'update' => 'text',
- 'search' => 'fulltext',
- 'list' => true,
- ),
- 'type' => array
- (
- 'type' => 'int-11',
- 'name' => '是否主账户-只能有一个主账户,主主账户将作为用户主要账户显示在用户信息中',
- 'default' => '2',
- 'desc' => '是否主账户',
- 'match' => 'is_numeric',
- 'update' => 'radio',
- 'option' => $type,
- 'search' => 'select',
- 'list' => true,
- ),
- 'info' => array
- (
- 'type' => 'varchar-800',
- 'name' => '账户名称介绍',
- 'default' => '',
- 'desc' => '账户名称介绍',
- 'match' => 'option',
- 'update' => 'textarea',
- ),
- 'project_id' => array
- (
- 'type' => 'int-11',
- 'name' => '所属项目',
- 'default' => '1',
- 'desc' => '所属项目',
- 'match' => 'is_numeric',
- 'update' => 'radio',
- 'option' => $project,
- 'list' => true,
- ),
- 'money_id' => array
- (
- 'type' => 'int-11',
- 'name' => '关联法定货币',
- 'default' => '1',
- 'desc' => '关联法定货币',
- 'match' => 'is_numeric',
- 'update' => 'radio',
- 'option' => $money,
- 'list' => true,
- ),
- 'balance_alert' => array
- (
- 'type' => 'varchar-11',
- 'name' => '消耗下限-输入100,就是当余额小于等于100时,无法继续消耗,以元为单位,一般为限制授信账户',
- 'default' => '0',
- 'desc' => '消耗下限',
- 'match' => 'option',
- 'update' => 'text',
- ),
- 'is_pay' => array
- (
- 'type' => 'tinyint-1',
- 'name' => '是否可充值',
- 'default' => '1',
- 'desc' => '是否可充值',
- 'match' => 'is_numeric',
- 'update' => 'radio',
- 'option' => $is_pay,
- 'control' => 'is_pay',
- 'tab' => 1,
- ),
- 'pay_info' => array
- (
- 'type' => 'varchar-800',
- 'name' => '充值介绍',
- 'default' => '',
- 'desc' => '充值介绍',
- 'match' => 'option',
- 'update' => 'textarea',
- 'show' => 'is_pay=1',
- 'tab' => 1,
- ),
- 'pay_channel_id' => array
- (
- 'type' => 'int-11',
- 'name' => '充值支付渠道',
- 'default' => '1',
- 'desc' => '充值支付渠道',
- 'match' => 'is_numeric',
- 'update' => 'select',
- 'option' => $pay_channel,
- 'tab' => 1,
- 'show' => 'is_pay=1',
- ),
- 'pay_project_id' => array
- (
- 'type' => 'int-11',
- 'name' => '充值支付项目',
- 'default' => '1',
- 'desc' => '充值支付项目',
- 'match' => 'is_numeric',
- 'update' => 'select',
- 'option' => $pay_project,
- 'tab' => 1,
- 'show' => 'is_pay=1',
- ),
- 'is_withdraw' => array
- (
- 'type' => 'tinyint-1',
- 'name' => '是否可提现',
- 'default' => '1',
- 'desc' => '是否可提现',
- 'match' => 'is_numeric',
- 'update' => 'radio',
- 'option' => $is_withdraw,
- 'control' => 'is_withdraw',
- 'tab' => 2,
- ),
- 'withdraw_up' => array
- (
- 'type' => 'varchar-11',
- 'name' => '提现上限-每次提现的上限,0不限制,以元为单位',
- 'default' => '0',
- 'desc' => '提现上限',
- 'match' => 'option',
- 'update' => 'text',
- 'show' => 'is_withdraw=1',
- 'tab' => 2,
- ),
- 'withdraw_down' => array
- (
- 'type' => 'varchar-11',
- 'name' => '提现下限-每次提现的下限,0不限制,输入100,就是余额至少有100才能提现,以元为单位',
- 'default' => '0',
- 'desc' => '提现下限',
- 'match' => 'option',
- 'update' => 'text',
- 'show' => 'is_withdraw=1',
- 'tab' => 2,
- ),
- 'withdraw_fee' => array
- (
- 'type' => 'varchar-11',
- 'name' => '提现手续费-输入10%就是百分之10%',
- 'default' => '10%',
- 'desc' => '提现手续费',
- 'match' => 'option',
- 'update' => 'text',
- 'show' => 'is_withdraw=1',
- 'tab' => 2,
- ),
- 'withdraw_audit' => array
- (
- 'type' => 'tinyint-1',
- 'name' => '提现审核',
- 'default' => '1',
- 'desc' => '提现审核',
- 'match' => 'is_numeric',
- 'update' => 'radio',
- 'option' => array(1 => '需要审核', 2 => '不需要审核'),
- 'show' => 'is_withdraw=1',
- 'tab' => 2,
- ),
- 'withdraw_grant' => array
- (
- 'type' => 'tinyint-1',
- 'name' => '发放审核',
- 'default' => '1',
- 'desc' => '发放审核',
- 'match' => 'is_numeric',
- 'update' => 'radio',
- 'option' => array(1 => '需要审核', 2 => '不需要审核'),
- 'show' => 'is_withdraw=1',
- 'tab' => 2,
- ),
- 'withdraw_check' => array
- (
- 'type' => 'varchar-1500',
- 'name' => '提现验证接口-提现时,可以自定义验证接口,仅支持dever::load方法',
- 'default' => '',
- 'desc' => '提现验证接口',
- 'match' => 'option',
- 'update' => 'textarea',
- 'show' => 'is_withdraw=1',
- 'tab' => 2,
- ),
- 'reorder' => array
- (
- 'type' => 'int-11',
- 'name' => '优先级-扣款时,优先级数字大优先使用',
- 'default' => '1',
- 'desc' => '优先级',
- 'match' => 'option',
- 'update' => 'text',
- 'search' => 'order',
- 'list' => true,
- 'order' => 'desc',
- 'edit' => true,
- ),
-
- 'state' => array
- (
- 'type' => 'tinyint-1',
- 'name' => '状态',
- 'default' => '1',
- 'desc' => '请选择状态',
- 'match' => 'is_numeric',
- ),
-
- 'cdate' => array
- (
- 'type' => 'int-11',
- 'name' => '录入时间',
- 'match' => array('is_numeric', time()),
- 'desc' => '',
- # 只有insert时才生效
- 'insert' => true,
- //'search' => 'date',
- //'list' => 'date("Y-m-d H:i:s", {cdate})',
- ),
- ),
- 'manage' => array
- (
- //'insert_check' => 'info',
- 'update_check' => 'info',
- 'tab' => array('基本配置', '充值配置', '提现配置'),
- 'button' => array
- (
- '项目配置' => array('list', 'config_project&parent=config'),
- '交易类型配置' => array('list', 'config_type&parent=config'),
- ),
- 'list_button' => array
- (
- 'list' => array('账户列表', '"info&set_config_id={id}&parent=config"'),
- 'list3' => array('收益列表', '"profit&set_config_id={id}&parent=config"'),
- 'list1' => array('充值卡列表', '"config_card&set_config_id={id}&parent=config"'),
- 'list2' => array('收益设置', '"config_profit&set_config_id={id}&parent=config"'),
- )
- ),
- /*
- 'default' => array
- (
- 'col' => 'name,project_id,state,cdate',
- 'value' => array
- (
- '"默认账户", 1, 1,' . DEVER_TIME,
- ),
- ),
- */
- 'request' => array
- (
- 'getData' => array
- (
- 'type' => 'all',
- 'option' => array
- (
- 'ids' => array('yes-id', 'in'),
- 'state' => 1,
- ),
- 'col' => '*',
- ),
- )
- );
|