1
0
Fork 0
 
 
 
 
 
 
Go to file
panliang eda3248af3 banner 2023-12-01 21:04:56 +08:00
app banner 2023-12-01 21:04:56 +08:00
bootstrap Initial commit 2023-12-01 09:45:41 +08:00
config party_users 2023-12-01 16:35:28 +08:00
database banner 2023-12-01 21:04:56 +08:00
lang banner 2023-12-01 21:04:56 +08:00
public init 2023-12-01 10:12:00 +08:00
resources init 2023-12-01 10:12:00 +08:00
routes party_users 2023-12-01 16:35:28 +08:00
storage Initial commit 2023-12-01 09:45:41 +08:00
tests banner 2023-12-01 21:04:56 +08:00
.editorconfig Initial commit 2023-12-01 09:45:41 +08:00
.env.example init 2023-12-01 10:12:00 +08:00
.gitattributes Initial commit 2023-12-01 09:45:41 +08:00
.gitignore Initial commit 2023-12-01 09:45:41 +08:00
README.md Initial commit 2023-12-01 09:45:41 +08:00
artisan Initial commit 2023-12-01 09:45:41 +08:00
composer.json Initial commit 2023-12-01 09:45:41 +08:00
composer.lock Initial commit 2023-12-01 09:45:41 +08:00
package.json Initial commit 2023-12-01 09:45:41 +08:00
phpunit.xml Initial commit 2023-12-01 09:45:41 +08:00
vite.config.js Initial commit 2023-12-01 09:45:41 +08:00

README.md

Owl Admin Start

  • Laravel 10.x
  • slowlyo/owl-admin
  • tucker-eric/eloquentfilter

修改前端文件

resources\admin-views\src\pages\amis\index.tsx

自定义登录页面, 删除高度 20pxdiv

return (
        <>
            <Spin loading={initPage.loading}
                  dot
                  size={8}
                  className="w-full"
                  style={{minHeight: initPage.loading ? "500px" : ""}}>
                <AmisRender schema={schema}/>
            </Spin>
            {(settings.footer && !initPage.loading) && <Footer/>}
        </>
    )

resources\admin-views\src\components\AmisRender\CustomComponents\components\WangEditor\index.tsx

WangEditor 编辑器上传图片时, 把登录授权的 token 带上

// 编辑器配置
const editorConfig: Partial<IEditorConfig> = {
    placeholder: props.placeholder,
    readOnly: props.disabled || props.static,
    autoFocus: props.autoFocus,
    maxLength: props.maxLength,
    MENU_CONF: {
        uploadImage: {
            server: props.uploadImageServer,
            maxFileSize: props.uploadImageMaxSize || (1024 * 1024 * 2),
            maxNumberOfFiles: props.uploadImageMaxNumber || 100,
            headers: {
                Authorization: `Bearer ${token}`
            }
        },
        uploadVideo: {
            server: props.uploadVideoServer,
            maxFileSize: props.uploadVideoMaxSize || (1024 * 1024 * 10),
            maxNumberOfFiles: props.uploadVideoMaxNumber || 10,
        }
    }
}

resources\admin-views\src\pages\login\form.tsx

自定义登录页面, 重复请求接口 admin-api/captcha 获取图形验证码

// 读取 localStorage, 设置初始值
useEffect(() => {
    const rememberPassword = !!loginParams
    setRememberPassword(rememberPassword)
    if (formRef.current && rememberPassword) {
        const parseParams = JSON.parse(decodeURIComponent(window.atob(loginParams)))
        formRef.current.setFieldsValue(parseParams)
    }

    // if (appSettings.login_captcha) {
    //     getCaptcha.run()
    // }
}, [loginParams])