wechat.php 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233
  1. <?php
  2. # 小程序基本配置
  3. $config['type'] = 3;
  4. $config['token'] = array
  5. (
  6. 'name' => '获取小程序的token',
  7. 'method' => 'get',
  8. 'json' => false,
  9. 'url' => 'https://api.weixin.qq.com/cgi-bin/token?',
  10. 'param' => array
  11. (
  12. 'appid' => 'appid',
  13. 'secret' => 'secret',
  14. 'grant_type' => 'client_credential',
  15. ),
  16. //针对一些返回的名称,做转换
  17. 'response' => array
  18. (
  19. 'access_token' => 'token',
  20. 'expires_in' => 'expires_in',
  21. ),
  22. );
  23. $config['send_msg'] = array
  24. (
  25. 'name' => '发送模板消息',
  26. 'method' => 'post',
  27. 'json' => true,
  28. 'url' => 'https://api.weixin.qq.com/cgi-bin/message/wxopen/template/send?',
  29. 'url' => 'https://api.weixin.qq.com/cgi-bin/message/wxopen/template/uniform_send?',
  30. 'param' => array
  31. (
  32. 'access_token' => 'token',
  33. 'touser' => 'touser',
  34. 'weapp_template_msg' => array
  35. (
  36. 'template_id' => 'template_id',
  37. 'page' => 'page',
  38. 'form_id' => 'form_id',
  39. 'data' => 'data',
  40. 'emphasis_keyword' => 'emphasis_keyword',
  41. ),
  42. ),
  43. //针对一些返回的名称,做转换
  44. 'response' => array
  45. (
  46. ),
  47. );
  48. $config['get_msg'] = array
  49. (
  50. 'name' => '获取帐号下已存在的模板列表',
  51. 'method' => 'post',
  52. 'json' => true,
  53. 'url' => 'https://api.weixin.qq.com/cgi-bin/wxopen/template/list?',
  54. 'param' => array
  55. (
  56. 'access_token' => 'token',
  57. 'offset' => '0',
  58. 'count' => '20',
  59. ),
  60. //针对一些返回的名称,做转换
  61. 'response' => array
  62. (
  63. ),
  64. );
  65. $config['send_subscribe'] = array
  66. (
  67. 'name' => '发送订阅消息',
  68. 'method' => 'post',
  69. 'json' => true,
  70. 'url' => 'https://api.weixin.qq.com/cgi-bin/message/subscribe/send?',
  71. 'param' => array
  72. (
  73. 'access_token' => 'token',
  74. 'touser' => 'touser',
  75. 'template_id' => 'template_id',
  76. 'page' => 'page',
  77. 'data' => 'data',
  78. 'miniprogram_state' => 'miniprogram_state',
  79. ),
  80. //针对一些返回的名称,做转换
  81. 'response' => array
  82. (
  83. ),
  84. );
  85. $config['get_subscribe'] = array
  86. (
  87. 'name' => '获取帐号下已存在的订阅消息模板列表',
  88. 'method' => 'get',
  89. 'json' => false,
  90. 'url' => 'https://api.weixin.qq.com/wxaapi/newtmpl/gettemplate?',
  91. 'param' => array
  92. (
  93. 'access_token' => 'token',
  94. ),
  95. //针对一些返回的名称,做转换
  96. 'response' => array
  97. (
  98. ),
  99. );
  100. $config['total_base'] = array
  101. (
  102. 'name' => '概况趋势',
  103. 'method' => 'post',
  104. 'json' => true,
  105. 'url' => 'https://api.weixin.qq.com/datacube/getweanalysisappiddailysummarytrend?',
  106. 'param' => array
  107. (
  108. 'access_token' => 'token',
  109. 'end_date' => 'end_date',
  110. 'begin_date' => 'begin_date',
  111. ),
  112. //针对一些返回的名称,做转换
  113. 'response' => array
  114. (
  115. ),
  116. );
  117. $config['total_visit'] = array
  118. (
  119. 'name' => '访问趋势',
  120. 'method' => 'post',
  121. 'json' => true,
  122. 'url' => 'https://api.weixin.qq.com/datacube/getweanalysisappiddailyvisittrend?',
  123. 'param' => array
  124. (
  125. 'access_token' => 'token',
  126. 'end_date' => 'end_date',
  127. 'begin_date' => 'begin_date',
  128. ),
  129. //针对一些返回的名称,做转换
  130. 'response' => array
  131. (
  132. ),
  133. );
  134. $config['code'] = array
  135. (
  136. 'name' => '获取小程序码',
  137. 'method' => 'post',
  138. 'json' => true,
  139. 'url' => 'https://api.weixin.qq.com/wxa/getwxacodeunlimit?',
  140. 'param' => array
  141. (
  142. 'access_token' => 'token',
  143. 'scene' => 'param',
  144. 'page' => 'path',
  145. 'width' => 'width',
  146. 'is_hyaline' => 'is_hyaline',
  147. 'env_version' => 'env_version',
  148. ),
  149. //针对一些返回的名称,做转换
  150. 'response' => array
  151. (
  152. 'img' => true,
  153. ),
  154. );
  155. $config['ship'] = array
  156. (
  157. 'name' => '发货信息录入',
  158. 'method' => 'post',
  159. 'json' => true,
  160. 'url' => 'https://api.weixin.qq.com/wxa/sec/order/upload_shipping_info?',
  161. 'param' => array
  162. (
  163. 'access_token' => 'token',
  164. 'order_key' => 'order_key',
  165. 'logistics_type' => 'logistics_type',
  166. 'delivery_mode' => 'delivery_mode',
  167. 'shipping_list' => 'shipping_list',
  168. 'upload_time' => 'upload_time',
  169. 'is_all_delivered' => 'is_all_delivered',
  170. 'payer' => 'payer',
  171. ),
  172. //针对一些返回的名称,做转换
  173. 'response' => array
  174. (
  175. ),
  176. );
  177. $config['ship_confirm'] = array
  178. (
  179. 'name' => '确认收货',
  180. 'method' => 'post',
  181. 'json' => true,
  182. 'url' => 'https://api.weixin.qq.com/wxa/sec/order/notify_confirm_receive?',
  183. 'param' => array
  184. (
  185. 'access_token' => 'token',
  186. 'merchant_id' => 'merchant_id',
  187. 'merchant_trade_no' => 'merchant_trade_no',
  188. 'received_time' => 'received_time',
  189. ),
  190. //针对一些返回的名称,做转换
  191. 'response' => array
  192. (
  193. ),
  194. );
  195. $config['delivery'] = array
  196. (
  197. 'name' => '获取物流',
  198. 'method' => 'post',
  199. 'json' => true,
  200. 'url' => 'https://api.weixin.qq.com/cgi-bin/express/delivery/open_msg/get_delivery_list?',
  201. 'param' => array
  202. (
  203. 'access_token' => 'token',
  204. 'test' => 1,
  205. ),
  206. //针对一些返回的名称,做转换
  207. 'response' => array
  208. (
  209. ),
  210. );
  211. return $config;