Browse Source

feat():修改获取授权码的方式

geek 4 years ago
parent
commit
581bddbc2a
1 changed files with 2 additions and 1 deletions
  1. 2 1
      application/index/controller/User.php

+ 2 - 1
application/index/controller/User.php

@@ -13,6 +13,7 @@ use app\index\exception\ApiException;
 use app\index\model\UserModel;
 use app\index\model\VisitorModel;
 use think\facade\Cache;
+use think\facade\Request;
 use think\facade\Session;
 
 class User extends BaseController {
@@ -22,7 +23,7 @@ class User extends BaseController {
         if (empty($channelId)){
             throw new ApiException('渠道id不为空');
         }
-        file_put_contents('log', date('Y-m-d H:i:s').'-'.json_encode(input()).PHP_EOL, FILE_APPEND);
+        file_put_contents('log', date('Y-m-d H:i:s').Request::url(true).'-'.json_encode(input()).PHP_EOL, FILE_APPEND);
 //        if (empty(input('unionid'))){
 //            throw new ApiException('unionid不为空');
 //        }