config_profit.php 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. <?php
  2. $status = array
  3. (
  4. 1 => '已结算',
  5. 2 => '未结算',
  6. );
  7. return array
  8. (
  9. # 表名
  10. 'name' => 'config_profit',
  11. # 显示给用户看的名称
  12. 'lang' => '钱包收益设置',
  13. 'menu' => false,
  14. 'check' => 'key',
  15. # 数据结构
  16. 'struct' => array
  17. (
  18. 'id' => array
  19. (
  20. 'type' => 'int-11',
  21. 'name' => 'ID',
  22. 'default' => '',
  23. 'desc' => '',
  24. 'match' => 'is_numeric',
  25. 'search' => 'order',
  26. 'list' => true,
  27. ),
  28. 'config_id' => array
  29. (
  30. 'type' => 'int-11',
  31. 'name' => '账户id',
  32. 'default' => '',
  33. 'desc' => '账户id',
  34. 'match' => 'is_numeric',
  35. 'update' => 'hidden',
  36. 'value' => Dever::input('set_config_id'),
  37. ),
  38. 'name' => array
  39. (
  40. 'type' => 'varchar-150',
  41. 'name' => '收益名称',
  42. 'default' => '',
  43. 'desc' => '收益名称',
  44. 'match' => 'is_string',
  45. 'update' => 'text',
  46. 'list' => true,
  47. ),
  48. 'key' => array
  49. (
  50. 'type' => 'varchar-50',
  51. 'name' => '唯一标识',
  52. 'default' => '',
  53. 'desc' => '唯一标识',
  54. 'match' => 'is_string',
  55. 'update' => 'text',
  56. 'search' => 'fulltext',
  57. 'list' => true,
  58. ),
  59. 'account/config_profit_rule'=> array
  60. (
  61. 'name' => '收益规则设置-“层级”为0是当前数值入库时的用户,输入1就是入库用户的直推上级,符合“条件”才能拿到收益[如{a}>1 && {a}<=100],根据“公式”可以计算出具体收益[如{a}*0.1]',
  62. 'default' => '',
  63. 'desc' => '收益规则设置',
  64. 'match' => 'option',
  65. 'sync' => array('profit_id' => 'id'),
  66. 'update' => array(1),
  67. 'update_type' => 2,
  68. ),
  69. 'reorder' => array
  70. (
  71. 'type' => 'int-11',
  72. 'name' => '排序(数值越大越靠前)',
  73. 'default' => '1',
  74. 'desc' => '请输入排序',
  75. 'match' => 'option',
  76. 'update' => 'text',
  77. 'search' => 'order',
  78. 'list_name' => '排序',
  79. 'list' => true,
  80. 'order' => 'desc',
  81. 'edit' => true,
  82. ),
  83. 'state' => array
  84. (
  85. 'type' => 'tinyint-1',
  86. 'name' => '状态',
  87. 'default' => '1',
  88. 'desc' => '请选择状态',
  89. 'match' => 'is_numeric',
  90. ),
  91. 'cdate' => array
  92. (
  93. 'type' => 'int-11',
  94. 'name' => '交易时间',
  95. 'match' => array('is_numeric', time()),
  96. 'desc' => '',
  97. # 只有insert时才生效
  98. 'insert' => true,
  99. 'search' => 'date',
  100. 'list_name' => '交易时间',
  101. 'list' => 'date("Y-m-d H:i", {cdate})',
  102. ),
  103. ),
  104. 'manage' => array
  105. (
  106. 'desc' => '<blockquote class="layui-elem-quote">条件变量定义:<br />
  107. {a}:当前数值,如订单金额<br />
  108. {b}:用户ID,适合对某一特殊用户做收益操作<br />
  109. {c}:用户角色ID<br />
  110. {d}:为用户角色下的等级数值<br />
  111. {e}:为当前层级用户的下一层子用户被分走的收益,如当前订单应分10元,我的下级分走了5元,我应该拿到5元,直接用{a}-{e}即可<br />
  112. 后续新增更多,公式里仅支持{a}变量
  113. </blockquote>',
  114. 'link' => 'parent=config.config_profit',
  115. //'insert' => false,
  116. //'edit' => false,
  117. # 自定义快捷新增和编辑
  118. /*
  119. 'button' => array
  120. (
  121. '新增' => array('fast'),
  122. ),
  123. 'list_button' => array
  124. (
  125. 'edit' => array('编辑'),
  126. )*/
  127. ),
  128. 'request' => array
  129. (
  130. ),
  131. );