1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- <?php
- # 公众号基本配置
- $config['type'] = 2;
- $config['token'] = array
- (
- 'name' => '获取公众号的token',
- 'method' => 'get',
- 'json' => false,
- 'url' => 'https://api.weixin.qq.com/cgi-bin/token?',
- 'param' => array
- (
- 'appid' => 'appid',
- 'secret' => 'secret',
- 'grant_type' => 'client_credential',
- ),
- //针对一些返回的名称,做转换
- 'response' => array
- (
- 'access_token' => 'token',
- 'expires_in' => 'expires_in',
- ),
- );
- $config['ticket'] = array
- (
- 'name' => '获取公众号的ticket',
- 'method' => 'get',
- 'json' => false,
- 'url' => 'https://api.weixin.qq.com/cgi-bin/ticket/getticket?',
- 'param' => array
- (
- 'type' => 'jsapi',
- 'access_token' => 'token',
- ),
- //针对一些返回的名称,做转换
- 'response' => array
- (
- 'jsapi_ticket' => 'ticket',
- 'expires_in' => 'expires_in',
- ),
- );
- return $config;
|