You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

47 lines
1.3 KiB

  1. <?php
  2. //不加参数
  3. require_once '../Common/Config.php';
  4. require_once '../Common/Function.php';
  5. $access_token=getAccesstoken();
  6. $url = "https://api.weixin.qq.com/cgi-bin/menu/create?access_token=".$access_token;
  7. $jsonmenu = '{
  8. "button":[
  9. {
  10. "name":"出行预订",
  11. "type":"view",
  12. "url":"http://wx.zhizhuchuxing.com/index.html"
  13. },
  14. {
  15. "name":"我的订单",
  16. "type":"view",
  17. "url":"http://wx.zhizhuchuxing.com/core/my_order.asp"
  18. },
  19. {
  20. "name":"更多服务",
  21. "sub_button":[
  22. {
  23. "type":"view",
  24. "name":"车辆定位",
  25. "url":"http://wx.zhizhuchuxing.com/wechat/jssdk/location.php"
  26. },
  27. {
  28. "type":"view",
  29. "name":"品牌介绍",
  30. "url":"http://mp.weixin.qq.com/s?__biz=MzIwNjI0MDAwOQ==&mid=502857840&idx=1&sn=3588fceca936c75cf5bede34b5dafe76#rd"
  31. },
  32. {
  33. "type":"view",
  34. "name":"帮助中心",
  35. "url":"http://mp.weixin.qq.com/s?__biz=MzIwNjI0MDAwOQ==&mid=502857753&idx=1&sn=a9039c8508a05f08f41027307296995f&scene=18#wechat_redirect"
  36. }]
  37. }]
  38. }';
  39. $result = http_request($url, $jsonmenu);
  40. var_dump($result);