collect.php 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  1. <?php
  2. $type = array
  3. (
  4. 1 => '微信',
  5. 2 => '微博',
  6. );
  7. $actType = array
  8. (
  9. 1 => '分享给朋友',
  10. 2 => '分享到朋友圈',
  11. 3 => '分享到QQ',
  12. );
  13. $actResult = array
  14. (
  15. 1 => '分享成功',
  16. 2 => '取消分享',
  17. 3 => '分享失败',
  18. );
  19. $project = function()
  20. {
  21. $array = array();
  22. $info = Dever::load('token/project-state');
  23. if($info)
  24. {
  25. $array += $info;
  26. }
  27. return $array;
  28. };
  29. return array
  30. (
  31. # 表名
  32. 'name' => 'collect',
  33. # 显示给用户看的名称
  34. 'lang' => '分享列表',
  35. 'order' => 90,
  36. # 数据结构
  37. 'struct' => array
  38. (
  39. 'id' => array
  40. (
  41. 'type' => 'int-11',
  42. 'name' => 'ID',
  43. 'default' => '',
  44. 'desc' => '',
  45. 'match' => 'is_numeric',
  46. 'search' => 'order',
  47. 'list' => true,
  48. ),
  49. 'project_id' => array
  50. (
  51. 'type' => 'int-11',
  52. 'name' => '项目',
  53. 'default' => '',
  54. 'desc' => '请输入项目',
  55. 'match' => 'is_numeric',
  56. 'option' => $project,
  57. 'list' => true,
  58. ),
  59. 'uid' => array
  60. (
  61. 'type' => 'int-11',
  62. 'name' => '用户ID',
  63. 'default' => '-1',
  64. 'desc' => '用户ID',
  65. 'match' => 'is_numeric',
  66. 'update' => 'text',
  67. //'list' => true,
  68. ),
  69. 'url' => array
  70. (
  71. 'type' => 'varchar-300',
  72. 'name' => '分享地址',
  73. 'default' => '',
  74. 'desc' => '分享地址',
  75. 'match' => 'is_string',
  76. 'update' => 'text',
  77. 'search' => 'fulltext',
  78. 'list' => true,
  79. ),
  80. 'ua' => array
  81. (
  82. 'type' => 'varchar-800',
  83. 'name' => '用户ua数据',
  84. 'default' => '',
  85. 'desc' => '用户ua数据',
  86. 'match' => 'option',
  87. 'update' => 'textarea',
  88. 'list' => true,
  89. 'modal' => '查看详情',
  90. ),
  91. 'type' => array
  92. (
  93. 'type' => 'tinyint-1',
  94. 'name' => '分享类型',
  95. 'default' => '1',
  96. 'desc' => '分享类型',
  97. 'match' => 'is_numeric',
  98. 'update' => 'select',
  99. 'search' => 'select',
  100. 'option' => $type,
  101. 'list' => true,
  102. ),
  103. 'actType' => array
  104. (
  105. 'type' => 'tinyint-1',
  106. 'name' => '分享行为',
  107. 'default' => '1',
  108. 'desc' => '分享行为',
  109. 'match' => 'is_numeric',
  110. 'update' => 'select',
  111. 'search' => 'select',
  112. 'option' => $actType,
  113. 'list' => true,
  114. ),
  115. 'actResult' => array
  116. (
  117. 'type' => 'tinyint-1',
  118. 'name' => '分享结果',
  119. 'default' => '1',
  120. 'desc' => '分享结果',
  121. 'match' => 'is_numeric',
  122. 'update' => 'select',
  123. //'search' => 'select',
  124. 'option' => $actResult,
  125. 'list' => true,
  126. ),
  127. 'state' => array
  128. (
  129. 'type' => 'tinyint-1',
  130. 'name' => '状态',
  131. 'default' => '1',
  132. 'desc' => '请选择状态',
  133. 'match' => 'is_numeric',
  134. ),
  135. 'cdate' => array
  136. (
  137. 'type' => 'int-11',
  138. 'name' => '更新时间',
  139. 'match' => array('is_numeric', time()),
  140. 'desc' => '',
  141. 'default' => '',
  142. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  143. ),
  144. ),
  145. 'manage' => array
  146. (
  147. 'delete' => false,
  148. 'insert' => false,
  149. 'edit' => false,
  150. # 开启批量管理
  151. //'mul' => true,
  152. ),
  153. );