version_log.php 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  1. <?php
  2. /**
  3. * tester
  4. */
  5. $user = function()
  6. {
  7. $array = array();
  8. $info = Dever::load('wechat_component/user-state');
  9. if($info)
  10. {
  11. $array += $info;
  12. }
  13. return $array;
  14. };
  15. $template = function()
  16. {
  17. $array = array();
  18. $info = Dever::load('wechat_component_applet/template-state');
  19. if($info)
  20. {
  21. $array += $info;
  22. }
  23. return $array;
  24. };
  25. $version = function()
  26. {
  27. $array = array();
  28. $info = Dever::load('wechat_component_applet/version-state');
  29. if($info)
  30. {
  31. $array += $info;
  32. }
  33. return $array;
  34. };
  35. return array
  36. (
  37. # 表名
  38. 'name' => 'version_log',
  39. # 显示给用户看的名称
  40. 'lang' => '版本提交历史',
  41. 'menu' => false,
  42. # 数据结构
  43. 'struct' => array
  44. (
  45. 'id' => array
  46. (
  47. 'type' => 'int-11',
  48. 'name' => 'ID',
  49. 'default' => '',
  50. 'desc' => '',
  51. 'match' => 'is_numeric',
  52. 'search' => 'order',
  53. 'list' => true,
  54. ),
  55. 'project_id' => array
  56. (
  57. 'type' => 'int-11',
  58. 'name' => '项目',
  59. 'default' => '',
  60. 'desc' => '请输入项目',
  61. 'match' => 'is_numeric',
  62. ),
  63. 'version_id' => array
  64. (
  65. 'type' => 'int-11',
  66. 'name' => '版本',
  67. 'default' => '',
  68. 'desc' => '版本',
  69. 'match' => 'is_numeric',
  70. //'search' => 'order,fulltext',
  71. 'update' => 'checkbox',
  72. 'option' => $version,
  73. //'list' => true,
  74. ),
  75. 'user_id' => array
  76. (
  77. 'type' => 'int-11',
  78. 'name' => '用户',
  79. 'default' => '',
  80. 'desc' => '用户',
  81. 'match' => 'is_numeric',
  82. //'search' => 'order,fulltext',
  83. 'update' => 'select',
  84. 'option' => $user,
  85. 'list' => true,
  86. ),
  87. 'name' => array
  88. (
  89. 'type' => 'varchar-60',
  90. 'name' => '版本号',
  91. 'default' => '',
  92. 'desc' => '版本号',
  93. 'match' => 'is_string',
  94. 'update' => 'text',
  95. 'search' => 'fulltext',
  96. 'list' => true,
  97. ),
  98. 'template_id' => array
  99. (
  100. 'type' => 'int-11',
  101. 'name' => '小程序模板',
  102. 'default' => '1',
  103. 'desc' => '小程序模板',
  104. 'match' => 'is_numeric',
  105. 'update' => 'select',
  106. 'option' => $template,
  107. 'list' => true,
  108. ),
  109. 'result' => array
  110. (
  111. 'type' => 'text-255',
  112. 'name' => '微信返回信息',
  113. 'default' => '',
  114. 'desc' => '微信返回信息',
  115. 'match' => 'option',
  116. 'update' => 'textarea',
  117. 'list' => 'Dever::load("wechat_component/user.qrcode", {user_id}, {id})',
  118. 'modal' => '查看详情',
  119. ),
  120. 'state' => array
  121. (
  122. 'type' => 'tinyint-1',
  123. 'name' => '状态',
  124. 'default' => '1',
  125. 'desc' => '请选择状态',
  126. 'match' => 'is_numeric',
  127. ),
  128. 'cdate' => array
  129. (
  130. 'type' => 'int-11',
  131. 'name' => '提交时间',
  132. 'match' => array('is_numeric', time()),
  133. 'desc' => '',
  134. # 只有insert时才生效
  135. 'insert' => true,
  136. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  137. ),
  138. ),
  139. 'top' => Dever::config('base', 'component')->top,
  140. 'manage' => array
  141. (
  142. 'edit' => false,
  143. 'delete' => false,
  144. 'insert' => false,
  145. ),
  146. );