wang hou sheng 8 months ago
parent 12a087cb36
commit 1d3187c333
  1. 6
      app/api/controller/Wxserver.php

@ -4,6 +4,7 @@ declare (strict_types=1);
namespace app\api\controller;
use cores\BaseController;
use think\facade\Db;
use think\response\Json;
class Wxserver extends BaseController
@ -26,8 +27,9 @@ class Wxserver extends BaseController
public function redirect()
{
$authorization_code = $this->request->param('authorization_code');
$expires_in = $this->request->param('expires_in');
$authorization_code = $this->request->get('authorization_code');
$expires_in = $this->request->get('expires_in');
Db::table('yoshop_wx_server')->insertGetId(['content' => '回调授权地址' . $authorization_code, 'created_at' => date('Y-m-d H:i:s')]);
if ($authorization_code) {
$obj = new \app\common\library\wxserver\Server();
$obj->authorizationInfo($authorization_code);

Loading…
Cancel
Save