w
This commit is contained in:
@@ -8,6 +8,7 @@ use think\facade\Config;
|
||||
use think\facade\Request;
|
||||
use think\facade\Route;
|
||||
use think\facade\View;
|
||||
use think\response\Json;
|
||||
|
||||
class Wechat
|
||||
{
|
||||
@@ -30,14 +31,15 @@ class Wechat
|
||||
* @Date : 2022/9/9 11:29
|
||||
* @Author : <Jason.C>
|
||||
*/
|
||||
public function url(): string
|
||||
public function url(): Json
|
||||
{
|
||||
$url = $GLOBALS['data']['data']['url'];
|
||||
$redirect = Route::buildUrl('wechat/code', ['callback' => $url])
|
||||
->suffix(false)
|
||||
->domain(true);
|
||||
$this->initWechat();
|
||||
return $this->app->oauth->scopes(['snsapi_userinfo'])->redirect($redirect);
|
||||
|
||||
return show(SUCCESS_MESSAGE,SUCCESS_CODE,$this->app->oauth->scopes(['snsapi_userinfo'])->redirect($redirect));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user