config.php 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. <?php
  2. $type = array
  3. (
  4. 1 => '主积分',
  5. 2 => '普通积分',
  6. 3 => '可自定义积分',
  7. );
  8. $callback_type = array
  9. (
  10. 1 => '无回调',
  11. 2 => 'Dever组件',
  12. 3 => 'http接口',
  13. 4 => '命令行',
  14. );
  15. return array
  16. (
  17. # 表名
  18. 'name' => 'config',
  19. # 显示给用户看的名称
  20. 'lang' => '积分名称设置',
  21. 'order' => 1,
  22. 'end' => array
  23. (
  24. 'insert' => 'score/lib/manage.config',
  25. 'update' => 'score/lib/manage.config',
  26. ),
  27. # 数据结构
  28. 'struct' => array
  29. (
  30. 'id' => array
  31. (
  32. 'type' => 'int-11',
  33. 'name' => 'ID',
  34. 'default' => '',
  35. 'desc' => '',
  36. 'match' => 'is_numeric',
  37. ),
  38. 'name' => array
  39. (
  40. 'type' => 'varchar-32',
  41. 'name' => '积分名称',
  42. 'default' => '',
  43. 'desc' => '请输入积分名称',
  44. 'match' => 'is_string',
  45. 'update' => 'text',
  46. 'search' => 'fulltext',
  47. 'list' => true,
  48. ),
  49. 'type' => array
  50. (
  51. 'type' => 'int-11',
  52. 'name' => '是否主积分-只能有一个主积分,主积分将作为用户主要积分显示在用户信息中',
  53. 'default' => '2',
  54. 'desc' => '是否主积分',
  55. 'match' => 'is_numeric',
  56. 'update' => 'select',
  57. 'option' => $type,
  58. 'search' => 'select',
  59. 'list' => true,
  60. ),
  61. 'callback_type' => array
  62. (
  63. 'type' => 'tinyint-1',
  64. 'name' => '回调类型',
  65. 'default' => '1',
  66. 'desc' => '回调类型',
  67. 'match' => 'is_numeric',
  68. 'update' => 'select',
  69. 'option' => $callback_type,
  70. 'search' => 'select',
  71. 'control' => 'callback_type',
  72. ),
  73. 'callback_value' => array
  74. (
  75. 'type' => 'varchar-800',
  76. 'name' => '回调地址-积分增减成功后,将自动调取回调,会把user_log表的数据传过去,如果代码中设置了回调,该回调将失效',
  77. 'default' => '',
  78. 'desc' => '回调地址',
  79. 'match' => 'is_string',
  80. 'update' => 'textarea',
  81. 'show' => 'callback_type=2,3,4',
  82. ),
  83. 'reorder' => array
  84. (
  85. 'type' => 'int-11',
  86. 'name' => '排序(数值越大越靠前)',
  87. 'default' => '1',
  88. 'desc' => '请输入排序',
  89. 'match' => 'option',
  90. 'update' => 'text',
  91. 'search' => 'order',
  92. 'list' => true,
  93. 'order' => 'desc',
  94. 'edit' => true,
  95. ),
  96. 'state' => array
  97. (
  98. 'type' => 'tinyint-1',
  99. 'name' => '状态',
  100. 'default' => '1',
  101. 'desc' => '请选择状态',
  102. 'match' => 'is_numeric',
  103. ),
  104. 'cdate' => array
  105. (
  106. 'type' => 'int-11',
  107. 'name' => '录入时间',
  108. 'match' => array('is_numeric', time()),
  109. 'desc' => '',
  110. # 只有insert时才生效
  111. 'insert' => true,
  112. ),
  113. ),
  114. 'manage' => array
  115. (
  116. # 列表
  117. 'list_button' => array
  118. (
  119. 'list' => array('规则设置', '"rule&search_option_config_id={id}&oper_parent=config"'),
  120. 'list1' => array('自定义积分列表', '"config_child&search_option_config_id={id}&oper_parent=config"', '{type} == 3'),
  121. ),
  122. ),
  123. 'request' => array
  124. (
  125. # 更新
  126. 'set' => array
  127. (
  128. 'type' => 'update',
  129. 'set' => array
  130. (
  131. 'type' => '2',
  132. ),
  133. ),
  134. ),
  135. );