FastAdmin 的 captcha 是如何來的?


FastAdmin 的 captcha 是如何來的?

如何打開 FastAdmin 的驗證嗎?

文件位置 C:\www\fastadmin\application\config.php
改 login_captcha 為 true 即可

    //FastAdmin配置
    'fastadmin'              => [
        //是否開啟前台會員中心
        'usercenter'          => true,
        //登錄驗證碼
        'login_captcha'       => true,
        //登錄失敗超過10則1天后重試
        'login_failure_retry' => true,
        //是否同一賬號同一時間只能在一個地方登錄
        'login_unique'        => false,
        //登錄頁默認背景圖
        'login_background'    => "/assets/img/loginbg.jpg",
        //是否啟用多級菜單導航
        'multiplenav'         => false,
        //自動檢測更新
        'checkupdate'         => false,
        //版本號
        'version'             => '1.0.0.20181031_beta',
        //API接口地址
        'api_url'             => 'https://api.fastadmin.net',
    ],

分析

從這里可以看到驗證碼的 url 是 http://test.fastadmin.tk/captcha
那這個 url 是哪里定義的呢?找到 以下這個地址就可以看到。
C:\www\fastadmin\vendor\topthink\think-captcha\src\helper.php

\think\Route::get('captcha/[:id]', "\\think\\captcha\\CaptchaController@index");


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM