|
|
@ -17,8 +17,9 @@ class Images extends AdminController |
|
|
*/ |
|
|
*/ |
|
|
private function getWxToken() |
|
|
private function getWxToken() |
|
|
{ |
|
|
{ |
|
|
$appid= env('WECHAT_MINI_PROGRAM_APPID'); |
|
|
|
|
|
$secret=env('WECHAT_MINI_PROGRAM_SECRET'); |
|
|
|
|
|
|
|
|
$appid= config('wechat.mini_program.default')['app_id']; |
|
|
|
|
|
$secret=config('wechat.mini_program.default')['secret']; |
|
|
|
|
|
|
|
|
$url = "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=".$appid."&secret=".$secret; |
|
|
$url = "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=".$appid."&secret=".$secret; |
|
|
$ch = curl_init(); |
|
|
$ch = curl_init(); |
|
|
curl_setopt($ch, CURLOPT_URL,$url); |
|
|
curl_setopt($ch, CURLOPT_URL,$url); |
|
|
|