focus.php 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. <?php
  2. return array
  3. (
  4. # 表名
  5. 'name' => 'focus',
  6. # 显示给用户看的名称
  7. 'lang' => '焦点图管理',
  8. # 后台菜单排序
  9. 'order' => 9,
  10. # 数据结构
  11. 'struct' => array
  12. (
  13. 'id' => array
  14. (
  15. 'type' => 'int-11',
  16. 'name' => 'ID',
  17. 'default' => '',
  18. 'desc' => '',
  19. 'match' => 'is_numeric',
  20. 'search' => 'order',
  21. //'list' => true,
  22. 'order' => 'desc',
  23. ),
  24. 'name' => array
  25. (
  26. 'type' => 'varchar-32',
  27. 'name' => '名称',
  28. 'default' => '',
  29. 'desc' => '请输入名称',
  30. 'match' => 'is_string',
  31. 'update' => 'text',
  32. 'search' => 'fulltext',
  33. 'list' => true,
  34. ),
  35. 'appid' => array
  36. (
  37. 'type' => 'varchar-400',
  38. 'name' => '跳转的小程序appid-如果填写了该项,则下面的link请填写另外一个小程序的path',
  39. 'default' => '',
  40. 'desc' => '跳转的小程序appid',
  41. 'match' => 'option',
  42. 'update' => 'text',
  43. //'list' => true,
  44. ),
  45. 'link' => array
  46. (
  47. 'type' => 'varchar-400',
  48. 'name' => '链接-可为空,可以填写为h5的链接,或者填写小程序path,path的格式为:/pages/servedetail?id=1,请更换id=1里的id的值为产品id
  49. ',
  50. 'default' => '',
  51. 'desc' => '请输入链接',
  52. 'match' => 'option',
  53. 'update' => 'text',
  54. 'search' => 'fulltext',
  55. //'list' => true,
  56. ),
  57. 'pic' => array
  58. (
  59. 'type' => 'varchar-150',
  60. 'name' => '图片-图片大小:750px*390px',
  61. 'default' => '',
  62. 'desc' => '请选择图片',
  63. 'match' => 'is_string',
  64. 'update' => 'image',
  65. 'key' => '1',
  66. 'place' => '150',
  67. ),
  68. 'reorder' => array
  69. (
  70. 'type' => 'int-11',
  71. 'name' => '排序(数值越大越靠前)',
  72. 'default' => '1',
  73. 'desc' => '请输入排序',
  74. 'match' => 'option',
  75. 'update' => 'text',
  76. 'search' => 'order',
  77. 'list' => true,
  78. 'order' => 'desc',
  79. 'edit' => true,
  80. ),
  81. 'state' => array
  82. (
  83. 'type' => 'tinyint-1',
  84. 'name' => '状态',
  85. 'default' => '1',
  86. 'desc' => '请选择状态',
  87. 'match' => 'is_numeric',
  88. ),
  89. 'cdate' => array
  90. (
  91. 'type' => 'int-11',
  92. 'name' => '录入时间',
  93. 'match' => array('is_numeric', time()),
  94. 'desc' => '',
  95. # 只有insert时才生效
  96. 'insert' => true,
  97. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  98. ),
  99. ),
  100. 'request' => array
  101. (
  102. 'getAll' => array
  103. (
  104. # 匹配的正则或函数 选填项
  105. 'option' => array
  106. (
  107. 'state' => 1,
  108. ),
  109. 'type' => 'all',
  110. 'order' => array('reorder' => 'desc', 'cdate' => 'desc'),
  111. 'col' => '*',
  112. ),
  113. ),
  114. );