stat_user.php 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. <?php
  2. $source = array
  3. (
  4. 0 => '其他',
  5. 3 => '扫二维码',
  6. 17 => '名片分享',
  7. 35 => '搜号码',
  8. 39 => '查询微信公众帐号',
  9. 43 => '图文页右上角菜单',
  10. );
  11. return array
  12. (
  13. # 表名
  14. 'name' => 'stat_user',
  15. # 显示给用户看的名称
  16. 'lang' => '用户统计',
  17. 'desc' => '可加入到cron中:stat.user?site=? site后的问号请替换为站点id',
  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. //'list' => true,
  31. ),
  32. 'site' => array
  33. (
  34. 'type' => 'int-11',
  35. 'name' => '站点',
  36. 'default' => '',
  37. 'desc' => '请输入站点',
  38. 'match' => 'is_numeric',
  39. ),
  40. 'date' => array
  41. (
  42. 'type' => 'int-11',
  43. 'name' => '日期',
  44. 'default' => '',
  45. 'desc' => '请输入日期',
  46. 'match' => 'is_string',
  47. //'update' => 'text',
  48. 'search' => 'order,fulltext',
  49. 'list' => 'date("Y-m-d", {date})',
  50. ),
  51. 'user_source' => array
  52. (
  53. 'type' => 'int-11',
  54. 'name' => '用户的渠道',
  55. 'default' => '',
  56. 'desc' => '用户的渠道',
  57. 'match' => 'option',
  58. //'update' => 'text',
  59. ),
  60. 'new_user' => array
  61. (
  62. 'type' => 'int-11',
  63. 'name' => '新增的用户量',
  64. 'default' => '',
  65. 'desc' => '请输入新增的用户量',
  66. 'match' => 'option',
  67. //'update' => 'text',
  68. 'list' => true,
  69. ),
  70. 'cancel_user' => array
  71. (
  72. 'type' => 'int-11',
  73. 'name' => '取消关注的用户数量',
  74. 'default' => '',
  75. 'desc' => '取消关注的用户数量',
  76. 'match' => 'option',
  77. //'update' => 'text',
  78. 'list' => true,
  79. ),
  80. 'cumulate_user' => array
  81. (
  82. 'type' => 'int-11',
  83. 'name' => '总用户量',
  84. 'default' => '',
  85. 'desc' => '总用户量',
  86. 'match' => 'option',
  87. //'update' => 'text',
  88. 'list' => true,
  89. ),
  90. 'cdate' => array
  91. (
  92. 'type' => 'int-11',
  93. 'name' => '录入时间',
  94. 'match' => array('is_numeric', time()),
  95. 'desc' => '',
  96. # 只有insert时才生效
  97. 'insert' => true,
  98. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  99. ),
  100. ),
  101. 'auth' => 'site',
  102. 'manage' => array
  103. (
  104. //'desc' => '用于生成二维码的原链接(商品、支付二维码等)太长导致扫码速度和成功率下降,将原长链接通过此接口转成短链接再生成二维码将大大提升扫码速度和成功率。',
  105. ),
  106. # request 请求接口定义
  107. 'request' => array
  108. (
  109. 'get' => array
  110. (
  111. # 匹配的正则或函数 必填项
  112. 'where' => array
  113. (
  114. 'date' => 'yes',
  115. 'site' => 'yes',
  116. ),
  117. 'type' => 'one',
  118. ),
  119. ),
  120. );