| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130 | @extends('admin/layout')@section('header')@endsection@section('content')    <body class="gray-bg">    <div class="wrapper wrapper-content animated fadeIn">        <div class="ibox float-e-margins">            <div class="ibox-content">                <span style="font-weight: bold;font-size: 16px">总数: <span id="total">0</span></span>                <form class="row" id="searchForm">                    <div class="col-md-7 pull-right">                        <div class="input-group">                            <input type="text" placeholder="请输入平台链接" class="form-control"                                   name="keyword"                                   id="keyword" style="width: 300px;float: right">                            <span class="input-group-btn">                                        <button type="button" class="btn btn-md btn-primary" style="border-radius:2px;"                                                onclick="units.search()"> 搜索                                        </button>                                        <button type="reset" class="btn btn-md btn-primary" style="margin-left: 10px;border-radius:2px;"                                                name="resetBtn"> 重置                                        </button>                                        <button type="button" class="btn btn-md btn-primary" style="margin-left: 10px;border-radius:2px;"                                                onclick="units.exportExcel()"> 导出</button>                                        <button class="btn btn-default closeLayer" id="clo" type="button">关闭页面</button>                                    </span>                        </div>                    </div>                </form>                <hr>                <div class="table-responsive">                    <table id="table" class="table table-condensed"                           data-mobile-responsive="true"></table>                </div>            </div>        </div>    </div>    </body>@endsection@section('footer')    <script src="{{asset('js/plugins/layDate-v5.0.9/laydate/laydate.js')}}"></script>    <script>        laydate.render({            elem: '#date_range',            type: 'date',            range: true        });        var units = {            exportExcel: function () {                var formValues = tips.getFormValues("#searchForm");                var str = $.param(formValues);                window.open('/admin/link/externalInfoExport?' + str)            },            search: function () {                tips.selectPage();            },            fileUpload: function () {                var config = {                    url: '/admin/tool/excel-upload'                };                config.success = function (result) {                    $("#excel_path").val(result.data.file_url);                    layer.msg(result.message, {icon: 6, time: 1500});                };                tips.fileUpload($("#excel_file"), config);            },            getIdsBySelections: function () {                var selections = $("#table").bootstrapTable('getSelections');                var ids = [];                $.each(selections, function (inx, val) {                    ids.push(val.id);                });                return ids;            },        };        var config = {};        var keyword1 = getQueryVariable("keyword");        $('#keyword').val(keyword1);        if(keyword1==''){            document.getElementById("clo").style.display="none";        }        config.url = '/admin/link/info?keyword='+keyword1;        config.pageSize = 15;        config.columns = [ //字段            // {checkbox: true},            {                title: '序号', align: 'center', formatter: function (value, item, index) {                    return index + 1;                }            },            {title: '类型', field: 'link_type', align: 'center'},            {title: '项目名称', field: 'cn_title', align: 'center'},            {title: '平台链接', field: 'link_url', align: 'center'},            {title: '用户名', field: 'username', align: 'center'},            {title: '邮箱', field: 'email', align: 'center'},            {title: '密码', field: 'password', align: 'center'},            {title: 'profile演示地址', field: 'url', align: 'center'},        ];        config.onLoadSuccess = function (data) {            $("#total").text(data.total);        };        tips.bootstrapTable(config);        function getQueryVariable(variable)        {            var query = window.location.search.substring(1);            var vars = query.split("&");            for (var i=0;i<vars.length;i++) {                var pair = vars[i].split("=");                if(pair[0] == variable){return pair[1];}            }            return(false);        }    </script>@endsection
 |