feat : login wx
This commit is contained in:
@@ -77,6 +77,6 @@ class ApiReturnAspect extends AbstractAspect
|
|||||||
$logParam = !$post ? '{}' : json_encode($post);
|
$logParam = !$post ? '{}' : json_encode($post);
|
||||||
$header = json_encode($this->request->getHeaders());
|
$header = json_encode($this->request->getHeaders());
|
||||||
|
|
||||||
$this->log->requestApiLog("\napi==path:{$this->request->getPathInfo()}\nuserId:$this->userId\nrequestData:$logParam\nheader:$header\nresponseData:$result");
|
$this->log->requestApiLog("\napi==path:{$this->request->getPathInfo()}\nuserId:$this->userId\nrequestData:$logParam\nheader:$header\nresponseData:$result\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -49,6 +49,7 @@ trait WxMiniTrait
|
|||||||
*/
|
*/
|
||||||
public function jsCodeGetOpenId(string $code): mixed
|
public function jsCodeGetOpenId(string $code): mixed
|
||||||
{
|
{
|
||||||
|
var_dump(config('system.wx_appid'),config('system.wx_secret'));
|
||||||
$url = sprintf(
|
$url = sprintf(
|
||||||
'/sns/jscode2session?appid=%s&secret=%s&js_code=%s&grant_type=authorization_code',
|
'/sns/jscode2session?appid=%s&secret=%s&js_code=%s&grant_type=authorization_code',
|
||||||
config('system.wx_appid'),
|
config('system.wx_appid'),
|
||||||
|
|||||||
5
sync/http/api/user.http
Normal file
5
sync/http/api/user.http
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
### 登录
|
||||||
|
POST {{host}}/api/login/index
|
||||||
|
Content-Type: application/x-www-form-urlencoded
|
||||||
|
|
||||||
|
login_type=wx_login&js_code=12222
|
||||||
Reference in New Issue
Block a user