From 8dcfae4fff98fbbb19ff46bd9750f25bc56801a9 Mon Sep 17 00:00:00 2001
From: zhaojs <349234519@qq.com>
Date: 星期一, 31 七月 2023 10:42:20 +0800
Subject: [PATCH] Merge branch 'release/v1.1.5发布'

---
 application/api/controller/User.php |   19 +++++++++++++++++--
 1 files changed, 17 insertions(+), 2 deletions(-)

diff --git a/application/api/controller/User.php b/application/api/controller/User.php
index 524cace..1b1171f 100644
--- a/application/api/controller/User.php
+++ b/application/api/controller/User.php
@@ -22,13 +22,13 @@
 use app\api\logic\ActivityInfo as InfoActivityInfo;
 use app\common\model\UserExtend as ModelUserExtend;
 use think\Db;
-
+use EasyWeChat\Kernel\Support\AES;
 /**
  * 浼氬憳鎺ュ彛
  */
 class User extends Api
 {
-    protected $noNeedLogin = ['GetRecomInviter','login', 'mobilelogin', 'resetpwd', 'changemobile', 'wxapplogin','bind_mobile_login','register'];
+    protected $noNeedLogin = ['GetDfgToken','GetRecomInviter','login', 'mobilelogin', 'resetpwd', 'changemobile', 'wxapplogin','bind_mobile_login','register'];
     protected $noNeedRight = '*';
 
     public function _initialize()
@@ -55,6 +55,21 @@
     }
 
 
+    public function GetDfgToken()
+    {
+        $userId=$this->request->post('userid');
+        if (!$userId) {
+            $this->error(__('Invalid parameters'));
+        }
+        //aes鍔犲瘑
+        $enKey="wp4hs3bvu7wq2mud";
+        $iv = 'fedcba9876543210';
+        $decrypted = base64_encode(AES::encrypt($userId,$enKey, $iv));
+        $this->success($decrypted);
+    }
+
+
+
     /**
      * 鏇存柊appclientid
      */

--
Gitblit v1.9.3