role_up.php 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. <?php
  2. $role = function()
  3. {
  4. $info = Dever::db('setting/role')->select();
  5. return $info;
  6. };
  7. $role_id = Dever::input('search_option_role_id');
  8. return array
  9. (
  10. # 表名
  11. 'name' => 'role_up',
  12. # 显示给用户看的名称
  13. 'lang' => '自动升级',
  14. 'menu' => false,
  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. 'update' => 'hidden',
  27. //'list' => true,
  28. ),
  29. 'role_id' => array
  30. (
  31. 'type' => 'int-11',
  32. 'name' => '代理商角色',
  33. 'default' => '',
  34. 'desc' => '代理商角色',
  35. 'match' => 'is_numeric',
  36. 'update' => 'hidden',
  37. 'search' => 'hidden',
  38. 'value' => $role_id,
  39. 'list' => 'Dever::load("setting/role-one#name", {role_id})',
  40. ),
  41. 't_role_id' => array
  42. (
  43. 'type' => 'int-11',
  44. 'name' => '升级角色',
  45. 'default' => '',
  46. 'desc' => '升级角色',
  47. 'match' => 'is_numeric',
  48. 'update' => 'radio',
  49. 'search' => 'select',
  50. 'option' => $role,
  51. 'list' => 'Dever::load("setting/role-one#name", {t_role_id})',
  52. 'control' => 't_role_id',
  53. ),
  54. 'num' => array
  55. (
  56. 'type' => 'int-11',
  57. 'name' => '直推人数',
  58. 'default' => '3',
  59. 'desc' => '直推人数',
  60. 'match' => 'is_numeric',
  61. 'update' => 'text',
  62. 'list' => true,
  63. ),
  64. 'sell' => array
  65. (
  66. 'type' => 'varchar-32',
  67. 'name' => '团队业绩-以万为单位',
  68. 'default' => '30',
  69. 'desc' => '团队业绩',
  70. 'match' => 'is_string',
  71. 'update' => 'text',
  72. 'search' => 'fulltext',
  73. 'list' => true,
  74. ),
  75. 'state' => array
  76. (
  77. 'type' => 'tinyint-1',
  78. 'name' => '状态',
  79. 'default' => '1',
  80. 'desc' => '请选择状态',
  81. 'match' => 'is_numeric',
  82. ),
  83. 'cdate' => array
  84. (
  85. 'type' => 'int-11',
  86. 'name' => '创建时间',
  87. 'match' => array('is_numeric', time()),
  88. 'desc' => '',
  89. # 只有insert时才生效
  90. //'insert' => true,
  91. 'search' => 'date',
  92. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  93. ),
  94. ),
  95. 'manage' => array
  96. (
  97. ),
  98. 'request' => array
  99. (
  100. 'getData' => array
  101. (
  102. # 匹配的正则或函数 选填项
  103. 'option' => array
  104. (
  105. 'role_id' => 'yes',
  106. 'state' => 1,
  107. ),
  108. 'order' => array('sell' => 'desc', 'num' => 'desc', 'id' => 'desc'),
  109. 'type' => 'all',
  110. 'col' => '*',
  111. ),
  112. ),
  113. );