feedback.php 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  1. <?php
  2. $info = function()
  3. {
  4. return Dever::db('collection/info')->state();
  5. };
  6. $type = array
  7. (
  8. 1 => '未回复',
  9. 2 => '已回复',
  10. );
  11. return array
  12. (
  13. # 表名
  14. 'name' => 'feedback',
  15. # 显示给用户看的名称
  16. 'lang' => '反馈管理',
  17. # 是否显示在后台菜单
  18. 'order' => 80,
  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. 'order' => 'desc',
  30. //'list' => true,
  31. ),
  32. 'uid' => array
  33. (
  34. 'type' => 'int-11',
  35. 'name' => '用户名',
  36. 'default' => '0',
  37. 'desc' => '请选择用户',
  38. 'match' => 'is_numeric',
  39. 'update' => 'text',
  40. //'search' => 'select',
  41. 'search' => array
  42. (
  43. 'api' => 'passport/user-all',
  44. 'col' => 'username',
  45. 'result' => 'id',
  46. ),
  47. //'list' => '{uid} > 0 ? Dever::load("passport/user-one#username", {uid}) : "匿名用户"',
  48. ),
  49. 'shop_id' => array
  50. (
  51. 'type' => 'int-11',
  52. 'name' => '所属门店',
  53. 'default' => '',
  54. 'desc' => '所属门店',
  55. 'match' => 'is_numeric',
  56. 'update' => 'hidden',
  57. //'search' => 'hidden',
  58. //'value' => $shop_id,
  59. 'list' => 'Dever::load("shop/info-find#name", {shop_id})',
  60. ),
  61. 'mobile' => array
  62. (
  63. 'type' => 'varchar-300',
  64. 'name' => '手机号',
  65. 'default' => '',
  66. 'desc' => '手机号',
  67. 'match' => 'option',
  68. 'search' => 'text',
  69. 'list' => true,
  70. ),
  71. 'truename' => array
  72. (
  73. 'type' => 'varchar-300',
  74. 'name' => '联系人姓名',
  75. 'default' => '',
  76. 'desc' => '联系人姓名',
  77. 'match' => 'option',
  78. 'search' => 'text',
  79. 'list' => true,
  80. ),
  81. 'content' => array
  82. (
  83. 'type' => 'varchar-800',
  84. 'name' => '反馈内容',
  85. 'update' => 'textarea',
  86. 'key' => 1,
  87. 'default' => '',
  88. 'desc' => '请输入内容',
  89. 'match' => 'is_string',
  90. 'search' => 'fulltext',
  91. 'list' => true,
  92. //'modal' => '查看详情',
  93. //'list' => 'Dever::load("user/lib/manage.feedback", {id})',
  94. ),
  95. 'type' => array
  96. (
  97. 'type' => 'tinyint-1',
  98. 'name' => '是否回复',
  99. 'default' => '1',
  100. 'desc' => '是否回复',
  101. 'match' => 'is_numeric',
  102. 'update' => 'radio',
  103. 'search' => 'select',
  104. 'option' => $type,
  105. 'list' => true,
  106. 'edit' => true,
  107. ),
  108. 'state' => array
  109. (
  110. 'type' => 'tinyint-1',
  111. 'name' => '状态',
  112. 'default' => '1',
  113. 'desc' => '请选择状态',
  114. 'match' => 'is_numeric',
  115. ),
  116. 'cdate' => array
  117. (
  118. 'type' => 'int-11',
  119. 'name' => '时间',
  120. 'match' => array('is_numeric', time()),
  121. 'desc' => '',
  122. # 只有insert时才生效
  123. 'insert' => true,
  124. 'search' => 'date',
  125. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  126. ),
  127. ),
  128. 'manage' => array
  129. (
  130. 'insert' => false,
  131. 'edit' => false,
  132. 'delete' => false,
  133. ),
  134. # request 请求接口定义
  135. 'request' => array
  136. (
  137. )
  138. );