code.php 920 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <?php
  2. # 数据收集的配置
  3. return array
  4. (
  5. # 生成维码ticket
  6. 'code_ticket' => array
  7. (
  8. 'url' => 'https://api.weixin.qq.com/cgi-bin/qrcode/create?',
  9. 'param' => array
  10. (
  11. 'access_token' => 'token',
  12. 'expire_seconds' => 604800,
  13. 'action_name' => Dever::input('action_name'),
  14. 'action_info' => array
  15. (
  16. 'scene' => array
  17. (
  18. 'scene_id' => Dever::input('scene_id'),
  19. )
  20. ),
  21. ),
  22. 'json' => true,
  23. ),
  24. # 生成二维码 这里不用了
  25. 'code_create' => array
  26. (
  27. 'url' => 'https://mp.weixin.qq.com/cgi-bin/showqrcode?',
  28. 'param' => array
  29. (
  30. 'ticket' => urlencode(Dever::input('ticket')),
  31. ),
  32. 'json' => true,
  33. ),
  34. # 生成短链接
  35. 'code_link' => array
  36. (
  37. 'url' => 'https://api.weixin.qq.com/cgi-bin/shorturl?',
  38. 'param' => array
  39. (
  40. 'access_token' => 'token',
  41. 'action' => 'long2short',
  42. 'long_url' => Dever::input('url'),
  43. ),
  44. 'json' => true,
  45. )
  46. );