config.php 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  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' => '兑换本数',
  75. 'default' => '1',
  76. 'desc' => '兑换本数',
  77. 'match' => 'is_string',
  78. 'update' => 'text',
  79. ),
  80. 'cdate' => array
  81. (
  82. 'type' => 'int-11',
  83. 'name' => '录入时间',
  84. 'match' => array('is_numeric', time()),
  85. 'desc' => '',
  86. # 只有insert时才生效
  87. 'insert' => true,
  88. ),
  89. ),
  90. 'manage' => array
  91. (
  92. # 后台管理不要列表页
  93. 'list' => 'update',
  94. ),
  95. );