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.
 
 
 
 
 

88 line
2.4 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. "sub_button":[
  12. {
  13. "type":"view",
  14. "name":"旅游攻略",
  15. "url":"http://m.xmwtt.com/tour_list.php?catid=1&type=tl"
  16. }]
  17. },
  18. {
  19. "name":"旅游预订",
  20. "sub_button":[
  21. {
  22. "type":"view",
  23. "name":"自由行",
  24. "url":"http://m.xmwtt.com/tour_list.php"
  25. },
  26. {
  27. "type":"view",
  28. "name":"周边游",
  29. "url":"http://m.xmwtt.com/tour_list.php?catid=1"
  30. },
  31. {
  32. "type":"view",
  33. "name":"租车包车",
  34. "url":"http://m.xmwtt.com/cars.php"
  35. },
  36. {
  37. "type":"view",
  38. "name":"特价门票",
  39. "url":"http://m.xmwtt.com/ticket.php"
  40. },
  41. {
  42. "type":"view",
  43. "name":"酒店预订",
  44. "url":"http://m.xmwtt.com/hotels.php"
  45. }]
  46. },
  47. {
  48. "name":"我的专享",
  49. "sub_button":[
  50. {
  51. "type":"view",
  52. "name":"私人订制",
  53. "url":"http://m.xmwtt.com/detail.php?id=10211"
  54. },
  55. {
  56. "type":"view",
  57. "name":"订单查询",
  58. "url":"http://bl.xmbailian.com/wx/login.php"
  59. },
  60. {
  61. "type":"view",
  62. "name":"事假申请",
  63. "url":"http://bl.xmbailian.com/personleave/login.php"
  64. },
  65. {
  66. "type":"view",
  67. "name":"BLDSD",
  68. "url":"http://m.xmwtt.com/bldsd/login.php"
  69. },
  70. {
  71. "type":"view",
  72. "name":"BLADM",
  73. "url":"http://m.xmwtt.com/bldsd/admin/login.php"
  74. }]
  75. }]
  76. }';
  77. /*
  78. ",
  79. {
  80. \"type\":\"view\",
  81. \"name\":\"帮助中心\",
  82. \"url\":\"http://mp.weixin.qq.com/s?__biz=MzIwNjI0MDAwOQ==&mid=502857753&idx=1&sn=a9039c8508a05f08f41027307296995f&scene=18#wechat_redirect\"
  83. }"
  84. */
  85. $result = http_request($url, $jsonmenu);
  86. var_dump($result);