zhaojs
2023-07-31 34db7035c9c7880e00b9328d022be65a29c62cb2
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
     */