login

package
v1.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 8, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Code generated by go-bindata. DO NOT EDIT. sources: assets/login/dist/all.min.css assets/login/dist/all.min.js assets/login/dist/respond.min.js

Index

Constants

This section is empty.

Variables

View Source
var AssetsList = []string{
	"/login/dist/all.min.css",
	"/login/dist/all.min.js",
	"/login/dist/respond.min.js",
}
View Source
var DefaultFuncMap = template.FuncMap{
	"lang":     language.Get,
	"langHtml": language.GetFromHtml,
	"link": func(cdnUrl, prefixUrl, assetsUrl string) string {
		if cdnUrl == "" {
			return prefixUrl + assetsUrl
		}
		return cdnUrl + assetsUrl
	},
	"isLinkUrl": func(s string) bool {
		return (len(s) > 7 && s[:7] == "http://") || (len(s) > 8 && s[:8] == "https://")
	},
	"render": func(s, old, repl template.HTML) template.HTML {
		return template.HTML(strings.ReplaceAll(string(s), string(old), string(repl)))
	},
	"renderJS": func(s template.JS, old, repl template.HTML) template.JS {
		return template.JS(strings.ReplaceAll(string(s), string(old), string(repl)))
	},
	"divide": func(a, b int) int {
		return a / b
	},
}
View Source
var List = map[string]string{"installation": `{{define "installation"}}
    <html>
    <head>
        <title>GoAdmin Install</title>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
        <link rel="stylesheet" href="../../assets/install/assets/css/main.css">
        <link rel="stylesheet" href="../../assets/fullpage/fullpage.min.css">
        <noscript>
            <link rel="stylesheet" href="../../assets/install/assets/css/noscript.css"/>
        </noscript>
    </head>
    <body class="">

    <div id="fullpage">
        <div class="section active" id="section1">
            <div class="slide" id="slide1">
                <div class="page-wrapper" style="margin-left: auto;margin-right:  auto;width: 1236px;">
                    <!-- Wrapper -->
                    <div class="wrapper" style="margin-left: auto;margin-right:  auto;">
                        <section class="panel color2-alt">
                            <div class="intro color2">
                                <h2 class="major">数据库配置</h2>
                                <p>目前仅支持Mysql</p>
                            </div>
                            <div class="inner columns aligned" style="padding: 2.5rem 3.5rem 2rem 3.5rem;">
                                <div class="span-2-5">
                                    <form method="post" action="#">
                                        <div class="field" style="width: calc(73% - 0.75rem);">
                                            <label for="demo-name">地址</label>
                                            <input type="text" name="demo-name" id="db-host" value=""
                                                   placeholder="127.0.0.1">
                                        </div>
                                        <div class="field quarter">
                                            <label for="demo-email">端口</label>
                                            <input type="email" name="demo-email" id="db-port" value=""
                                                   placeholder="3306">
                                        </div>
                                        <div class="field">
                                            <label for="demo-name">账号</label>
                                            <input type="text" name="demo-name" id="db-username" value=""
                                                   placeholder="root">
                                        </div>
                                        <div class="field">
                                            <label for="demo-email">密码</label>
                                            <input type="password" name="demo-email" id="db-password" value=""
                                                   placeholder="root">
                                        </div>
                                        <div class="field">
                                            <label for="demo-email">数据库名</label>
                                            <input type="text" name="demo-email" id="db-database" value=""
                                                   placeholder="database">
                                        </div>
                                        <div class="field" style="margin-top: 20px;">
                                            <ul class="actions">
                                                <li><input id="test-con-btn" type="submit" value="连接测试"
                                                           class="special color2"></li>
                                                <li><input class="input-next" type="reset" value="下一步"></li>
                                            </ul>
                                        </div>
                                    </form>
                                </div>
                            </div>
                        </section>
                        <!-- Copyright -->
                        <div class="copyright">Copyright © 2018.Company name All rights reserved.<a target="_blank"
                                                                                                    href="https://github.com/chenhg5/go-admin">GoAdmin</a>
                        </div>
                    </div>

                </div>
            </div>
            <div class="slide" id="slide2">
                <div class="page-wrapper" style="margin-left: auto;margin-right:  auto;width: 1236px;">
                    <!-- Wrapper -->
                    <div class="wrapper" style="margin-left: auto;margin-right:  auto;">
                        <section class="panel color2-alt">
                            <div class="intro color2">
                                <h2 class="major">选择管理数据表</h2>
                                <p>选择管理数据表</p>
                            </div>
                            <div class="inner columns aligned" style="padding: 2.5rem 3.5rem 2rem 3.5rem;">
                                <div class="span-2-5">
                                    <form method="post" action="#" id="table-div">
                                        <div class="field quarter">
                                            <input type="checkbox" id="demo-copy" name="demo-copy" class="color2">
                                            <label for="demo-copy">users</label>
                                        </div>
                                        <div class="field quarter">
                                            <input type="checkbox" id="demo-human" name="demo-human" class="color2"
                                                   checked="">
                                            <label for="demo-human">ninepic</label>
                                        </div>
                                        <div class="field quarter">
                                            <input type="checkbox" id="demo-copy1" name="demo-copy1" class="color2">
                                            <label for="demo-copy1">users</label>
                                        </div>
                                        <div class="field quarter">
                                            <input type="checkbox" id="demo-human1" name="demo-human1" class="color2"
                                                   checked="">
                                            <label for="demo-human1">ninepic</label>
                                        </div>
                                        <div class="field quarter">
                                            <input type="checkbox" id="demo-copy2" name="demo-copy2" class="color2">
                                            <label for="demo-copy2">users</label>
                                        </div>
                                        <div class="field quarter">
                                            <input type="checkbox" id="demo-human2" name="demo-human2" class="color2"
                                                   checked="">
                                            <label for="demo-human2">ninepic</label>
                                        </div>
                                        <div class="field quarter">
                                            <input type="checkbox" id="demo-copy3" name="demo-copy3" class="color2">
                                            <label for="demo-copy3">users</label>
                                        </div>
                                        <div class="field quarter">
                                            <input type="checkbox" id="demo-human3" name="demo-human3" class="color2"
                                                   checked="">
                                            <label for="demo-human3">ninepic</label>
                                        </div>
                                        <div class="field" style="margin-top: 20px;">
                                            <ul class="actions">
                                                <li><input class="input-prev" type="reset" value="上一步"></li>
                                                <li><input class="input-next" type="reset" value="下一步"></li>
                                            </ul>
                                        </div>
                                    </form>
                                </div>
                            </div>
                        </section>
                        <!-- Copyright -->
                        <div class="copyright">Copyright © 2018.Company name All rights reserved.<a target="_blank"
                                                                                                    href="https://github.com/chenhg5/go-admin">GoAdmin</a>
                        </div>
                    </div>
                </div>
            </div>
            <div class="slide" id="slide3">
                <div class="page-wrapper" style="margin-left: auto;margin-right:  auto;width: 1236px;">
                    <!-- Wrapper -->
                    <div class="wrapper" style="margin-left: auto;margin-right:  auto;">
                        <section class="panel color2-alt">
                            <div class="intro color2">
                                <h2 class="major">设置字段</h2>
                                <p>User表</p>
                            </div>
                            <div class="inner columns aligned"
                                 style="padding: 2.5rem 3.5rem 2rem 3.5rem;overflow-y: scroll;">
                                <div class="span-2-5">
                                    <form method="post" action="#">
                                        <div class="field" style="width: calc(38% - 0.5rem);">
                                            <label for="demo-name">id</label>
                                            <input type="text" name="demo-name" id="id" value="" placeholder="字段显示名称">
                                        </div>
                                        <div class="field third">
                                            <label for="demo-category">编辑表单类型</label>
                                            <div class="select-wrapper">
                                                <select name="demo-category" id="demo-category-id">
                                                    <option value="">-</option>
                                                    <option value="1">显示</option>
                                                    <option value="1">Text</option>
                                                    <option value="1">Select</option>
                                                </select>
                                            </div>
                                        </div>
                                        <div class="field third" style="margin-top: 40px;">
                                            <input type="checkbox" id="demo1-copy1" name="demo1-copy1" class="color2">
                                            <label for="demo1-copy1">取消</label>
                                        </div>

                                        <div class="field" style="width: calc(38% - 0.5rem);">
                                            <label for="demo-name">name</label>
                                            <input type="text" name="demo-name" id="name" value="" placeholder="name">
                                        </div>
                                        <div class="field third">
                                            <label for="demo-category">编辑表单类型</label>
                                            <div class="select-wrapper">
                                                <select name="demo-category" id="demo-category-name">
                                                    <option value="">-</option>
                                                    <option value="1">显示</option>
                                                    <option value="1">Text</option>
                                                    <option value="1">Select</option>
                                                </select>
                                            </div>
                                        </div>
                                        <div class="field third" style="margin-top: 40px;">
                                            <input type="checkbox" id="demo1-copy2" name="demo1-copy2" class="color2">
                                            <label for="demo1-copy2">取消</label>
                                        </div>

                                        <div class="field" style="width: calc(38% - 0.5rem);">
                                            <label for="demo-name">id</label>
                                            <input type="text" name="demo-name" value="" placeholder="id">
                                        </div>
                                        <div class="field third">
                                            <label for="demo-category">编辑表单类型</label>
                                            <div class="select-wrapper">
                                                <select name="demo-category">
                                                    <option value="">-</option>
                                                    <option value="1">显示</option>
                                                    <option value="1">Text</option>
                                                    <option value="1">Select</option>
                                                </select>
                                            </div>
                                        </div>
                                        <div class="field third" style="margin-top: 40px;">
                                            <input type="checkbox" id="demo1-copy3" name="demo1-copy3" class="color2">
                                            <label for="demo1-copy3">取消</label>
                                        </div>

                                        <div class="field" style="width: calc(38% - 0.5rem);">
                                            <label for="demo-name">name</label>
                                            <input type="text" name="demo-name" value="" placeholder="name">
                                        </div>
                                        <div class="field third">
                                            <label for="demo-category">编辑表单类型</label>
                                            <div class="select-wrapper">
                                                <select name="demo-category">
                                                    <option value="">-</option>
                                                    <option value="1">显示</option>
                                                    <option value="1">Text</option>
                                                    <option value="1">Select</option>
                                                </select>
                                            </div>
                                        </div>
                                        <div class="field third" style="margin-top: 40px;">
                                            <input type="checkbox" id="demo1-copy4" name="demo1-copy4" class="color2">
                                            <label for="demo1-copy4">取消</label>
                                        </div>

                                        <div class="field" style="width: calc(38% - 0.5rem);">
                                            <label for="demo-name">id</label>
                                            <input type="text" name="demo-name" value="" placeholder="id">
                                        </div>
                                        <div class="field third">
                                            <label for="demo-category">编辑表单类型</label>
                                            <div class="select-wrapper">
                                                <select name="demo-category">
                                                    <option value="">-</option>
                                                    <option value="1">显示</option>
                                                    <option value="1">Text</option>
                                                    <option value="1">Select</option>
                                                </select>
                                            </div>
                                        </div>
                                        <div class="field third" style="margin-top: 40px;">
                                            <input type="checkbox" id="demo1-copy5" name="demo1-copy5" class="color2">
                                            <label for="demo1-copy5">取消</label>
                                        </div>

                                        <div class="field" style="width: calc(38% - 0.5rem);">
                                            <label for="demo-name">name</label>
                                            <input type="text" name="demo-name" value="" placeholder="name">
                                        </div>
                                        <div class="field third">
                                            <label for="demo-category">编辑表单类型</label>
                                            <div class="select-wrapper">
                                                <select name="demo-category">
                                                    <option value="">-</option>
                                                    <option value="1">显示</option>
                                                    <option value="1">Text</option>
                                                    <option value="1">Select</option>
                                                </select>
                                            </div>
                                        </div>
                                        <div class="field third" style="margin-top: 40px;">
                                            <input type="checkbox" id="demo1-copy6" name="demo1-copy6" class="color2">
                                            <label for="demo1-copy6">取消</label>
                                        </div>

                                        <div class="field" style="width: calc(38% - 0.5rem);">
                                            <label for="demo-name">id</label>
                                            <input type="text" name="demo-name" value="" placeholder="id">
                                        </div>
                                        <div class="field third">
                                            <label for="demo-category">编辑表单类型</label>
                                            <div class="select-wrapper">
                                                <select name="demo-category">
                                                    <option value="">-</option>
                                                    <option value="1">显示</option>
                                                    <option value="1">Text</option>
                                                    <option value="1">Select</option>
                                                </select>
                                            </div>
                                        </div>
                                        <div class="field third" style="margin-top: 40px;">
                                            <input type="checkbox" id="demo1-copy7" name="demo1-copy7" class="color2">
                                            <label for="demo1-copy7">取消</label>
                                        </div>

                                        <div class="field" style="width: calc(38% - 0.5rem);">
                                            <label for="demo-name">name</label>
                                            <input type="text" name="demo-name" value="" placeholder="name">
                                        </div>
                                        <div class="field third">
                                            <label for="demo-category">编辑表单类型</label>
                                            <div class="select-wrapper">
                                                <select name="demo-category">
                                                    <option value="">-</option>
                                                    <option value="1">显示</option>
                                                    <option value="1">Text</option>
                                                    <option value="1">Select</option>
                                                </select>
                                            </div>
                                        </div>
                                        <div class="field third" style="margin-top: 40px;">
                                            <input type="checkbox" id="demo1-copy8" name="demo1-copy8" class="color2">
                                            <label for="demo1-copy8">取消</label>
                                        </div>

                                        <div class="field" style="width: calc(38% - 0.5rem);">
                                            <label for="demo-name">id</label>
                                            <input type="text" name="demo-name" value="" placeholder="id">
                                        </div>
                                        <div class="field third">
                                            <label for="demo-category">编辑表单类型</label>
                                            <div class="select-wrapper">
                                                <select name="demo-category">
                                                    <option value="">-</option>
                                                    <option value="1">显示</option>
                                                    <option value="1">Text</option>
                                                    <option value="1">Select</option>
                                                </select>
                                            </div>
                                        </div>
                                        <div class="field third" style="margin-top: 40px;">
                                            <input type="checkbox" id="demo1-copy9" name="demo1-copy9" class="color2">
                                            <label for="demo1-copy9">取消</label>
                                        </div>

                                        <div class="field" style="width: calc(38% - 0.5rem);">
                                            <label for="demo-name">name</label>
                                            <input type="text" name="demo-name" value="" placeholder="name">
                                        </div>
                                        <div class="field third">
                                            <label for="demo-category">编辑表单类型</label>
                                            <div class="select-wrapper">
                                                <select name="demo-category">
                                                    <option value="">-</option>
                                                    <option value="1">显示</option>
                                                    <option value="1">Text</option>
                                                    <option value="1">Select</option>
                                                </select>
                                            </div>
                                        </div>
                                        <div class="field third" style="margin-top: 40px;">
                                            <input type="checkbox" id="demo1-copy10" name="demo1-copy10" class="color2">
                                            <label for="demo1-copy10">取消</label>
                                        </div>

                                        <div class="field" style="width: calc(38% - 0.5rem);">
                                            <label for="demo-name">id</label>
                                            <input type="text" name="demo-name" value="" placeholder="id">
                                        </div>
                                        <div class="field third">
                                            <label for="demo-category">编辑表单类型</label>
                                            <div class="select-wrapper">
                                                <select name="demo-category">
                                                    <option value="">-</option>
                                                    <option value="1">显示</option>
                                                    <option value="1">Text</option>
                                                    <option value="1">Select</option>
                                                </select>
                                            </div>
                                        </div>
                                        <div class="field third" style="margin-top: 40px;">
                                            <input type="checkbox" id="demo1-copy11" name="demo1-copy11" class="color2">
                                            <label for="demo1-copy11">取消</label>
                                        </div>

                                        <div class="field" style="width: calc(38% - 0.5rem);">
                                            <label for="demo-name">name</label>
                                            <input type="text" name="demo-name" value="" placeholder="name">
                                        </div>
                                        <div class="field third">
                                            <label for="demo-category">编辑表单类型</label>
                                            <div class="select-wrapper">
                                                <select name="demo-category">
                                                    <option value="">-</option>
                                                    <option value="1">显示</option>
                                                    <option value="1">Text</option>
                                                    <option value="1">Select</option>
                                                </select>
                                            </div>
                                        </div>
                                        <div class="field third" style="margin-top: 40px;">
                                            <input type="checkbox" id="demo1-copy12" name="demo1-copy12" class="color2">
                                            <label for="demo1-copy12">取消</label>
                                        </div>

                                        <div class="field" style="margin-top: 20px;">
                                            <ul class="actions">
                                                <li><input class="input-prev" type="reset" value="上一步"></li>
                                                <li><input class="input-next" type="reset" value="下一步"></li>
                                            </ul>
                                        </div>
                                    </form>
                                </div>
                            </div>
                        </section>
                        <!-- Copyright -->
                        <div class="copyright">Copyright © 2018.Company name All rights reserved.<a target="_blank"
                                                                                                    href="https://github.com/chenhg5/go-admin">GoAdmin</a>
                        </div>
                    </div>
                </div>
            </div>
            <div class="slide" id="slide4">
                <div class="page-wrapper" style="margin-left: auto;margin-right:  auto;width: 1236px;">
                    <!-- Wrapper -->
                    <div class="wrapper" style="margin-left: auto;margin-right:  auto;">
                        <section class="panel color2-alt">
                            <div class="intro color2">
                                <h2 class="major">设置超级管理员</h2>
                                <p>超级管理员设置</p>
                            </div>
                            <div class="inner columns aligned" style="padding: 2.5rem 3.5rem 2rem 3.5rem;">
                                <div class="span-2-5">
                                    <form method="post" action="#">
                                        <div class="field">
                                            <label for="demo-name">账号</label>
                                            <input type="text" name="demo-name" id="username" value=""
                                                   placeholder="root">
                                        </div>
                                        <div class="field">
                                            <label for="demo-email">密码</label>
                                            <input type="password" name="demo-email" id="password" value=""
                                                   placeholder="root">
                                        </div>
                                        <div class="field">
                                            <label for="demo-email">确认密码</label>
                                            <input type="password" name="demo-password_comfirm" id="password_comfirm"
                                                   value=""
                                                   placeholder="root">
                                        </div>
                                        <div class="field" style="margin-top: 20px;">
                                            <ul class="actions">
                                                <li><input class="input-next" type="reset" value="Enjoy!"></li>
                                            </ul>
                                        </div>
                                    </form>
                                </div>
                            </div>
                        </section>
                        <!-- Copyright -->
                        <div class="copyright">Copyright © 2018.Company name All rights reserved.<a target="_blank"
                                                                                                    href="https://github.com/chenhg5/go-admin">GoAdmin</a>
                        </div>
                    </div>

                </div>
            </div>
        </div>
    </div>

    <!-- Scripts -->
    <script src="../../assets/install/assets/js/jquery.min.js"></script>
    <script src="../../assets/install/assets/js/skel.min.js"></script>
    <script src="../../assets/install/assets/js/main.js"></script>
    <script src="../../assets/fullpage/fullpage.min.js"></script>
    <script type="text/javascript">
        var myFullpage = new fullpage('#fullpage', {
            anchors: ['first'],
            lazyLoad: true,
            scrollBar: true,
            autoScrolling: false
        });

        myFullpage.destroy();

        $(".input-next").click(function (e) {
            myFullpage.moveSlideRight()
        });
        $(".input-prev").click(function (e) {
            myFullpage.moveSlideLeft()
        });

        /** 处理逻辑 **/

        // 测试连接
        $('#test-con-btn').on('click', function (e) {
            e.preventDefault();
            $.ajax({
                dataType: 'json',
                type: 'POST',
                url: '/install/database/check',
                async: 'true',
                data: {
                    'h': $("#db-host").val(),
                    'po': $("#db-port").val(),
                    'u': $("#db-username").val(),
                    'pa': $("#db-password").val(),
                    'db': $("#db-database").val()
                },
                success: function (data) {
                    console.log(data)
                    if (data.code === 0) {

                        // html = "";
                        //
                        // for (i = 0; i < data.data.list.length; i++) {
                        //     html += '<div class="field"><input type="checkbox" id="' +
                        //             data.data.list[i] +
                        //             '" name="table-' + i + '" class="color2"><label for="table-' + i + '">' +
                        //             data.data.list[i]
                        //             + '</label></div>';
                        // }
                        //
                        // $("#table-div").html(html);

                        alert(data.msg);

                    } else {
                        alert(data.msg);
                    }
                },
                error: function (data) {
                    alert("ok");
                }
            });
        });

    </script>
    <style>
        .fp-controlArrow {
            display: none;
        }
    </style>
    </body>
    </html>
{{end}}`}

Functions

func Asset

func Asset(name string) ([]byte, error)

Asset loads and returns the asset for the given name. It returns an error if the asset could not be found or could not be loaded.

func AssetDir

func AssetDir(name string) ([]string, error)

AssetDir returns the file names below a certain directory embedded in the file by go-bindata. For example if you run go-bindata on data/... and data contains the following hierarchy:

data/
  foo.txt
  img/
    a.png
    b.png

then AssetDir("data") would return []string{"foo.txt", "img"} AssetDir("data/img") would return []string{"a.png", "b.png"} AssetDir("foo.txt") and AssetDir("notexist") would return an error AssetDir("") will return []string{"data"}.

func AssetInfo

func AssetInfo(name string) (os.FileInfo, error)

AssetInfo loads and returns the asset info for the given name. It returns an error if the asset could not be found or could not be loaded.

func AssetNames

func AssetNames() []string

AssetNames returns the names of the assets.

func MustAsset

func MustAsset(name string) []byte

MustAsset is like Asset but panics when Asset would return an error. It simplifies safe initialization of global variables.

func RestoreAsset

func RestoreAsset(dir, name string) error

RestoreAsset restores an asset under the given directory

func RestoreAssets

func RestoreAssets(dir, name string) error

RestoreAssets restores an asset under the given directory recursively

Types

type Installation

type Installation struct {
	Name string
}

func Get

func Get() *Installation

func (*Installation) GetAsset

func (i *Installation) GetAsset(name string) ([]byte, error)

func (*Installation) GetAssetList

func (i *Installation) GetAssetList() []string

func (*Installation) GetContent

func (i *Installation) GetContent() template.HTML

func (*Installation) GetName

func (i *Installation) GetName() string

func (*Installation) GetTemplate

func (i *Installation) GetTemplate() (*template.Template, string)

func (*Installation) IsAPage

func (i *Installation) IsAPage() bool

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL