config.php 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225
  1. <?php
  2. $ios_pay = array
  3. (
  4. 1 => '关闭小程序支付',
  5. 2 => '开启公众号支付',
  6. 3 => '开启小程序支付',
  7. );
  8. $video = array
  9. (
  10. 1 => '显示',
  11. 2 => '不显示',
  12. );
  13. $button = array
  14. (
  15. 1 => '显示',
  16. 2 => '不显示',
  17. );
  18. # 获取小刊分类权限
  19. $auth = Dever::tops();
  20. $cate = function() use ($auth)
  21. {
  22. $array = array();
  23. if ($auth) {
  24. $info = Dever::db('journal/cate')->getIds(array('ids' => $auth));
  25. } else {
  26. $info = Dever::db('journal/cate')->state();
  27. }
  28. if($info)
  29. {
  30. $array += $info;
  31. }
  32. return $array;
  33. };
  34. return array
  35. (
  36. # 表名
  37. 'name' => 'config',
  38. # 显示给用户看的名称
  39. 'lang' => '基本配置',
  40. 'order' => 1,
  41. # 数据结构
  42. 'struct' => array
  43. (
  44. 'id' => array
  45. (
  46. 'type' => 'int-11',
  47. 'name' => '系统ID',
  48. 'default' => '',
  49. 'desc' => '',
  50. 'match' => 'is_numeric',
  51. ),
  52. 'hr1' => array
  53. (
  54. 'name' => '通用设置',
  55. 'class' => '',//本项必须填写
  56. 'attr' => '',
  57. ),
  58. 'cate_id' => array
  59. (
  60. 'type' => 'int-11',
  61. 'name' => '小刊分类',
  62. 'default' => '1',
  63. 'desc' => '小刊分类',
  64. 'match' => 'is_numeric',
  65. 'update' => 'select',
  66. 'option' => $cate,
  67. //'search' => 'select',
  68. 'list' => true,
  69. ),
  70. 'name' => array
  71. (
  72. 'type' => 'varchar-32',
  73. 'name' => '名称设置',
  74. 'default' => '',
  75. 'desc' => '名称设置',
  76. 'match' => 'is_string',
  77. 'update' => 'text',
  78. 'list' => true,
  79. ),
  80. 'download' => array
  81. (
  82. 'type' => 'varchar-800',
  83. 'name' => '下载链接',
  84. 'default' => '',
  85. 'desc' => '下载链接',
  86. 'match' => 'is_string',
  87. 'update' => 'textarea',
  88. ),
  89. 'logo' => array
  90. (
  91. 'type' => 'varchar-150',
  92. 'name' => 'logo图片',
  93. 'default' => '',
  94. 'desc' => 'logo图片',
  95. 'match' => 'option',
  96. 'update' => 'image',
  97. 'key' => '1',
  98. 'place' => '150',
  99. ),
  100. 'code' => array
  101. (
  102. 'type' => 'varchar-150',
  103. 'name' => '二维码图片',
  104. 'default' => '',
  105. 'desc' => '二维码图片',
  106. 'match' => 'option',
  107. 'update' => 'image',
  108. 'key' => '1',
  109. 'place' => '150',
  110. ),
  111. 'button' => array
  112. (
  113. 'type' => 'int-11',
  114. 'name' => '是否显示购买按钮-APP上是否显示购买按钮',
  115. 'default' => '1',
  116. 'desc' => '是否显示购买按钮',
  117. 'match' => 'is_numeric',
  118. 'update' => 'radio',
  119. 'option' => $button,
  120. ),
  121. 'pic1' => array
  122. (
  123. 'type' => 'varchar-150',
  124. 'name' => '第一张图片',
  125. 'default' => '',
  126. 'desc' => '第一张图片',
  127. 'match' => 'option',
  128. 'update' => 'image',
  129. 'key' => '1',
  130. 'place' => '150',
  131. ),
  132. 'pic2' => array
  133. (
  134. 'type' => 'varchar-150',
  135. 'name' => '第二张图片',
  136. 'default' => '',
  137. 'desc' => '第二张图片',
  138. 'match' => 'option',
  139. 'update' => 'image',
  140. 'key' => '1',
  141. 'place' => '150',
  142. ),
  143. 'pic3' => array
  144. (
  145. 'type' => 'varchar-150',
  146. 'name' => '第三张图片',
  147. 'default' => '',
  148. 'desc' => '第三张图片',
  149. 'match' => 'option',
  150. 'update' => 'image',
  151. 'key' => '1',
  152. 'place' => '150',
  153. ),
  154. 'pic4' => array
  155. (
  156. 'type' => 'varchar-150',
  157. 'name' => '第四张图片',
  158. 'default' => '',
  159. 'desc' => '第四张图片',
  160. 'match' => 'option',
  161. 'update' => 'image',
  162. 'key' => '1',
  163. 'place' => '150',
  164. ),
  165. 'cdate' => array
  166. (
  167. 'type' => 'int-11',
  168. 'name' => '录入时间',
  169. 'match' => array('is_numeric', time()),
  170. 'desc' => '',
  171. # 只有insert时才生效
  172. 'insert' => true,
  173. ),
  174. ),
  175. 'default' => array
  176. (
  177. 'col' => 'name,cate_id',
  178. 'value' => array
  179. (
  180. '"会员设置", 1',
  181. ),
  182. ),
  183. 'top' => Dever::config('base')->top,
  184. # 增加这个,为了给当前的list增加一个option
  185. 'top_option' => array
  186. (
  187. 'value' => $auth,
  188. 'col' => 'cate_id',
  189. ),
  190. /*
  191. 'alter' => array
  192. (
  193. 2 => array
  194. (
  195. array('update', 'task_id', 'task_id', 'varchar-800 软装任务链接'),
  196. //array('add', 'config', 'config', 'int-11 1 配置'),
  197. ),
  198. 'version' => 2,
  199. ),
  200. */
  201. 'manage' => array
  202. (
  203. # 后台管理不要列表页
  204. //'list' => 'update',
  205. ),
  206. );