project.php 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  1. <?php
  2. $type = array
  3. (
  4. //1 => '保留',
  5. 2 => '微信公众号',
  6. 3 => '微信小程序',
  7. 4 => '微信小游戏',
  8. 5 => '微信第三方平台',
  9. 6 => '微信开发者',
  10. 7 => '有赞',
  11. 8 => '阿里云',
  12. );
  13. return array
  14. (
  15. # 表名
  16. 'name' => 'project',
  17. # 显示给用户看的名称
  18. 'lang' => '项目管理',
  19. 'order' => -10,
  20. # 数据结构
  21. 'struct' => array
  22. (
  23. 'id' => array
  24. (
  25. 'type' => 'int-11',
  26. 'name' => 'ID',
  27. 'default' => '',
  28. 'desc' => '',
  29. 'match' => 'is_numeric',
  30. //'search' => 'order',
  31. 'order' => 'desc',
  32. 'list' => true,
  33. ),
  34. 'name' => array
  35. (
  36. 'type' => 'varchar-60',
  37. 'name' => '项目名称',
  38. 'default' => '',
  39. 'desc' => '请输入项目名称',
  40. 'match' => 'is_string',
  41. 'update' => 'text',
  42. 'search' => 'fulltext',
  43. 'list' => true,
  44. ),
  45. 'type' => array
  46. (
  47. 'type' => 'tinyint-11',
  48. 'name' => '项目类型',
  49. 'default' => '1',
  50. 'desc' => '项目类型',
  51. 'match' => 'is_numeric',
  52. 'update' => 'select',
  53. 'option' => $type,
  54. 'list' => true,
  55. ),
  56. 'appid' => array
  57. (
  58. 'type' => 'varchar-150',
  59. 'name' => 'appid-一般为微信appid、阿里的appkey',
  60. 'default' => '',
  61. 'desc' => '请输入appid',
  62. 'match' => 'is_string',
  63. 'search' => 'order,fulltext',
  64. 'update' => 'text',
  65. 'list' => 'table',
  66. 'modal' => '详细信息',
  67. ),
  68. 'secret' => array
  69. (
  70. 'type' => 'varchar-150',
  71. 'name' => 'secret',
  72. 'default' => '',
  73. 'desc' => '请输入微信secret',
  74. 'match' => 'is_string',
  75. 'search' => 'order,fulltext',
  76. 'update' => 'text',
  77. //'list' => 'table',
  78. //'modal' => '详细信息',
  79. ),
  80. 'token' => array
  81. (
  82. 'type' => 'varchar-150',
  83. 'name' => '通信token(注意不是access_token)',
  84. 'default' => '',
  85. 'desc' => '请输入通信token',
  86. 'match' => 'option',
  87. 'update' => 'text',
  88. ),
  89. 'key' => array
  90. (
  91. 'type' => 'varchar-150',
  92. 'name' => '消息加解密密钥',
  93. 'default' => '',
  94. 'desc' => '请输入消息加解密密钥',
  95. 'match' => 'option',
  96. 'update' => 'text',
  97. ),
  98. 'url' => array
  99. (
  100. 'type' => 'varchar-500',
  101. 'name' => '获取最新access_token-输入url即可,为了方便测试使用,如测试环境和正式环境都同时使用一套appid时可以填入,url拼接为host/package/token?api.token',
  102. 'default' => '',
  103. 'desc' => '获取最新access_token',
  104. 'match' => 'option',
  105. 'update' => 'text',
  106. ),
  107. 'state' => array
  108. (
  109. 'type' => 'tinyint-1',
  110. 'name' => '状态',
  111. 'default' => '1',
  112. 'desc' => '请选择状态',
  113. 'match' => 'is_numeric',
  114. ),
  115. 'cdate' => array
  116. (
  117. 'type' => 'int-11',
  118. 'name' => '录入时间',
  119. 'match' => array('is_numeric', time()),
  120. 'desc' => '',
  121. # 只有insert时才生效
  122. 'insert' => true,
  123. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  124. ),
  125. ),
  126. 'manage' => array
  127. (
  128. 'button' => array
  129. (
  130. //'同步小程序' => 'main/data.applet',
  131. ),
  132. ),
  133. /*
  134. 'top' => array
  135. (
  136. # 数据来源
  137. 'data' => 'state',
  138. # 菜单名
  139. 'name' => '项目选择',
  140. # 默认值
  141. 'value' => 1,
  142. # 对应的字段值,设置这个之后,所有设置等于这个值的字段,都要遵循这个权限的控制
  143. 'key' => 'main/project_id',
  144. # 本表中代表名称的字段
  145. 'col' => 'name',
  146. # type类型字段
  147. 'type' => 'type',
  148. ),
  149. */
  150. # request 请求接口定义
  151. 'request' => array
  152. (
  153. ),
  154. );