config.php 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. <?php
  2. $seller = function()
  3. {
  4. return Dever::db('code/seller')->state();
  5. };
  6. return array
  7. (
  8. # 表名
  9. 'name' => 'config',
  10. # 显示给用户看的名称
  11. 'lang' => '新增兑换码',
  12. 'order' => 1,
  13. 'menu' => false,
  14. 'end' => array
  15. (
  16. 'update' => 'code/lib/manage.create',
  17. 'insert' => 'code/lib/manage.create',
  18. ),
  19. # 数据结构
  20. 'struct' => array
  21. (
  22. 'id' => array
  23. (
  24. 'type' => 'int-11',
  25. 'name' => '系统ID',
  26. 'default' => '',
  27. 'desc' => '',
  28. 'match' => 'is_numeric',
  29. 'value' => Dever::input('where_id'),
  30. ),
  31. 'product' => array
  32. (
  33. 'type' => 'varchar-200',
  34. 'name' => '选择小刊',
  35. 'default' => '',
  36. 'desc' => '选择小刊',
  37. 'search' => 'linkage',
  38. 'update' => 'linkage',//多级联动 用于搜索
  39. 'option' => Dever::url('lib/manage.search_cate_journal', 'journal'),
  40. ),
  41. 'product_id' => array
  42. (
  43. 'type' => 'int-11',
  44. 'name' => '选择小刊',
  45. 'default' => '',
  46. 'desc' => '选择小刊',
  47. 'match' => 'option',
  48. //'update' => 'select',
  49. //'update_search' => 'journal/lib/manage.search_journal',
  50. ),
  51. 'seller_id' => array
  52. (
  53. 'type' => 'int-11',
  54. 'name' => '选择销售商',
  55. 'default' => '1',
  56. 'desc' => '选择销售商',
  57. 'match' => 'option',
  58. 'update' => 'select',
  59. 'option' => $seller,
  60. ),
  61. 'num' => array
  62. (
  63. 'type' => 'varchar-32',
  64. 'name' => '兑换码数量',
  65. 'default' => '',
  66. 'desc' => '请输入兑换码数量',
  67. 'match' => 'is_string',
  68. 'update' => 'text',
  69. 'value' => '',
  70. ),
  71. 'product_num' => array
  72. (
  73. 'type' => 'varchar-32',
  74. 'name' => '兑换本数-填写0则不增加售出本数',
  75. 'default' => '0',
  76. 'desc' => '兑换本数',
  77. 'match' => 'is_string',
  78. 'update' => 'text',
  79. ),
  80. 'score' => array
  81. (
  82. 'type' => 'varchar-80',
  83. 'name' => '增加积分数-直接填写积分数,设置之后,积分规则里的设置及小刊兑换码中的设置将失效,当设置为0时,直接使用积分规则中的设置。当设置为负1时,不增加积分数',
  84. 'default' => '',
  85. 'desc' => '增加积分数',
  86. 'match' => 'is_string',
  87. 'update' => 'text',
  88. ),
  89. 'cdate' => array
  90. (
  91. 'type' => 'int-11',
  92. 'name' => '录入时间',
  93. 'match' => array('is_numeric', time()),
  94. 'desc' => '',
  95. # 只有insert时才生效
  96. 'insert' => true,
  97. ),
  98. ),
  99. 'manage' => array
  100. (
  101. # 后台管理不要列表页
  102. 'list' => 'update',
  103. ),
  104. );