diff --git a/app/Admin/Common/Images.php b/app/Admin/Common/Images.php index 569cef0..e50b024 100644 --- a/app/Admin/Common/Images.php +++ b/app/Admin/Common/Images.php @@ -17,8 +17,9 @@ class Images extends AdminController */ 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; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL,$url);