wechat.php 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. <?php
  2. $info = function()
  3. {
  4. $array = array();
  5. $info = Dever::load('set/info-state');
  6. if($info)
  7. {
  8. $array += $info;
  9. }
  10. return $array;
  11. };
  12. return array
  13. (
  14. # 表名
  15. 'name' => 'wechat',
  16. # 显示给用户看的名称
  17. 'lang' => '微信绑定列表',
  18. 'order' => 10,
  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. //'search' => 'order',
  30. 'order' => 'desc',
  31. 'list' => true,
  32. ),
  33. 'info_id' => array
  34. (
  35. 'type' => 'int-11',
  36. 'name' => '所属小程序',
  37. 'default' => '1',
  38. 'desc' => '请选择所属小程序',
  39. 'match' => 'is_numeric',
  40. 'update' => 'select',
  41. 'option' => $info,
  42. 'search' => 'select',
  43. 'list' => '{info_id} > 0 ? Dever::load("set/info-one#name", {info_id}) : "未知"',
  44. ),
  45. 'uid' => array
  46. (
  47. 'type' => 'int-11',
  48. 'name' => '用户',
  49. 'default' => '',
  50. 'desc' => '',
  51. 'match' => 'is_numeric',
  52. //'update' => 'select',
  53. //'search' => 'order,select',
  54. 'list' => '{uid} > 0 ? Dever::load("passport/user-one#name", {uid}) : "未知用户"',
  55. ),
  56. 'openid' => array
  57. (
  58. 'type' => 'varchar-50',
  59. 'name' => 'openid-微信的唯一用户id',
  60. 'default' => '',
  61. 'desc' => 'openid',
  62. 'match' => 'is_string',
  63. //'update' => 'text',
  64. 'list' => true,
  65. ),
  66. 'unionid' => array
  67. (
  68. 'type' => 'varchar-50',
  69. 'name' => 'unionid-微信的唯一用户id',
  70. 'default' => '',
  71. 'desc' => 'unionid',
  72. 'match' => 'is_string',
  73. //'update' => 'text',
  74. 'list' => true,
  75. ),
  76. 'session_key' => array
  77. (
  78. 'type' => 'varchar-50',
  79. 'name' => 'session_key',
  80. 'default' => '',
  81. 'desc' => 'session_key',
  82. 'match' => 'is_string',
  83. //'update' => 'text',
  84. ),
  85. 'state' => array
  86. (
  87. 'type' => 'tinyint-1',
  88. 'name' => '状态',
  89. 'default' => '1',
  90. 'desc' => '请选择状态',
  91. 'match' => 'is_numeric',
  92. ),
  93. 'cdate' => array
  94. (
  95. 'type' => 'int-11',
  96. 'name' => '录入时间',
  97. 'match' => array('is_numeric', time()),
  98. 'desc' => '',
  99. # 只有insert时才生效
  100. 'insert' => true,
  101. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  102. ),
  103. ),
  104. 'manage' => array
  105. (
  106. 'insert' => false,
  107. 'edit' => false,
  108. 'delete' => false,
  109. ),
  110. # request 请求接口定义
  111. 'request' => array
  112. (
  113. ),
  114. );