|
@@ -978,9 +978,9 @@ class Index extends Api
|
|
|
|
|
|
|
|
|
public function getqrcode($id = 0) {
|
|
|
- $access_token = Cache::get('access_token');
|
|
|
+
|
|
|
|
|
|
- if (!$access_token) {
|
|
|
+
|
|
|
|
|
|
$url = 'https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid='.config('wxchatpay.app_id').'&secret='.config('wxchatpay.app_secret');
|
|
|
|
|
@@ -989,7 +989,7 @@ class Index extends Api
|
|
|
$access_token = $result['access_token'];
|
|
|
|
|
|
Cache::set('access_token', $access_token, 7000);
|
|
|
- }
|
|
|
+
|
|
|
if (!$access_token) {
|
|
|
$this->error('参数缺失');
|
|
|
}
|