subscribe_send.php 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  1. <?php
  2. $project = function()
  3. {
  4. $array = array();
  5. $info = Dever::load('token/project-state', array('option_type' => 3));
  6. if($info)
  7. {
  8. $array += $info;
  9. }
  10. return $array;
  11. };
  12. $type = array
  13. (
  14. 'developer' => '开发版',
  15. 'trial' => '体验版',
  16. 'formal' => '正式版',
  17. );
  18. return array
  19. (
  20. # 表名
  21. 'name' => 'subscribe_send',
  22. # 显示给用户看的名称
  23. 'lang' => '发送订阅消息',
  24. 'order' => 79,
  25. # 数据结构
  26. 'struct' => array
  27. (
  28. 'id' => array
  29. (
  30. 'type' => 'int-11',
  31. 'name' => 'ID',
  32. 'default' => '',
  33. 'desc' => '',
  34. 'match' => 'is_numeric',
  35. 'search' => 'order',
  36. //'list' => true,
  37. ),
  38. 'project_id' => array
  39. (
  40. 'type' => 'varchar-300',
  41. 'name' => '选择项目',
  42. 'default' => '',
  43. 'desc' => '选择项目',
  44. 'match' => 'is_numeric',
  45. 'list' => true,
  46. 'update' => 'checkbox',
  47. 'option' => $project,
  48. ),
  49. 'key' => array
  50. (
  51. 'type' => 'varchar-20',
  52. 'name' => '消息key',
  53. 'default' => '',
  54. 'desc' => '消息key',
  55. 'match' => 'is_string',
  56. 'update' => 'text',
  57. 'list' => true,
  58. 'edit' => true,
  59. ),
  60. 'page' => array
  61. (
  62. 'type' => 'varchar-200',
  63. 'name' => '页面路径',
  64. 'default' => 'pages/index/index',
  65. 'desc' => '页面路径',
  66. 'match' => 'is_string',
  67. 'update' => 'text',
  68. 'list' => true,
  69. ),
  70. 'miniprogram_state' => array
  71. (
  72. 'type' => 'varchar-300',
  73. 'name' => '跳转小程序类型',
  74. 'default' => 'formal',
  75. 'desc' => '跳转小程序类型',
  76. 'match' => 'option',
  77. 'update' => 'radio',
  78. 'search' => 'select',
  79. 'option' => $type,
  80. 'list' => true,
  81. ),
  82. 'content' => array
  83. (
  84. 'type' => 'text-255',
  85. 'name' => '消息内容',
  86. 'default' => '',
  87. 'desc' => '请输入内容',
  88. 'match' => 'is_string',
  89. 'update' => array
  90. (
  91. array
  92. (
  93. 'col' => 'key',
  94. 'name' => '标识',
  95. 'default' => '',
  96. 'desc' => '请输入标识',
  97. 'match' => 'is_string',
  98. 'update' => 'text',
  99. ),
  100. array
  101. (
  102. 'col' => 'value',
  103. 'name' => '内容值',
  104. 'default' => '',
  105. 'desc' => '内容值',
  106. 'match' => 'is_string',
  107. 'update' => 'textarea',
  108. ),
  109. ),
  110. ),
  111. 'state' => array
  112. (
  113. 'type' => 'tinyint-1',
  114. 'name' => '状态',
  115. 'default' => '1',
  116. 'desc' => '请选择状态',
  117. 'match' => 'is_numeric',
  118. ),
  119. 'cdate' => array
  120. (
  121. 'type' => 'int-11',
  122. 'name' => '更新时间',
  123. 'match' => array('is_numeric', time()),
  124. 'desc' => '',
  125. 'default' => '',
  126. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  127. ),
  128. ),
  129. //'top' => Dever::config('base', 'wechat_applet')->top,
  130. 'manage' => array
  131. (
  132. //'delete' => false,
  133. //'insert' => false,
  134. //'edit' => false,
  135. 'list_button' => array
  136. (
  137. 'oper' => array('立刻发送', '"wechat_applet/subscribe.submit?id={id}"'),
  138. ),
  139. ),
  140. );