mobile.php 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. <?php
  2. $product = function()
  3. {
  4. return Dever::db('journal/info')->state();
  5. };
  6. return array
  7. (
  8. # 表名
  9. 'name' => 'mobile',
  10. # 显示给用户看的名称
  11. 'lang' => '电子刊导入用户',
  12. 'order' => 1,
  13. 'menu' => false,
  14. # 数据结构
  15. 'struct' => array
  16. (
  17. 'id' => array
  18. (
  19. 'type' => 'int-11',
  20. 'name' => 'ID',
  21. 'default' => '',
  22. 'desc' => '',
  23. 'match' => 'is_numeric',
  24. 'search' => 'order',
  25. //'list' => true,
  26. ),
  27. 'mobile' => array
  28. (
  29. 'type' => 'varchar-300',
  30. 'name' => '手机号',
  31. 'default' => '',
  32. 'desc' => '手机号',
  33. 'match' => 'is_string',
  34. 'update' => 'text',
  35. 'search' => 'fulltext',
  36. 'list' => true,
  37. //'list' => '"{order_id}" ? "{order_id}" : "{code}"',
  38. ),
  39. 'product_id' => array
  40. (
  41. 'type' => 'int-11',
  42. 'name' => '小刊',
  43. 'default' => '',
  44. 'desc' => '小刊',
  45. 'match' => 'is_numeric',
  46. 'update' => 'select',
  47. 'option' => $product,
  48. 'search' => 'select',
  49. 'list' => true,
  50. ),
  51. 'state' => array
  52. (
  53. 'type' => 'tinyint-1',
  54. 'name' => '状态',
  55. 'default' => '1',
  56. 'desc' => '请选择状态',
  57. 'match' => 'is_numeric',
  58. ),
  59. 'cdate' => array
  60. (
  61. 'type' => 'int-11',
  62. 'name' => '导入时间',
  63. 'match' => array('is_numeric', time()),
  64. 'desc' => '',
  65. 'default' => '',
  66. # 只有insert时才生效
  67. 'insert' => true,
  68. 'search' => 'date',
  69. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  70. //'list' => 'Dever::load("service/lib/manage.showOrderTime", "{id}")',
  71. ),
  72. ),
  73. 'manage' => array
  74. (
  75. //'delete' => false,
  76. 'edit' => false,
  77. 'insert' => false,
  78. 'button' => array
  79. (
  80. '导入用户' => array('fast', 1, 'mobile_upload&where_id=1'),
  81. '下载导入模板' => array('location', 'journal/lib/manage.mobileTemplate'),
  82. ),
  83. ),
  84. 'request' => array
  85. (
  86. ),
  87. );