| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
- <title></title>
- <meta name="description" content="">
- <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
- <meta name="robots" content="all,follow">
- <!-- Bootstrap CSS-->
- <link rel="stylesheet" href="__VENDOR__/bootstrap/css/bootstrap.min.css">
- <!-- Font Awesome CSS-->
- <link rel="stylesheet" href="__VENDOR__/font-awesome/css/font-awesome.min.css">
- <!-- Fontastic Custom icon font-->
- <!--<link rel="stylesheet" href="__CSS__/fontastic.css">-->
- <link rel="stylesheet" href="__CSS__/iconfont.css">
- <!-- Google fonts - Poppins -->
- <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Poppins:300,400,700">
- <!-- theme stylesheet-->
- <link rel="stylesheet" href="__CSS__/style.default.css" id="theme-stylesheet">
- <!-- Custom stylesheet - for your changes-->
- <link rel="stylesheet" href="__CSS__/custom.css">
- <!-- Favicon-->
- <link rel="shortcut icon" href="__IMG__/favicon.ico">
- <!-- Tweaks for older IEs--><!--[if lt IE 9]>
- <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
- <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script><![endif]-->
- </head>
- <body>
- <div class="page">
- <!-- Main Navbar-->
- {include file="layout/header" /}
- <div class="page-content d-flex align-items-stretch">
- <!-- Side Navbar -->
- {include file="layout/navigation" /}
- <div class="content-inner">
- <!-- Page Header-->
- <header class="page-header">
- <div class="container-fluid">
- <h2 class="no-margin-bottom">平台列表</h2>
- </div>
- </header>
- <!-- Breadcrumb-->
- <div class="breadcrumb-holder container-fluid">
- <ul class="breadcrumb">
- <li class="breadcrumb-item">平台管理</li>
- <li class="breadcrumb-item active">平台列表</li>
- </ul>
- </div>
- <section class="tables">
- <div class="container-fluid">
- <div class="row">
- <div class="col-lg-12">
- <div class="card">
- <!--<div class="card-close">
- <div class="dropdown">
- <button type="button" id="closeCard1" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" class="dropdown-toggle"><i class="fa fa-ellipsis-v"></i></button>
- <div aria-labelledby="closeCard1" class="dropdown-menu dropdown-menu-right has-shadow"><a href="#" class="dropdown-item remove"> <i class="fa fa-times"></i>Close</a><a href="#" class="dropdown-item edit"> <i class="fa fa-gear"></i>Edit</a></div>
- </div>
- </div>-->
- <div class="card-header d-flex align-items-center">
- <h3 class="h4">平台列表</h3>
- </div>
- <div class="card-body">
- <div class="form-group col-lg-4" style="float: left;">
- <div class="input-group">
- <a class="btn btn-primary" href="{:url('admin/index/addPlatform')}" style="background-color: #169bd5; border-color: #169bd5; color: #fff">新增</a>
- </div>
- </div>
- <div class="form-group col-lg-6" style="float: right;">
- <div class="input-group">
- <span style="line-height: 2; font-size: 18px; margin-right: 5px;">平台名</span>
- <input type="text" id="platformName" class="form-control">
- <div class="input-group-append">
- <button type="button" onclick="onSearch()" class="btn btn-primary">查询</button>
- </div>
- <div class="input-group-append" style="margin-left: 20px;">
- <button type="button" onclick="ondelete()" class="btn btn-primary">删除</button>
- </div>
- </div>
- </div>
- <div class="table-responsive">
- <table class="table table-striped">
- <thead>
- <tr>
- <th><input type="checkbox" lay-filter="checkeds" lay-skin="primary" class="checkall" onclick="oncheck()"></th>
- <th>序号</th>
- <th>图标</th>
- <th>平台名</th>
- <!--<th>CODE</th>-->
- <th>注册时间</th>
- <th>注册IP</th>
- <!-- <th>验证网址</th>-->
- <th>邮箱</th>
- <th>电话</th>
- <!-- <th>备注</th> -->
- <th>状态</th>
- <th>操作</th>
- </tr>
- </thead>
- <tbody>
- <?php foreach ($platformList as $k => $v): ?>
- <tr>
- <td class="check-mail">
- <input type="checkbox" class="checkone" value="{$k+1}" name="ids" lay-skin="primary">
- </td>
- <th scope="row">{$k+1}</th>
- <td><img src="{$v['platform_img']}" style="width: 30px;height: 30px"></td>
- <td>{$v['platform_name']}</td>
- <!--<td>{$v['platform_code']}</td>-->
- <td><?php echo date('Y-m-d H:i',$v['platform_register_time']); ?></td>
- <td>{$v['platform_register_ip']}</td>
- <!-- <td>
- <?php
- $platformUrl = json_decode($v['platform_url']);
- foreach ($platformUrl as $va):
- ?>
- <p style="margin-bottom: 0px; width: 230px">
- <?php
- if (strlen($va) <= 30) {echo $va;}
- else {echo mb_strcut($va, 0, 30, 'utf-8').'...';}
- ?>
- </p>
- <?php endforeach; ?>
- </td> -->
- <td>{$v['platform_email']}</td>
- <td>{$v['platform_phone']}</td>
- <!-- <td>
- <?php
- if (strlen($v['platform_remark']) <= 40) {echo $v['platform_remark'];}
- else {echo mb_strcut($v['platform_remark'], 0, 40, 'utf-8').'...';}
- ?>
- </td> -->
- <td>
- <?php if ($v['platform_status'] == 1): ?>
- <span style="color: #26ce16;">启用</span>
- <?php else: ?>
- <span style="color: red;">禁用</span>
- <?php endif; ?></td>
- <td>
- <a href="{:url('admin/index/updatePlatform',['id'=>$v['platform_id']])}" class="icon iconfont icon-edit-square" title="编辑" style="text-decoration: none; color: #666; cursor:pointer"></a>
- <span onclick="platformUser({$v['platform_id']})" class="icon iconfont icon-user" title="查看" style="text-decoration: none; color: #666; cursor:pointer"></span>
- </td>
- </tr>
- <?php endforeach; ?>
- </tbody>
- </table>
- <ul class="list-unstyled" style="display: flex; justify-content: end;">
- <?php if (count($page) > 1): ?>
- <?php foreach ($page as $k => $v): ?>
- <li>
- <a onclick="changePage({$v})" style="{$currentPage == $v ? 'pointer-events:none;' : ''}" class="btn btn-xs {$currentPage == $v ? 'btn-secondary' : ''}">{$v}</a>
- </li>
- <?php endforeach; ?>
- <?php endif; ?>
- </ul>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </section>
- <!-- Page Footer-->
- {include file="layout/footer" /}
- </div>
- </div>
- </div>
- <!-- JavaScript files-->
- <script src="__VENDOR__/jquery/jquery.min.js"></script>
- <script src="__VENDOR__/popper.js/umd/popper.min.js"> </script>
- <script src="__VENDOR__/bootstrap/js/bootstrap.min.js"></script>
- <script src="__VENDOR__/jquery.cookie/jquery.cookie.js"> </script>
- <script src="__VENDOR__/chart.js/Chart.min.js"></script>
- <script src="__VENDOR__/jquery-validation/jquery.validate.min.js"></script>
- <script src="__JS__/jquery.form.js"></script>
- <script src="__JS__/plugins/layer/layer.min.js"></script>
- <!-- Main File-->
- <script src="__JS__/front.js"></script>
- <script>
- function platformUser(id) {
- let urlParam = "{:url('admin/index/platformUser')}"+"?id="+id;
- window.location.href = urlParam;
- }
- function onSearch() {
- let platformName = $("#platformName").val();
- let urlParam = "{:url('admin/index/platformlist')}"+"?platformName="+platformName;
- window.location.href = urlParam;
- }
- function oncheck() {
- if($('.checkall').is(':checked')==true){
- $('.checkone').prop('checked',true);
- }else{
- $('.checkone').prop('checked',false);
- }
- }
- function ondelete() {
- let msg = '确认删除所选平台';
- layer.confirm(msg, {icon: 3, title:'提示'}, function(index){
- var ids = [];
- $("input[name='ids']:checked").each(function(i){
- ids.push($(this).val())
- })
- if(ids==''){
- layer.msg('未选中任何平台'); return false;
- }
- //console.log(ids);
- $.getJSON("{:url('admin/index/delPlatform')}", {'ids' : ids}, function(res){
- //console.log(res);
- if(1 == res.code){
- layer.alert(res.msg, {title: '友情提示', icon: 1, closeBtn: 0}, function(){
- location.reload();
- });
- }else if(111 == res.code){
- window.location.reload();
- }else{
- layer.alert(res.msg, {title: '友情提示', icon: 2});
- }
- });
- layer.close(index);
- })
- }
- function checkStatus(id, getStatus) {
- let msg = '确认禁用此用户';
- if (getStatus != 1) {
- msg = '确认启用此用户';
- }
- let status = getStatus == 1 ? 2 : 1;
- layer.confirm(msg, {icon: 3, title:'提示'}, function(index){
- $.getJSON("{:url('admin/index/updatePlatform')}", {'id' : id, status: status}, function(res){
- if(1 == res.code){
- layer.alert(res.msg, {title: '友情提示', icon: 1, closeBtn: 0}, function(){
- location.reload();
- });
- }else if(111 == res.code){
- window.location.reload();
- }else{
- layer.alert(res.msg, {title: '友情提示', icon: 2});
- }
- });
- layer.close(index);
- })
- }
- function changePage(page) {
- let param = getQueryString();
- param.currentPage = page;
- let urlParam = "{:url('admin/index/platformList')}"+"?"+putUrlParam(param);
- window.location.href = urlParam;
- }
- // 获取URL参数.
- function getQueryString() {
- var qs = location.search.substr(1), // 获取url中"?"符后的字串
- args = {}, // 保存参数数据的对象
- items = qs.length ? qs.split("&") : [], // 取得每一个参数项
- item = null,
- len = items.length;
- for(var i = 0; i < len; i++) {
- item = items[i].split("=");
- var name = decodeURIComponent(item[0]),
- value = decodeURIComponent(item[1]);
- if(name) {
- args[name] = value;
- }
- }
- return args;
- }
- // 对象转URL参数
- function putUrlParam(param) {
- let urlParam = '';
- let n = 1;
- for(let key in param){
- if (n === 1) {
- urlParam = key+'='+param[key];
- } else {
- urlParam += '&'+key+'='+param[key];
- }
- n++;
- }
- return urlParam;
- }
- </script>
- </body>
- </html>
|