861 lines
37 KiB
PHP
861 lines
37 KiB
PHP
<?php if (!defined("RUNTIME")) exit(); /*a:5:{s:65:"C:\lewis\phpstudy_pro\WWW\foxcms\app\admin\view\column\index.html";i:1732932220;s:59:"C:\lewis\phpstudy_pro\WWW\foxcms\app\admin\view\foxcms.html";i:1732932220;s:56:"C:\lewis\phpstudy_pro\WWW\foxcms\app\admin\view\css.html";i:1732932220;s:64:"C:\lewis\phpstudy_pro\WWW\foxcms\app\admin\view\footed-copy.html";i:1732932220;s:59:"C:\lewis\phpstudy_pro\WWW\foxcms\app\admin\view\script.html";i:1732932220;}*/ ?>
|
|
<!DOCTYPE html>
|
|
<html lang="cn">
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
<title><?php echo xn_cfg('base.sys_name'); ?></title>
|
|
<link rel="stylesheet" href="<?php echo htmlentities($staticPath); ?>css/foxui-1.32.min.css" />
|
|
<link rel="stylesheet" href="<?php echo htmlentities($staticPath); ?>css/common.min.css" />
|
|
<link rel="stylesheet" href="<?php echo htmlentities($staticPath); ?>css/admin_common.css" />
|
|
|
|
|
|
</head>
|
|
<body>
|
|
<div class="foxcms-container basic-set-page-container apply-page-container">
|
|
<div class="foxcms-header">
|
|
<div class="foxcms-logo">
|
|
<img style="width: 100px;" src="/static/images/foxcms_logo.svg">
|
|
</div>
|
|
<div class="foxcms-modal">
|
|
<?php if($clickName): ?>
|
|
<p><?php echo htmlentities($clickName); ?></p>
|
|
<?php else: ?>
|
|
<button class="foxui-text" onclick="window.history.go(-1)">
|
|
<i class="foxui-icon-fanhui-o"></i>
|
|
<span>返回</span>
|
|
</button>
|
|
<?php endif; ?>
|
|
</div>
|
|
<div class="foxcms-bar">
|
|
<div class="foxcms-bar-left">
|
|
<ul class="foxui-breadcrumb">
|
|
<?php if(is_array($breadcrumb) || $breadcrumb instanceof \think\Collection || $breadcrumb instanceof \think\Paginator): if( count($breadcrumb)==0 ) : echo "" ;else: foreach($breadcrumb as $key=>$vo): ?>
|
|
<li class="foxui-breadcrumb-item">
|
|
<a href="<?php echo htmlentities($vo['url']); ?>"><?php echo htmlentities($vo['title']); ?></a>
|
|
</li>
|
|
<?php endforeach; endif; else: echo "" ;endif; ?>
|
|
</ul>
|
|
</div>
|
|
<div class="foxcms-bar-right">
|
|
|
|
<div class="foxui-dropdown lang-select">
|
|
<?php if(sizeof($otherLangs) > 0): ?>
|
|
<button class="foxui-dropdown-handle foxui-dropdown-icon lang-btn" data-trigger="hover" data-lang="<?php echo htmlentities($curlang['lang']); ?>"><?php echo htmlentities($curlang['name']); ?></button>
|
|
<div class="foxui-dropdown-menu">
|
|
<ul class="foxui-dropdown-slide">
|
|
<?php foreach($otherLangs as $key=>$vo): ?>
|
|
<li class="foxui-dropdown-item" data-id="<?php echo htmlentities($vo['id']); ?>" data-lang="<?php echo htmlentities($vo['lang']); ?>" onclick="langHandover(this)"><?php echo htmlentities($vo['name']); ?></li>
|
|
<?php endforeach; ?>
|
|
</ul>
|
|
</div>
|
|
<?php else: ?>
|
|
<button class="foxui-dropdown-handle foxui-dropdown-icon lang-btn display-none" data-trigger="hover" data-lang="<?php echo htmlentities($curlang['lang']); ?>"><?php echo htmlentities($curlang['name']); ?></button>
|
|
<?php endif; ?>
|
|
</div>
|
|
|
|
<div class="item icon index">
|
|
<i class="foxui-icon-shouye-o"></i>
|
|
</div>
|
|
<div class="item role">
|
|
<div class="foxui-dropdown">
|
|
<button class="foxui-text foxui-dropdown-handle foxui-dropdown-icon" data-trigger="hover" id="barService">
|
|
<i class="foxui-icon-kefu-o"></i>
|
|
</button>
|
|
</div>
|
|
<div class="foxui-dropdown dropdown">
|
|
<button class="foxui-text foxui-dropdown-handle foxui-dropdown-icon" data-trigger="hover"><?php echo session("admin_auth.nickname"); ?></button>
|
|
<div class="foxui-dropdown-menu">
|
|
<ul class="foxui-dropdown-slide">
|
|
<li class="foxui-dropdown-item" data-id="1">个人中心</li>
|
|
<li class="foxui-dropdown-item" data-id="2">修改密码</li>
|
|
<li class="foxui-dropdown-item" data-id="3">更新缓存</li>
|
|
<li class="foxui-divided" data-id="4"></li>
|
|
<li class="foxui-dropdown-item" data-id="5">退出系统</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="item icon logout">
|
|
<a onclick="logout()"><i class="foxui-icon-tuichu-o"></i></a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="foxcms-main">
|
|
<div class="foxcms-nav">
|
|
<ul>
|
|
<?php if(is_array($menu) || $menu instanceof \think\Collection || $menu instanceof \think\Paginator): if( count($menu)==0 ) : echo "" ;else: foreach($menu as $key=>$vo): ?>
|
|
<li>
|
|
<a class="<?php if($pid == $vo['id']): ?>active<?php endif; ?>" href="<?php echo htmlentities($vo['name']); ?>">
|
|
<i class="foxui-<?php echo htmlentities($vo['icon']); ?>"></i>
|
|
<span><?php echo htmlentities($vo['title']); ?></span>
|
|
</a>
|
|
</li>
|
|
<?php endforeach; endif; else: echo "" ;endif; ?>
|
|
</ul>
|
|
</div>
|
|
<?php if(sizeof($chileMenus) > 0): ?>
|
|
<div class="foxcms-menu-nav" style="<?php echo htmlentities($fox_menu); ?>">
|
|
<div class="foxcms-menu-nav-inner" id="foxMenuFrame">
|
|
|
|
<ul class="foxui-menu foxui-type-vertical">
|
|
<?php if(is_array($chileMenus) || $chileMenus instanceof \think\Collection || $chileMenus instanceof \think\Paginator): if( count($chileMenus)==0 ) : echo "" ;else: foreach($chileMenus as $key=>$cm): if(empty($cm['_data']) != true): ?>
|
|
<li class="foxui-menu-submenu">
|
|
<div class="foxui-menu-handle foxui-menu-icon is-active">
|
|
<span><?php echo htmlentities($cm['title']); ?></span>
|
|
</div>
|
|
<div class="foxui-menu-menu" style="display: block">
|
|
<ul class="foxui-menu-slide">
|
|
<?php if(is_array($cm['_data']) || $cm['_data'] instanceof \think\Collection || $cm['_data'] instanceof \think\Paginator): if( count($cm['_data'])==0 ) : echo "" ;else: foreach($cm['_data'] as $key=>$ccm): if(empty($ccm['_data']) != true): ?>
|
|
<li class="foxui-menu-submenu">
|
|
<div class="foxui-menu-handle foxui-menu-icon is-active">
|
|
<span><?php echo htmlentities($ccm['title']); ?></span>
|
|
</div>
|
|
<div class="foxui-menu-menu" style="display: block">
|
|
<ul class="foxui-menu-slide">
|
|
<?php if(is_array($ccm['_data']) || $ccm['_data'] instanceof \think\Collection || $ccm['_data'] instanceof \think\Paginator): if( count($ccm['_data'])==0 ) : echo "" ;else: foreach($ccm['_data'] as $key=>$cccm): if($clickId == $cccm['id']): ?>
|
|
<li class="foxui-menu-item is-active"><?php echo htmlentities($cccm['title']); ?></li>
|
|
<?php else: ?>
|
|
<li class="foxui-menu-item">
|
|
<a href="<?php echo htmlentities($cccm['name']); ?>?columnId=<?php echo htmlentities($cccm['id']); ?>"><?php echo htmlentities($cccm['title']); ?></a>
|
|
</li>
|
|
<?php endif; ?>
|
|
<?php endforeach; endif; else: echo "" ;endif; ?>
|
|
</ul>
|
|
</div>
|
|
</li>
|
|
<?php else: ?>
|
|
<li class="foxui-menu-item <?php if($clickId == $ccm['id']): ?>is-active<?php endif; ?>">
|
|
<a href="<?php echo htmlentities($ccm['name']); ?>?columnId=<?php echo htmlentities($ccm['id']); ?>"><?php echo htmlentities($ccm['title']); ?></a>
|
|
</li>
|
|
<?php endif; ?>
|
|
<?php endforeach; endif; else: echo "" ;endif; ?>
|
|
</ul>
|
|
</div>
|
|
</li>
|
|
<?php else: ?>
|
|
<li class="foxui-menu-item <?php if($clickId == $cm['id']): ?>is-active<?php endif; ?>">
|
|
<a href="<?php echo htmlentities($cm['name']); ?>?columnId=<?php echo htmlentities($cm['id']); ?>"><?php echo htmlentities($cm['title']); ?></a>
|
|
</li>
|
|
<?php endif; ?>
|
|
<?php endforeach; endif; else: echo "" ;endif; ?>
|
|
</ul>
|
|
</div>
|
|
<div class="foxcms-menu-nav-fold">
|
|
<i class="foxui-icon-zuizuo"></i>
|
|
</div>
|
|
</div>
|
|
<?php endif; ?>
|
|
<div class="foxcms-article foxui-scroll-container has-content-footer">
|
|
<div class="foxcms-content">
|
|
|
|
<input name="bcid" value="<?php echo htmlentities($bcid); ?>" type="hidden" />
|
|
<input name="id" value="<?php echo htmlentities($cid); ?>" type="hidden" />
|
|
<input name="is_thumb" value="<?php echo htmlentities($columnLevel['is_thumb']); ?>" type="hidden" />
|
|
<input name="level" value="<?php echo htmlentities($columnLevel['level']); ?>" type="hidden" />
|
|
<div class="foxcms-content-inner">
|
|
<!-- page content -->
|
|
<div class="column-list-content">
|
|
<div class="content-top-operation foxui-justify-content-start">
|
|
<button class="foxui-solid-primary foxui-size-small" id="addFirstColumnBtn">
|
|
<i class="foxui-icon-jiahao-o"></i>
|
|
<span>添加一级栏目</span>
|
|
</button>
|
|
<button class="foxui-size-small color-primary" onclick="tierSet()">
|
|
<span>设置栏目层级</span>
|
|
</button>
|
|
<button class="foxui-size-small color-primary" id="allCollapseBtn">
|
|
<i class="foxui-icon-xiangxia-o"></i>
|
|
<span>全部折叠</span>
|
|
</button>
|
|
<?php if(sizeof($langs) > 1): ?>
|
|
<div class="foxui-select foxui-margin-left-12" style="width: 140px;">
|
|
<div class="foxui-select-handle foxui-select-icon">
|
|
<input class="foxui-select-input copy-lang" readonly="readonly" placeholder="选择复制语言" value="" style="height: 32px"/>
|
|
</div>
|
|
<div class="foxui-select-menu">
|
|
<ul class="foxui-select-slide">
|
|
<?php foreach($langs as $key=>$vo): if($vo['lang'] != $curlang['lang']): ?>
|
|
<li class="foxui-select-item" data-id="<?php echo htmlentities($vo['lang']); ?>" onclick="copyLangColumn(this)"><?php echo htmlentities($vo['name']); ?></li>
|
|
<?php endif; ?>
|
|
<?php endforeach; ?>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<?php endif; ?>
|
|
</div>
|
|
<div class="section section-panel margin-top-10">
|
|
<div class="collapse-header">
|
|
<div class="sort">排序</div>
|
|
<div class="column-id">ID</div>
|
|
<div class="column">栏目名称</div>
|
|
<?php if($columnLevel['is_thumb'] == 1): ?>
|
|
<div class="pic">栏目图片</div>
|
|
<?php endif; ?>
|
|
<div class="model">所属模型</div>
|
|
<div class="state">显示</div>
|
|
<div class="model foxui-align-center">标识(SID)</div>
|
|
<div class="handle">
|
|
<span>操作</span>
|
|
</div>
|
|
</div>
|
|
|
|
<ul class="foxui-collapse foxui-drag foxui-drag-container loading-container" id="collapseContainer">
|
|
<?php foreach($columnList as $key=>$vo): ?>
|
|
<li class="foxui-collapse-item foxui-drag-item" data-id="<?php echo htmlentities($vo['columnId']); ?>">
|
|
<div class="foxui-collapse-head foxui-drag-content column-head-level-1">
|
|
|
|
<div class="drag-handle">
|
|
<i class="foxui-drag-handle foxui-icon-liebiao-o"></i>
|
|
</div>
|
|
<div class="column-id"><?php echo htmlentities($vo['columnId']); ?></div>
|
|
<div>
|
|
<i class="foxui-collapse-handle foxui-icon-kaishi-f foxui-collapse-icon"></i>
|
|
</div>
|
|
<div class="column">
|
|
<div class="level">一级</div>
|
|
<div class="foxui-input-group column-title">
|
|
<div class="foxui-input-suffix">
|
|
<input class="foxui-size-mini" placeholder="请输入栏目名称" value="<?php echo htmlentities($vo['columnName']); ?>" />
|
|
</div>
|
|
</div>
|
|
<?php if($columnLevel['level'] > 1): ?>
|
|
<button class="foxui-text-primary add-btn">
|
|
<i class="foxui-icon-jiahao-o"></i>
|
|
<span>二级栏目</span>
|
|
</button>
|
|
<?php endif; ?>
|
|
</div>
|
|
<?php if($columnLevel['is_thumb'] == 1): ?>
|
|
<div class="pic">
|
|
<div class="foxui-images foxui-images-small">
|
|
<div class="foxui-images-card">
|
|
<ul class="foxui-images-list ">
|
|
<?php if($vo['pic_ids'] != "" && $vo['pic_url'] != ""): ?>
|
|
<li class="foxui-images-item foxui-animate-fadeInDown">
|
|
<div class="content">
|
|
<img data-id="<?php echo htmlentities($vo['pic_ids']); ?>" src="<?php echo htmlentities($vo['pic_url']); ?>">
|
|
<span class="replace">替换</span>
|
|
<i class="foxui-icon-cuowu-f delete"></i>
|
|
</div>
|
|
</li>
|
|
<?php endif; ?>
|
|
<div class="foxui-images-handle">
|
|
<div class="foxui-images-handle-inner">
|
|
<i class="foxui-icon-jiahao-o"></i>
|
|
<span class="text">添加图片</span>
|
|
</div>
|
|
</div>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<?php endif; ?>
|
|
<div class="foxui-select model">
|
|
<div class="foxui-select-handle foxui-select-icon">
|
|
<input class="foxui-select-input foxui-size-mini" readonly="readonly" placeholder="选择模型" value="<?php echo htmlentities($vo['modelTitle']); ?>" data-id="<?php echo htmlentities($vo['model']); ?>" data-oldmodel="<?php echo htmlentities($vo['model']); ?>}"/>
|
|
<i class="foxui-icon-close-circle"></i>
|
|
</div>
|
|
<div class="foxui-select-menu">
|
|
<ul class="foxui-select-slide">
|
|
<?php foreach($modelRecords as $modelRecord): ?>
|
|
<li class="foxui-select-item async" data-id="<?php echo htmlentities($modelRecord['id']); ?>" data-rm="<?php echo htmlentities($modelRecord['reference_model']); ?>"><?php echo htmlentities($modelRecord['title']); ?></li>
|
|
<?php endforeach; ?>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="state">
|
|
<div class="foxui-switch <?php if($vo['isShow'] == 1): ?> is-checked <?php endif; ?>">
|
|
<input type="checkbox" checked="checked" value="" class="foxui-switch-input" />
|
|
<span class="foxui-switch-core"></span>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="model foxui-align-center"><?php echo htmlentities($vo['nid']); ?></div>
|
|
|
|
<div class="handle display-flex">
|
|
<button class="foxui-size-mini color-primary set-btn font-size-14" onclick="handleClickSet(<?php echo htmlentities($vo['columnId']); ?>)">
|
|
<i class="foxui-icon-shezhi-o"></i>
|
|
<span>设置</span>
|
|
</button>
|
|
<button class="foxui-size-mini color-primary delete-btn font-size-14" onclick="deleteCollapseItem(event, <?php echo htmlentities($vo['columnId']); ?>)">
|
|
<i class="foxui-icon-shanchu-o"></i>
|
|
<span>删除</span>
|
|
</button>
|
|
<button class="foxui-size-mini color-primary content-btn font-size-14" onclick="look(<?php echo htmlentities($vo['columnId']); ?>, 1)" target="_blank">
|
|
<i class="foxui-icon-shuji-o"></i>
|
|
<span>内容</span>
|
|
</button>
|
|
<button class="foxui-size-mini color-primary view-btn font-size-14" onclick="look(<?php echo htmlentities($vo['columnId']); ?>, 2)">
|
|
<i class="foxui-icon-kejian-o"></i>
|
|
<span>浏览</span>
|
|
</button>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<?php if(sizeof($vo['children']) > 0): ?>
|
|
<div class="foxui-collapse-content">
|
|
<ul class="foxui-collapse foxui-drag-container">
|
|
<?php foreach($vo['children'] as $voo): ?>
|
|
<li class="foxui-collapse-item foxui-drag-item column-item-level-2" data-id="<?php echo htmlentities($voo['columnId']); ?>">
|
|
<div class="foxui-collapse-head foxui-drag-content column-head-level-2">
|
|
|
|
<div class="drag-handle">
|
|
<i class="foxui-drag-handle foxui-icon-liebiao-o"></i>
|
|
</div>
|
|
<div class="column-id"><?php echo htmlentities($voo['columnId']); ?></div>
|
|
<div>
|
|
<i class="foxui-collapse-handle foxui-icon-kaishi-f foxui-collapse-icon"></i>
|
|
</div>
|
|
<div class="column">
|
|
<div class="level">二级</div>
|
|
<div class="foxui-input-group column-title">
|
|
<div class="foxui-input-suffix">
|
|
<input class="foxui-size-mini" placeholder="请输入栏目名称" value="<?php echo htmlentities($voo['columnName']); ?>" />
|
|
</div>
|
|
</div>
|
|
<?php if($columnLevel['level'] > 2): ?>
|
|
<button class="foxui-text-primary add-btn">
|
|
<i class="foxui-icon-jiahao-o"></i>
|
|
<span>三级栏目</span>
|
|
</button>
|
|
<?php endif; ?>
|
|
</div>
|
|
<?php if($columnLevel['is_thumb'] == 1): ?>
|
|
<div class="pic">
|
|
<div class="foxui-images foxui-images-small">
|
|
<div class="foxui-images-card">
|
|
<ul class="foxui-images-list">
|
|
<?php if($voo['pic_ids'] != "" && $voo['pic_url'] != ""): ?>
|
|
<li class="foxui-images-item foxui-animate-fadeInDown">
|
|
<div class="content">
|
|
<img data-id="<?php echo htmlentities($voo['pic_ids']); ?>" src="<?php echo htmlentities($voo['pic_url']); ?>">
|
|
<span class="replace">替换</span>
|
|
<i class="foxui-icon-cuowu-f delete"></i>
|
|
</div>
|
|
</li>
|
|
<?php endif; ?>
|
|
<div class="foxui-images-handle">
|
|
<div class="foxui-images-handle-inner">
|
|
<i class="foxui-icon-jiahao-o"></i>
|
|
<span class="text">添加图片</span>
|
|
</div>
|
|
</div>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<?php endif; ?>
|
|
|
|
<div class="foxui-select model">
|
|
<div class="foxui-select-handle foxui-select-icon">
|
|
<input class="foxui-select-input foxui-size-mini" readonly="readonly" placeholder="选择模型" value="<?php echo htmlentities($voo['modelTitle']); ?>" data-id="<?php echo htmlentities($voo['model']); ?>" data-oldmodel="<?php echo htmlentities($voo['model']); ?>}"/>
|
|
<i class="foxui-icon-close-circle"></i>
|
|
</div>
|
|
<div class="foxui-select-menu">
|
|
<ul class="foxui-select-slide">
|
|
<?php foreach($modelRecords as $modelRecord): ?>
|
|
<li class="foxui-select-item async" data-id="<?php echo htmlentities($modelRecord['id']); ?>"><?php echo htmlentities($modelRecord['title']); ?></li>
|
|
<?php endforeach; ?>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="state">
|
|
<div class="foxui-switch <?php if($voo['isShow'] == 1): ?> is-checked <?php endif; ?>">
|
|
<input type="checkbox" checked="checked" value="" class="foxui-switch-input" />
|
|
<span class="foxui-switch-core"></span>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="model foxui-align-center"><?php echo htmlentities($voo['nid']); ?></div>
|
|
|
|
<div class="handle display-flex">
|
|
<button class="foxui-size-mini color-primary set-btn font-size-14" onclick="handleClickSet(<?php echo htmlentities($voo['columnId']); ?>)">
|
|
<i class="foxui-icon-shezhi-o"></i>
|
|
<span>设置</span>
|
|
</button>
|
|
<button class="foxui-size-mini color-primary delete-btn font-size-14" onclick="deleteCollapseItem(event, <?php echo htmlentities($voo['columnId']); ?>)">
|
|
<i class="foxui-icon-shanchu-o"></i>
|
|
<span>删除</span>
|
|
</button>
|
|
<button class="foxui-size-mini color-primary content-btn font-size-14" onclick="look(<?php echo htmlentities($voo['columnId']); ?>, 1)">
|
|
<i class="foxui-icon-shuji-o"></i>
|
|
<span>内容</span>
|
|
</button>
|
|
<button class="foxui-size-mini color-primary view-btn font-size-14" onclick="look(<?php echo htmlentities($voo['columnId']); ?>, 2)">
|
|
<i class="foxui-icon-kejian-o"></i>
|
|
<span>浏览</span>
|
|
</button>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<?php if(sizeof($voo['children']) > 0): ?>
|
|
<div class="foxui-collapse-content">
|
|
<ul class="foxui-collapse foxui-drag-container">
|
|
|
|
<?php foreach($voo['children'] as $vooo): ?>
|
|
<li class="foxui-collapse-item foxui-drag-item column-item-level-3" data-id="<?php echo htmlentities($vooo['columnId']); ?>">
|
|
<div class="foxui-collapse-head foxui-drag-content column-head-level-3">
|
|
<div class="drag-handle">
|
|
<i class="foxui-drag-handle foxui-icon-liebiao-o"></i>
|
|
</div>
|
|
<div class="column-id"><?php echo htmlentities($vooo['columnId']); ?></div>
|
|
<div class="column">
|
|
<div class="level">三级</div>
|
|
<div class="foxui-input-group column-title">
|
|
<div class="foxui-input-suffix">
|
|
<input class="foxui-size-mini" placeholder="请输入栏目名称" value="<?php echo htmlentities($vooo['columnName']); ?>" />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<?php if($columnLevel['is_thumb'] == 1): ?>
|
|
<div class="pic">
|
|
<div class="foxui-images foxui-images-small">
|
|
<div class="foxui-images-card">
|
|
<ul class="foxui-images-list ">
|
|
<?php if($vooo['pic_ids'] != "" && $vooo['pic_url'] != ""): ?>
|
|
<li class="foxui-images-item foxui-animate-fadeInDown">
|
|
<div class="content">
|
|
<img data-id="<?php echo htmlentities($vooo['pic_ids']); ?>" src="<?php echo htmlentities($vooo['pic_url']); ?>">
|
|
<span class="replace">替换</span>
|
|
<i class="foxui-icon-cuowu-f delete"></i>
|
|
</div>
|
|
</li>
|
|
<?php endif; ?>
|
|
<div class="foxui-images-handle">
|
|
<div class="foxui-images-handle-inner">
|
|
<i class="foxui-icon-jiahao-o"></i>
|
|
<span class="text">添加图片</span>
|
|
</div>
|
|
</div>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<?php endif; ?>
|
|
|
|
<div class="foxui-select model">
|
|
<div class="foxui-select-handle foxui-select-icon">
|
|
<input class="foxui-select-input foxui-size-mini" readonly="readonly" placeholder="选择模型" value="<?php echo htmlentities($vooo['modelTitle']); ?>" data-id="<?php echo htmlentities($vooo['model']); ?>" data-oldmodel="<?php echo htmlentities($vooo['model']); ?>}"/>
|
|
<i class="foxui-icon-close-circle"></i>
|
|
</div>
|
|
<div class="foxui-select-menu">
|
|
<ul class="foxui-select-slide">
|
|
<?php foreach($modelRecords as $modelRecord): ?>
|
|
<li class="foxui-select-item async" data-id="<?php echo htmlentities($modelRecord['id']); ?>"><?php echo htmlentities($modelRecord['title']); ?></li>
|
|
<?php endforeach; ?>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="state">
|
|
<div class="foxui-switch <?php if($vooo['isShow'] == 1): ?> is-checked <?php endif; ?>">
|
|
<input type="checkbox" checked="checked" value="" class="foxui-switch-input" />
|
|
<span class="foxui-switch-core"></span>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="model foxui-align-center"><?php echo htmlentities($vooo['nid']); ?></div>
|
|
|
|
<div class="handle display-flex">
|
|
<button class="foxui-size-mini color-primary set-btn font-size-14" onclick="handleClickSet(<?php echo htmlentities($vooo['columnId']); ?>)">
|
|
<i class="foxui-icon-shezhi-o"></i>
|
|
<span>设置</span>
|
|
</button>
|
|
<button class="foxui-size-mini color-primary delete-btn font-size-14" onclick="deleteCollapseItem(event, <?php echo htmlentities($vooo['columnId']); ?>)">
|
|
<i class="foxui-icon-shanchu-o"></i>
|
|
<span>删除</span>
|
|
</button>
|
|
<button class="foxui-size-mini color-primary content-btn font-size-14" onclick="look(<?php echo htmlentities($vooo['columnId']); ?>, 1)">
|
|
<i class="foxui-icon-shuji-o"></i>
|
|
<span>内容</span>
|
|
</button>
|
|
<button class="foxui-size-mini color-primary view-btn font-size-14" onclick="look(<?php echo htmlentities($vooo['columnId']); ?>, 2)">
|
|
<i class="foxui-icon-kejian-o"></i>
|
|
<span>浏览</span>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
<?php endforeach; ?>
|
|
</ul>
|
|
</div>
|
|
<?php else: ?>
|
|
<div class="foxui-collapse-content">
|
|
<ul class="foxui-collapse foxui-drag-container">
|
|
</ul>
|
|
</div>
|
|
<?php endif; ?>
|
|
</li>
|
|
<?php endforeach; ?>
|
|
</ul>
|
|
</div>
|
|
<?php else: ?>
|
|
<div class="foxui-collapse-content">
|
|
<ul class="foxui-collapse foxui-drag-container">
|
|
</ul>
|
|
</div>
|
|
<?php endif; ?>
|
|
</li>
|
|
<?php endforeach; ?>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="foxcms-content-footer">
|
|
<button class="is-long foxui-size-small foxui-solid-primary" id="save">保存</button>
|
|
</div>
|
|
<div class="foxcms-content-copy">
|
|
<p>
|
|
<span>Copyright © 2021-<?php echo isset($nowtime) ? htmlentities($nowtime) : '现在'; ?></span>
|
|
<strong>FOXCMS</strong>
|
|
<span>版权所有</span>
|
|
</p>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
<script src="<?php echo htmlentities($staticPath); ?>js/jquery-3.6.0.min.js"></script>
|
|
<script src="<?php echo htmlentities($staticPath); ?>js/tinymce/tinymce.min.js"></script>
|
|
<script src="<?php echo htmlentities($staticPath); ?>js/echarts.min.js"></script>
|
|
<script src="<?php echo htmlentities($staticPath); ?>js/foxui-1.32.min.js"></script>
|
|
<script>
|
|
//全局上传文件端口
|
|
var UPLOAD_FILE_URL = "<?php echo url('upload_files/upload'); ?>";
|
|
//图片粘贴下载
|
|
var UPIMG_URL = "<?php echo url('upload_files/upimg'); ?>";
|
|
var SERVER_URL = "/";
|
|
//配置的后台路径
|
|
var ADMIN_PATH = "/" + "<?php echo config('adminconfig.admin_path'); ?>";
|
|
//静态文件路径
|
|
var STATIC_PATH ="<?php echo config('adminconfig.static_path'); ?>";
|
|
//退出地址
|
|
var LOGOUT_PATH = "<?php echo logout_url(); ?>";
|
|
//栏目模型地址
|
|
var GETCOLUMMODELS_PATH = "<?php echo getColumModels_url(); ?>";
|
|
//个人中心
|
|
var ADMINEDIT_PATH = "<?php echo adminEdit_url(); ?>";
|
|
//更新缓存
|
|
var LOGINCLEARCACHE_PATH = "<?php echo loginClearCache_url(); ?>";
|
|
//修改密码
|
|
var ADMINUPDATEPASSWORD_PATH = "<?php echo adminUpdatePassword_url(); ?>";
|
|
//循环生成静态html
|
|
var SEOALLSITE_PATH = "<?php echo seoAllSite_url(); ?>";
|
|
//单独静态生成
|
|
var SEOADDDATABUILDDETAIL_PATH = "<?php echo seoAddDataBuildDetail_url(); ?>";
|
|
//单独静态栏目生成
|
|
var SINGLEALLSITE_PATH = "<?php echo singleAllSite_url(); ?>";
|
|
//删除幻灯片
|
|
var SLIDEDELETE_PATH = "<?php echo slideDelete_url(); ?>";
|
|
//编辑幻灯片
|
|
var SLIDEEDIT_PATH = "<?php echo slideEdit_url(); ?>";
|
|
//后台首页地址
|
|
var HOME_PATH = "<?php echo url('Index/index'); ?>";
|
|
//切换语言
|
|
var HANDOVER_LANG_PATH = "<?php echo url('handoverLang'); ?>";
|
|
</script>
|
|
<script src="<?php echo htmlentities($staticPath); ?>js/rich_text.js"></script>
|
|
<script>
|
|
|
|
foxui.imagesManager.init({
|
|
paginationOption: {
|
|
type: 'solid',
|
|
size: 'small',
|
|
pageSize: 10,
|
|
pageNum: 7,
|
|
pageSizeList: [10, 20, 30, 50],
|
|
isShowJump: true,
|
|
isShowTotal: true,
|
|
isShowSize: true
|
|
},
|
|
url: "<?php echo url('PicManager/picManager'); ?>",
|
|
});
|
|
|
|
foxui.videoManager.init({
|
|
paginationOption: {
|
|
type: 'solid',
|
|
size: 'small',
|
|
pageSize: 10,
|
|
pageNum: 7,
|
|
pageSizeList: [10, 20, 30, 50],
|
|
isShowJump: true,
|
|
isShowTotal: true,
|
|
isShowSize: true,
|
|
},
|
|
url: "<?php echo url('VideoManager/videoManager'); ?>",
|
|
});
|
|
</script>
|
|
<script src="<?php echo htmlentities($staticPath); ?>js/common.js"></script>
|
|
<script src="<?php echo htmlentities($staticPath); ?>js/admin_common.js"></script>
|
|
|
|
<script src="<?php echo htmlentities($staticPath); ?>js/column_list.js"></script>
|
|
|
|
<script>
|
|
/**
|
|
* @description: 跳转至设置
|
|
*/
|
|
function handleClickSet(id) {
|
|
let columnId = $('input[name="id"]').val();
|
|
let bcid = $('input[name="bcid"]').val();
|
|
window.location.href = "<?php echo url('columnSet'); ?>?columnId="+columnId+"&type=1&id="+id+"&bcid=" + bcid;
|
|
}
|
|
|
|
/**
|
|
* @description: 删除 collapseItem
|
|
*/
|
|
function deleteCollapseItem(event, id) {
|
|
if(id == undefined || id == ""){
|
|
const currentTarget = event.currentTarget;
|
|
$(currentTarget).closest('.foxui-collapse-item').slideUp('fast', function () {
|
|
$(this).remove();
|
|
});
|
|
}else{
|
|
foxui.dialog({
|
|
title: '删除',
|
|
content: '您确定要删除当前及同级语言栏目吗',
|
|
cancelText: '取消',
|
|
confirmText: '删除',
|
|
buttonType: 'danger',
|
|
confirm: function (callback) {
|
|
ajaxR("<?php echo url('Column/deleteColumn'); ?>","post",{id},{},function(res){
|
|
if(res.code ==1){
|
|
foxui.message({
|
|
type:'success',
|
|
text: res.msg
|
|
})
|
|
setTimeout('myrefresh()', 100); //指定10秒刷新一次
|
|
}else{
|
|
foxui.message({
|
|
type:'warning',
|
|
text: res.msg
|
|
})
|
|
}
|
|
},function(res){
|
|
foxui.message({
|
|
type:'warning',
|
|
text: res.responseJSON.msg
|
|
})
|
|
})
|
|
callback();
|
|
},
|
|
cancel: function () {
|
|
foxui.message({
|
|
text: '取消删除',
|
|
});
|
|
},
|
|
});
|
|
}
|
|
}
|
|
|
|
/**
|
|
*查看内容
|
|
* @param columnId
|
|
* @param lookNum
|
|
*/
|
|
function look(columnId, lookNum){
|
|
let url = "<?php echo url('Column/look'); ?>?columnId="+columnId+"&lookNum=" + lookNum;
|
|
if(lookNum == 1) {
|
|
//内容
|
|
window.location.href = url;
|
|
}else if(lookNum == 2){
|
|
//浏览
|
|
window.open(url);
|
|
}
|
|
}
|
|
|
|
/**
|
|
* 模型切换
|
|
* @param obj
|
|
*/
|
|
function modelSwitch(obj) {
|
|
let {model,data_rm, column_id, old_model, $this} = {...obj};
|
|
let columnList = [];
|
|
$.ajax({
|
|
type: "post",
|
|
url: "checkData",
|
|
dataType: "json",
|
|
data: {column_id, data_rm, model, old_model},
|
|
async: false,
|
|
success: function (res) {
|
|
if (res.code == 1) {
|
|
columnList = res.data;
|
|
}
|
|
}
|
|
});
|
|
if(columnList.length > 0){
|
|
let indexV = 0;
|
|
columnList.forEach(item=>{
|
|
$.ajax({
|
|
type: "post",
|
|
url: "modelSwitch",
|
|
dataType: "json",
|
|
data: {...item},
|
|
async: false,
|
|
success: function (res) {
|
|
if (res.code == 1) {
|
|
indexV++;
|
|
}
|
|
}
|
|
});
|
|
});
|
|
if(columnList.length == indexV){
|
|
if($this) $this.closest('.foxui-select').find('.foxui-select-input').attr('data-id', model).attr('data-oldmodel', old_model).val($this.text().trim());
|
|
foxui.message({
|
|
type:'success',
|
|
text:"操作成功"
|
|
})
|
|
}else{
|
|
foxui.message({
|
|
type:'warning',
|
|
text:'操作失败'
|
|
})
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<script>
|
|
$('#collapseContainer').removeClass('loading-container');
|
|
//栏目设置
|
|
function tierSet(){
|
|
let columnId = $('input[name="id"]').val();
|
|
window.location.href = "<?php echo url('TierSet/index'); ?>?type=1&ts=1&columnId=" + columnId;
|
|
}
|
|
/**
|
|
* 获取栏目数据
|
|
* @param li 栏目项对象
|
|
* @returns {{column: (*|Window.jQuery|string), objArr: *[]}}
|
|
*/
|
|
function getColumn(li){
|
|
let headBox =$(li).children(".foxui-drag-content");
|
|
|
|
let name = $(headBox).children(".column").find("input").val();
|
|
let pic_id = $(headBox).children(".pic").find("img").attr("data-id");
|
|
let column_model = $(headBox).children(".model").find("input").attr('data-id');
|
|
let status = $(headBox).children(".state").find(".foxui-switch.is-checked").length;
|
|
|
|
let colunms = [];
|
|
let id = $(li).attr("data-id");
|
|
let sort = $(li).attr("data-sort");
|
|
$(li).children(".foxui-collapse-content").children("ul").children("li").each( (index, item)=>{
|
|
colunms.push(getColumn(item))
|
|
})
|
|
let colunm = {'colunms': colunms, 'name': name, 'column_model':column_model, 'pic_ids':pic_id, 'status': status, 'id':id, 'sort':sort};
|
|
return colunm;
|
|
}
|
|
|
|
//保存
|
|
$('#save').click(function() {
|
|
let dataArr = [];
|
|
$("#collapseContainer>li").each(function (index, item){
|
|
dataArr.push(getColumn(item));
|
|
});
|
|
|
|
let data = {'columns': JSON.stringify(dataArr)};
|
|
foxui.dialog({
|
|
title: '保存',
|
|
content: '您确定要保存吗',
|
|
cancelText: '取消',
|
|
confirmText: '保存',
|
|
confirm: function(callback) {
|
|
$('#collapseContainer').addClass('loading-container');
|
|
ajaxR("<?php echo url('save'); ?>","post",data,{},function (res) {
|
|
if (res.code == 1) {
|
|
setTimeout('myrefresh()', 100); //指定10秒刷新一次
|
|
} else {
|
|
foxui.message({
|
|
type:'warning',
|
|
text:res.msg
|
|
})
|
|
$('#collapseContainer').removeClass('loading-container');
|
|
}
|
|
}, function (res) {
|
|
foxui.message({
|
|
type:'warning',
|
|
text: res.responseJSON.msg
|
|
})
|
|
$('#collapseContainer').removeClass('loading-container');
|
|
})
|
|
callback();
|
|
},
|
|
cancel: function() {
|
|
foxui.message({
|
|
type: 'warning',
|
|
text: '取消操作'
|
|
})
|
|
foxui.closeLoading();
|
|
},
|
|
});
|
|
|
|
})
|
|
</script>
|
|
|
|
<script>
|
|
function copyLangColumn(obj) {
|
|
let lang = $(obj).attr('data-id');
|
|
let langtext = $(obj).text();
|
|
foxui.dialog({
|
|
title: '确认',
|
|
content: '您确定要复制'+langtext+'的栏目吗',
|
|
confirmText: '确定',
|
|
cancelText: '取消',
|
|
confirm: function (callback) {
|
|
$('#collapseContainer').addClass('loading-container');
|
|
ajaxR('copyLangColumn','post',{lang},{},function (res) {
|
|
if (res.code == 1) {
|
|
setTimeout('myrefresh()', 100); //指定10秒刷新一次
|
|
} else {
|
|
foxui.message({
|
|
type:'warning',
|
|
text:res.msg
|
|
})
|
|
$('#collapseContainer').removeClass('loading-container');
|
|
}
|
|
},
|
|
function (res) {
|
|
foxui.message({
|
|
type:'warning',
|
|
text: res.responseJSON.msg
|
|
})
|
|
$('#collapseContainer').removeClass('loading-container');
|
|
})
|
|
callback();
|
|
},
|
|
});
|
|
}
|
|
|
|
$(document).on('click', '.foxui-select.model ul.foxui-select-slide li', function () {
|
|
let $this = $(this);
|
|
let model = $(this).attr('data-id');
|
|
let data_rm = $(this).attr('data-rm');
|
|
let column_id = $(this).closest("li.foxui-collapse-item").attr('data-id');
|
|
let old_model = $(this).closest('div.foxui-select.model').find('input').attr("data-oldmodel");
|
|
if(model == old_model){
|
|
return;
|
|
}
|
|
foxui.dialog({
|
|
title: '栏目模型更换',
|
|
content: '模型间存在功能差异可能导致当前栏目中的数据丢失,您确定要更换模型吗?',
|
|
confirmText: '确定',
|
|
cancelText: '取消',
|
|
buttonType: 'danger',
|
|
confirm: function (callback) {
|
|
modelSwitch({model,data_rm, column_id, old_model, $this})
|
|
callback();
|
|
},
|
|
});
|
|
|
|
return false;
|
|
})
|
|
</script>
|
|
|
|
</html>
|