tp6更新到最新版本
目录结构调整
This commit is contained in:
@@ -17,9 +17,9 @@ use think\facade\Cache;
|
|||||||
class Admin extends BaseController {
|
class Admin extends BaseController {
|
||||||
|
|
||||||
protected $middleware = [
|
protected $middleware = [
|
||||||
'\app\middleware\Validate',
|
'\app\http\middleware\Validate',
|
||||||
'\app\middleware\AdminAuth' => ['except' => ['login']],
|
'\app\http\middleware\AdminAuth' => ['except' => ['login']],
|
||||||
'\app\middleware\Admin'
|
'\app\http\middleware\Admin'
|
||||||
];
|
];
|
||||||
|
|
||||||
protected $data = ['data' => [], 'code' => 0, 'msg' => ''];
|
protected $data = ['data' => [], 'code' => 0, 'msg' => ''];
|
||||||
@@ -33,17 +33,17 @@ class Admin extends BaseController {
|
|||||||
$this->data['config'] = $config;
|
$this->data['config'] = $config;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function success($msg, $url){
|
protected function success($msg, $url = ''){
|
||||||
$this->data['code'] = 0;
|
$this->data['code'] = 0;
|
||||||
$this->data['msg'] = $msg;
|
$this->data['msg'] = $msg;
|
||||||
$this->data['url'] = $url->__toString();
|
$this->data['url'] = $url->__toString();
|
||||||
return $this->data;
|
return $this->data;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function error($msg, $url){
|
protected function error($msg, $url = ''){
|
||||||
$this->data['code'] = 1;
|
$this->data['code'] = 1;
|
||||||
$this->data['msg'] = $msg;
|
$this->data['msg'] = $msg;
|
||||||
$this->data['url'] = $url->__toString();
|
$this->data['url'] = $url ? $url->__toString() : '';
|
||||||
return $this->data;
|
return $this->data;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ use app\BaseController;
|
|||||||
|
|
||||||
class Index extends BaseController {
|
class Index extends BaseController {
|
||||||
|
|
||||||
protected $middleware = ['\app\middleware\Front'];
|
protected $middleware = ['\app\http\middleware\Front'];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @title 网站首页
|
* @title 网站首页
|
||||||
|
|||||||
@@ -16,6 +16,17 @@ class Group extends Admin{
|
|||||||
* @title 系统首页
|
* @title 系统首页
|
||||||
*/
|
*/
|
||||||
public function index(){
|
public function index(){
|
||||||
|
if ($this->request->isAjax()) {
|
||||||
|
# code...
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @title 权限列表
|
||||||
|
*/
|
||||||
|
public function access(){
|
||||||
|
if ($this->request->isAjax()) {
|
||||||
|
# code...
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -69,6 +69,7 @@ class Index extends Admin{
|
|||||||
public function logout(){
|
public function logout(){
|
||||||
Session::set('user', null);
|
Session::set('user', null);
|
||||||
$this->data['code'] = 0;
|
$this->data['code'] = 0;
|
||||||
|
$this->data['msg'] = "成功退出!";
|
||||||
return $this->data;
|
return $this->data;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,8 +19,9 @@ class Menu extends Admin{
|
|||||||
public function index(){
|
public function index(){
|
||||||
if($this->request->isAjax()){
|
if($this->request->isAjax()){
|
||||||
$menu = new MenuModel();
|
$menu = new MenuModel();
|
||||||
|
$map = array();
|
||||||
|
|
||||||
$res = $menu->select();
|
$res = $menu->where($map)->order('sort asc, id asc')->select();
|
||||||
|
|
||||||
$this->data['data'] = $res;
|
$this->data['data'] = $res;
|
||||||
return $this->data;
|
return $this->data;
|
||||||
@@ -31,14 +32,28 @@ class Menu extends Admin{
|
|||||||
* @title 编辑菜单
|
* @title 编辑菜单
|
||||||
*/
|
*/
|
||||||
public function edit(){
|
public function edit(){
|
||||||
|
$menu = new MenuModel();
|
||||||
if($this->request->isAjax()){
|
if($this->request->isAjax()){
|
||||||
$menu = new MenuModel();
|
$data = $this->request->post();
|
||||||
|
|
||||||
$res = $menu->select();
|
$result = $menu->where('id', $data['id'])->save($data);
|
||||||
|
if (false !== $result) {
|
||||||
$this->data['data'] = $res;
|
$this->data['code'] = 0;
|
||||||
|
$this->data['msg'] = '更新成功!';
|
||||||
|
}else{
|
||||||
|
$this->data['code'] = 1;
|
||||||
|
$this->data['msg'] = '更新失败!';
|
||||||
|
}
|
||||||
return $this->data;
|
return $this->data;
|
||||||
}else{
|
}else{
|
||||||
|
$id = $this->request->param('id', 0);
|
||||||
|
|
||||||
|
if (!$id) {
|
||||||
|
return $this->error('非法操作!');
|
||||||
|
}
|
||||||
|
$info = $menu->where('id', $id)->find();
|
||||||
|
|
||||||
|
$this->data['data'] = array('info'=>$info);
|
||||||
return $this->data;
|
return $this->data;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -48,11 +63,6 @@ class Menu extends Admin{
|
|||||||
*/
|
*/
|
||||||
public function add(){
|
public function add(){
|
||||||
if($this->request->isAjax()){
|
if($this->request->isAjax()){
|
||||||
$menu = new MenuModel();
|
|
||||||
|
|
||||||
$res = $menu->select();
|
|
||||||
|
|
||||||
$this->data['data'] = $res;
|
|
||||||
return $this->data;
|
return $this->data;
|
||||||
}else{
|
}else{
|
||||||
$this->data['template'] = 'edit';
|
$this->data['template'] = 'edit';
|
||||||
@@ -65,11 +75,6 @@ class Menu extends Admin{
|
|||||||
*/
|
*/
|
||||||
public function remove(){
|
public function remove(){
|
||||||
if($this->request->isAjax()){
|
if($this->request->isAjax()){
|
||||||
$menu = new MenuModel();
|
|
||||||
|
|
||||||
$res = $menu->select();
|
|
||||||
|
|
||||||
$this->data['data'] = $res;
|
|
||||||
return $this->data;
|
return $this->data;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
// +----------------------------------------------------------------------
|
// +----------------------------------------------------------------------
|
||||||
// | Author: molong <molong@tensent.cn> <http://www.tensent.cn>
|
// | Author: molong <molong@tensent.cn> <http://www.tensent.cn>
|
||||||
// +----------------------------------------------------------------------
|
// +----------------------------------------------------------------------
|
||||||
namespace app\middleware;
|
namespace app\http\middleware;
|
||||||
|
|
||||||
use think\facade\View;
|
use think\facade\View;
|
||||||
|
|
||||||
@@ -19,6 +19,7 @@ class Admin {
|
|||||||
|
|
||||||
public function handle($request, \Closure $next) {
|
public function handle($request, \Closure $next) {
|
||||||
$response = $next($request);
|
$response = $next($request);
|
||||||
|
|
||||||
if (is_array($response->getData())) {
|
if (is_array($response->getData())) {
|
||||||
$this->data = array_merge($this->data, $response->getData());
|
$this->data = array_merge($this->data, $response->getData());
|
||||||
} else {
|
} else {
|
||||||
@@ -52,10 +53,10 @@ class Admin {
|
|||||||
|
|
||||||
$template = (isset($this->data['template']) && $this->data['template']) ? $this->data['template'] : $template;
|
$template = (isset($this->data['template']) && $this->data['template']) ? $this->data['template'] : $template;
|
||||||
|
|
||||||
return View::config($config)
|
View::config($config);
|
||||||
->assign('sent_version', sent_version)
|
View::assign('sent_version', sent_version);
|
||||||
->assign('config', (isset($this->data['config']) ? $this->data['config'] : []))
|
View::assign('config', (isset($this->data['config']) ? $this->data['config'] : []));
|
||||||
->assign((isset($this->data['data']) ? $this->data['data'] : []))
|
View::assign((isset($this->data['data']) ? $this->data['data'] : []));
|
||||||
->fetch($template);
|
return View::fetch($template);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -6,7 +6,7 @@
|
|||||||
// +----------------------------------------------------------------------
|
// +----------------------------------------------------------------------
|
||||||
// | Author: molong <molong@tensent.cn> <http://www.tensent.cn>
|
// | Author: molong <molong@tensent.cn> <http://www.tensent.cn>
|
||||||
// +----------------------------------------------------------------------
|
// +----------------------------------------------------------------------
|
||||||
namespace app\middleware;
|
namespace app\http\middleware;
|
||||||
|
|
||||||
use think\facade\Cache;
|
use think\facade\Cache;
|
||||||
use think\facade\Session;
|
use think\facade\Session;
|
||||||
@@ -6,7 +6,7 @@
|
|||||||
// +----------------------------------------------------------------------
|
// +----------------------------------------------------------------------
|
||||||
// | Author: molong <molong@tensent.cn> <http://www.tensent.cn>
|
// | Author: molong <molong@tensent.cn> <http://www.tensent.cn>
|
||||||
// +----------------------------------------------------------------------
|
// +----------------------------------------------------------------------
|
||||||
namespace app\middleware;
|
namespace app\http\middleware;
|
||||||
|
|
||||||
use think\facade\View;
|
use think\facade\View;
|
||||||
|
|
||||||
@@ -36,15 +36,17 @@ class Front {
|
|||||||
$config = array(
|
$config = array(
|
||||||
'tpl_replace_string' => array(
|
'tpl_replace_string' => array(
|
||||||
'__static__' => '/static',
|
'__static__' => '/static',
|
||||||
'__img__' => '/static/admin/images',
|
'__img__' => '/static/front/images',
|
||||||
'__css__' => '/static/admin/css',
|
'__css__' => '/static/front/css',
|
||||||
'__js__' => '/static/admin/js',
|
'__js__' => '/static/front/js',
|
||||||
'__public__' => '/static/admin',
|
'__public__' => '/static/front',
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
if (is_string($this->data)) {
|
if (is_string($this->data)) {
|
||||||
$this->data = array('data' => $this->data);
|
$this->data = array('data' => $this->data);
|
||||||
}
|
}
|
||||||
return View::config($config)->assign($this->data)->fetch($template);
|
View::config($config);
|
||||||
|
View::assign($this->data);
|
||||||
|
return View::engine('Think')->fetch($template);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -7,7 +7,7 @@
|
|||||||
// | Author: molong <molong@tensent.cn> <http://www.tensent.cn>
|
// | Author: molong <molong@tensent.cn> <http://www.tensent.cn>
|
||||||
// +----------------------------------------------------------------------
|
// +----------------------------------------------------------------------
|
||||||
|
|
||||||
namespace app\middleware;
|
namespace app\http\middleware;
|
||||||
use think\Response;
|
use think\Response;
|
||||||
|
|
||||||
class Validate {
|
class Validate {
|
||||||
@@ -24,7 +24,7 @@ class Validate {
|
|||||||
$controller = strtr(strtolower($request->controller()), '.', '\\');
|
$controller = strtr(strtolower($request->controller()), '.', '\\');
|
||||||
//获取操作名,用于验证场景scene
|
//获取操作名,用于验证场景scene
|
||||||
$scene = $request->action();
|
$scene = $request->action();
|
||||||
$validate = "app\\validate\\" . $controller;
|
$validate = "app\\http\\validate\\" . $controller;
|
||||||
//仅当验证器存在时 进行校验
|
//仅当验证器存在时 进行校验
|
||||||
if (class_exists($validate) && $request->isPost()) {
|
if (class_exists($validate) && $request->isPost()) {
|
||||||
$v = new $validate;
|
$v = new $validate;
|
||||||
@@ -7,7 +7,7 @@
|
|||||||
// | Author: molong <molong@tensent.cn> <http://www.tensent.cn>
|
// | Author: molong <molong@tensent.cn> <http://www.tensent.cn>
|
||||||
// +----------------------------------------------------------------------
|
// +----------------------------------------------------------------------
|
||||||
|
|
||||||
namespace app\validate\admin;
|
namespace app\http\validate\admin;
|
||||||
|
|
||||||
use think\Validate;
|
use think\Validate;
|
||||||
|
|
||||||
8
config/middleware.php
Normal file
8
config/middleware.php
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
<?php
|
||||||
|
//中间件配置
|
||||||
|
return [
|
||||||
|
//别名或分组
|
||||||
|
'alias' => [],
|
||||||
|
//优先级设置,此数组中的中间件会按照数组中的顺序优先执行
|
||||||
|
'priority' => [],
|
||||||
|
];
|
||||||
@@ -5,13 +5,15 @@
|
|||||||
|
|
||||||
return [
|
return [
|
||||||
// session name
|
// session name
|
||||||
'name' => '',
|
'name' => 'PHPSESSID',
|
||||||
// SESSION_ID的提交变量,解决flash上传跨域
|
// SESSION_ID的提交变量,解决flash上传跨域
|
||||||
'var_session_id' => '',
|
'var_session_id' => '',
|
||||||
// 驱动方式 支持file redis memcache memcached
|
// 驱动方式 支持file cache
|
||||||
'type' => 'file',
|
'type' => 'file',
|
||||||
|
// 存储连接标识 当type使用cache的时候有效
|
||||||
|
'store' => null,
|
||||||
// 过期时间
|
// 过期时间
|
||||||
'expire' => 0,
|
'expire' => 1440,
|
||||||
// 前缀
|
// 前缀
|
||||||
'prefix' => '',
|
'prefix' => '',
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -5,23 +5,23 @@
|
|||||||
|
|
||||||
return [
|
return [
|
||||||
// 模板引擎类型使用Think
|
// 模板引擎类型使用Think
|
||||||
'type' => 'Think',
|
'type' => 'Think',
|
||||||
// 默认模板渲染规则 1 解析为小写+下划线 2 全部转换小写 3 保持操作方法
|
// 默认模板渲染规则 1 解析为小写+下划线 2 全部转换小写 3 保持操作方法
|
||||||
'auto_rule' => 1,
|
'auto_rule' => 1,
|
||||||
// 模板基础路径
|
// 模板目录名
|
||||||
'view_base' => '',
|
'view_dir_name' => 'view',
|
||||||
// 模板路径
|
// 模板路径
|
||||||
'view_path' => '',
|
'view_path' => '',
|
||||||
// 模板后缀
|
// 模板后缀
|
||||||
'view_suffix' => 'html',
|
'view_suffix' => 'html',
|
||||||
// 模板文件名分隔符
|
// 模板文件名分隔符
|
||||||
'view_depr' => DIRECTORY_SEPARATOR,
|
'view_depr' => DIRECTORY_SEPARATOR,
|
||||||
// 模板引擎普通标签开始标记
|
// 模板引擎普通标签开始标记
|
||||||
'tpl_begin' => '{',
|
'tpl_begin' => '{',
|
||||||
// 模板引擎普通标签结束标记
|
// 模板引擎普通标签结束标记
|
||||||
'tpl_end' => '}',
|
'tpl_end' => '}',
|
||||||
// 标签库标签开始标记
|
// 标签库标签开始标记
|
||||||
'taglib_begin' => '{',
|
'taglib_begin' => '{',
|
||||||
// 标签库标签结束标记
|
// 标签库标签结束标记
|
||||||
'taglib_end' => '}',
|
'taglib_end' => '}',
|
||||||
];
|
];
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 9.4 KiB |
@@ -0,0 +1,14 @@
|
|||||||
|
$(function(){
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
function submitHandler(index, layero){
|
||||||
|
var url = '';
|
||||||
|
var data = {};
|
||||||
|
$.each($('form').serializeArray(), function(i, field) {
|
||||||
|
data[field.name] = field.value;
|
||||||
|
});
|
||||||
|
$.operate.submit(url, 'post', 'json', data, function(){
|
||||||
|
layer.close(index);
|
||||||
|
});
|
||||||
|
}
|
||||||
@@ -220,7 +220,9 @@ $(function () {
|
|||||||
$.page.createMenuItem($(this).attr('href'), $(this).html());
|
$.page.createMenuItem($(this).attr('href'), $(this).html());
|
||||||
}else if(type == 'open'){
|
}else if(type == 'open'){
|
||||||
$.model.open($(this).text(), $(this).attr('href'));
|
$.model.open($(this).text(), $(this).attr('href'));
|
||||||
}else if(type == 'msg'){}
|
}else if(type == 'msg'){
|
||||||
|
$.operate.get($(this).attr('href'))
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
$('span[data-action=scroll]').click(function(e){
|
$('span[data-action=scroll]').click(function(e){
|
||||||
@@ -249,4 +251,8 @@ $(function () {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (self != top) {
|
||||||
|
parent.location.reload();
|
||||||
|
}
|
||||||
})
|
})
|
||||||
@@ -566,7 +566,7 @@
|
|||||||
},
|
},
|
||||||
// 成功提示
|
// 成功提示
|
||||||
alertSuccess: function(content) {
|
alertSuccess: function(content) {
|
||||||
$.model.alert(content, modal_status.SUCCESS);
|
layer.msg(content);
|
||||||
},
|
},
|
||||||
// 警告提示
|
// 警告提示
|
||||||
alertWarning: function(content) {
|
alertWarning: function(content) {
|
||||||
@@ -1484,6 +1484,20 @@ $(function() {
|
|||||||
}
|
}
|
||||||
expandFlag = expandFlag ? false: true;
|
expandFlag = expandFlag ? false: true;
|
||||||
})
|
})
|
||||||
|
|
||||||
|
$('button.ajax-post,.ajax-get').click(function(e){
|
||||||
|
e.preventDefault();
|
||||||
|
var type = 'post',url = '';
|
||||||
|
if ($(this).hasClass('ajax-get')) {
|
||||||
|
type = 'get'
|
||||||
|
}
|
||||||
|
var data = {};
|
||||||
|
$.each($($(this).attr('target-form')).serializeArray(), function(i, field) {
|
||||||
|
data[field.name] = field.value;
|
||||||
|
});
|
||||||
|
$.operate.submit(url, type, 'json', data);
|
||||||
|
});
|
||||||
|
|
||||||
// 按下ESC按钮关闭弹层
|
// 按下ESC按钮关闭弹层
|
||||||
$('body', document).on('keyup', function(e) {
|
$('body', document).on('keyup', function(e) {
|
||||||
if (e.which === 27) {
|
if (e.which === 27) {
|
||||||
@@ -1503,7 +1517,7 @@ table_type = {
|
|||||||
/** 消息状态码 */
|
/** 消息状态码 */
|
||||||
web_status = {
|
web_status = {
|
||||||
SUCCESS: 0,
|
SUCCESS: 0,
|
||||||
FAIL: 500,
|
FAIL: 1,
|
||||||
WARNING: 301
|
WARNING: 301
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -1544,10 +1558,10 @@ $.ajaxSetup({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
layer.config({
|
// layer.config({
|
||||||
extend: 'moon/style.css',
|
// extend: 'moon/style.css',
|
||||||
skin: 'layer-ext-moon'
|
// skin: 'layer-ext-moon'
|
||||||
});
|
// });
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get a prestored setting
|
* Get a prestored setting
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 7.4 KiB |
@@ -1,138 +0,0 @@
|
|||||||
/**
|
|
||||||
* layer皮肤
|
|
||||||
* Copyright (c) 2019 ruoyi
|
|
||||||
*/
|
|
||||||
html #layui_layer_skinmoonstylecss {
|
|
||||||
display: none;
|
|
||||||
position: absolute;
|
|
||||||
width: 1989px;
|
|
||||||
}
|
|
||||||
|
|
||||||
body .layer-ext-moon[type="dialog"] {
|
|
||||||
min-width: 320px;
|
|
||||||
}
|
|
||||||
body .layer-ext-moon-msg[type="dialog"]{min-width:200px;}
|
|
||||||
body .layer-ext-moon .layui-layer-title {
|
|
||||||
background: #F8F8F8;
|
|
||||||
color: #333;
|
|
||||||
font-size: 14px;
|
|
||||||
height: 42px;
|
|
||||||
line-height: 42px;
|
|
||||||
border: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
body .layer-ext-moon .layui-layer-content .layui-layer-ico {
|
|
||||||
height: 32px;
|
|
||||||
width: 32px;
|
|
||||||
top:18.5px;
|
|
||||||
}
|
|
||||||
body .layer-ext-moon .layui-layer-ico0 {
|
|
||||||
background: url(default.png) no-repeat -96px 0;
|
|
||||||
;
|
|
||||||
}
|
|
||||||
body .layer-ext-moon .layui-layer-ico1 {
|
|
||||||
background: url(default.png) no-repeat -224px 0;
|
|
||||||
;
|
|
||||||
}
|
|
||||||
body .layer-ext-moon .layui-layer-ico2 {
|
|
||||||
background: url(default.png) no-repeat -192px 0;
|
|
||||||
}
|
|
||||||
body .layer-ext-moon .layui-layer-ico3 {
|
|
||||||
background: url(default.png) no-repeat -160px 0;
|
|
||||||
}
|
|
||||||
body .layer-ext-moon .layui-layer-ico4 {
|
|
||||||
background: url(default.png) no-repeat -320px 0;
|
|
||||||
}
|
|
||||||
body .layer-ext-moon .layui-layer-ico5 {
|
|
||||||
background: url(default.png) no-repeat -288px 0;
|
|
||||||
}
|
|
||||||
body .layer-ext-moon .layui-layer-ico6 {
|
|
||||||
background: url(default.png) -256px 0;
|
|
||||||
}
|
|
||||||
body .layer-ext-moon .layui-layer-ico7 {
|
|
||||||
background: url(default.png) no-repeat -128px 0;
|
|
||||||
}
|
|
||||||
body .layer-ext-moon .layui-layer-setwin {
|
|
||||||
top: 15px;
|
|
||||||
right: 15px;
|
|
||||||
}
|
|
||||||
body .layer-ext-moon .layui-layer-setwin a {
|
|
||||||
width: 16px;
|
|
||||||
height: 16px;
|
|
||||||
}
|
|
||||||
body .layer-ext-moon .layui-layer-setwin .layui-layer-min cite:hover {
|
|
||||||
background-color: #56abe4;
|
|
||||||
}
|
|
||||||
body .layer-ext-moon .layui-layer-setwin .layui-layer-max {
|
|
||||||
background: url(default.png) no-repeat -80px 0;
|
|
||||||
}
|
|
||||||
body .layer-ext-moon .layui-layer-setwin .layui-layer-max:hover {
|
|
||||||
background: url(default.png) no-repeat -64px 0;
|
|
||||||
}
|
|
||||||
body .layer-ext-moon .layui-layer-setwin .layui-layer-maxmin {
|
|
||||||
background: url(default.png) no-repeat -32px 0;
|
|
||||||
}
|
|
||||||
body .layer-ext-moon .layui-layer-setwin .layui-layer-maxmin:hover {
|
|
||||||
background: url(default.png) no-repeat -16px 0;
|
|
||||||
}
|
|
||||||
body .layer-ext-moon .layui-layer-setwin .layui-layer-close1,body .layer-ext-moon .layui-layer-setwin .layui-layer-close2 {
|
|
||||||
background: url(default.png) 0 0;
|
|
||||||
}
|
|
||||||
body .layer-ext-moon .layui-layer-setwin .layui-layer-close1:hover,body .layer-ext-moon .layui-layer-setwin .layui-layer-close2:hover {
|
|
||||||
background: url(default.png) -48px 0;
|
|
||||||
}
|
|
||||||
body .layer-ext-moon .layui-layer-padding{padding-top: 24px;}
|
|
||||||
body .layer-ext-moon .layui-layer-btn {
|
|
||||||
text-align: right;
|
|
||||||
padding: 10px 15px 12px;
|
|
||||||
background: #f0f4f7;
|
|
||||||
border-top: 1px #c7c7c7 solid;
|
|
||||||
}
|
|
||||||
body .layer-ext-moon .layui-layer-btn a {
|
|
||||||
font-size: 12px;
|
|
||||||
font-weight: normal;
|
|
||||||
margin: 0 3px;
|
|
||||||
margin-right: 7px;
|
|
||||||
margin-left: 7px;
|
|
||||||
padding: 0 15px;
|
|
||||||
color: #fff;
|
|
||||||
border: 1px solid #0064b6;
|
|
||||||
background: #0071ce;
|
|
||||||
border-radius: 3px;
|
|
||||||
display: inline-block;
|
|
||||||
height: 30px;
|
|
||||||
line-height: 30px;
|
|
||||||
text-align: center;
|
|
||||||
vertical-align: middle;
|
|
||||||
background-repeat: no-repeat;
|
|
||||||
text-decoration: none;
|
|
||||||
outline: none;
|
|
||||||
-moz-box-sizing: content-box;
|
|
||||||
-webkit-box-sizing: content-box;
|
|
||||||
box-sizing: content-box;
|
|
||||||
}
|
|
||||||
body .layer-ext-moon .layui-layer-btn .layui-layer-btn0 {
|
|
||||||
background: #0071ce;
|
|
||||||
}
|
|
||||||
body .layer-ext-moon .layui-layer-btn .layui-layer-btn1 {
|
|
||||||
background: #fff;
|
|
||||||
color: #404a58;
|
|
||||||
border: 1px solid #c0c4cd;
|
|
||||||
border-radius: 3px;
|
|
||||||
}
|
|
||||||
body .layer-ext-moon .layui-layer-btn .layui-layer-btn2 {
|
|
||||||
background: #f60;
|
|
||||||
color: #fff;
|
|
||||||
border: 1px solid #f60;
|
|
||||||
border-radius: 3px;
|
|
||||||
}
|
|
||||||
body .layer-ext-moon .layui-layer-btn .layui-layer-btn3 {
|
|
||||||
background: #f00;
|
|
||||||
color: #fff;
|
|
||||||
border: 1px solid #f00;
|
|
||||||
border-radius: 3px;
|
|
||||||
}
|
|
||||||
|
|
||||||
body .layer-ext-moon .layui-layer-title span.layui-layer-tabnow{
|
|
||||||
height:47px;
|
|
||||||
}
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
如果不使用模板,可以删除该目录
|
|
||||||
@@ -1,78 +1,87 @@
|
|||||||
{extend name="admin/base"/}
|
{extend name="admin/base"/}
|
||||||
{block name="style"}
|
|
||||||
<link rel="stylesheet" type="text/css" href="__PUBLIC__/css/libs/bootstrap-editable.css">
|
|
||||||
{/block}
|
|
||||||
{block name="body"}
|
{block name="body"}
|
||||||
<div class="box box-primary">
|
<div class="box box-primary">
|
||||||
<header class="box-header with-border">
|
<header class="box-header with-border">
|
||||||
<h3 class="box-title">{$meta_title|default='新功能'}</h3>
|
<h3 class="box-title">{$meta_title|default='新功能'}</h3>
|
||||||
<div class="pull-right">
|
<div class="pull-right">
|
||||||
<a class="btn btn-primary" href="{:url('add')}">新 增</a>
|
|
||||||
<button class="btn btn-danger ajax-post confirm" url="{:url('del')}" target-form="ids">删 除</button>
|
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
<div class="box-body">
|
<div class="box-body">
|
||||||
<div class="table-responsive clearfix">
|
|
||||||
<table class="table table-hover">
|
<div class="btn-group-sm" id="toolbar" role="group">
|
||||||
<thead>
|
<a class="btn btn-success" onclick="$.operate.add()">
|
||||||
<tr>
|
<i class="fa fa-plus"></i> 新增
|
||||||
<th width="30"><input class="checkbox check-all" type="checkbox"></th>
|
</a>
|
||||||
<th width="60">ID</th>
|
<a class="btn btn-primary single disabled" onclick="$.operate.edit()">
|
||||||
<th width="180">名称</th>
|
<i class="fa fa-edit"></i> 修改
|
||||||
<th width="140">标识</th>
|
</a>
|
||||||
<th width="180">创建时间</th>
|
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()">
|
||||||
<th width="180">更新时间</th>
|
<i class="fa fa-remove"></i> 删除
|
||||||
<th>操作</th>
|
</a>
|
||||||
</tr>
|
</div>
|
||||||
</thead>
|
|
||||||
<tbody>
|
<div class="table-striped">
|
||||||
{volist name="list" id="item"}
|
<table id="bootstrap-table" data-mobile-responsive="true"></table>
|
||||||
<tr>
|
|
||||||
<td><input class="ids row-selected" type="checkbox" name="id[]" value="{$item['id']}"></td>
|
|
||||||
<td>{$item['id']}</td>
|
|
||||||
<td>{$item['title']}</td>
|
|
||||||
<td>{$item['name']}</td>
|
|
||||||
<td>{$item['create_time']|date='Y-m-d H:i',###}</td>
|
|
||||||
<td>{$item['update_time']|date='Y-m-d H:i',###}</td>
|
|
||||||
<td>
|
|
||||||
<a title="广告列表" href="{:url('lists?id='.$item['id'])}">广告列表</a>
|
|
||||||
<a title="移动" href="{:url('edit?id='.$item['id'])}">编辑</a>
|
|
||||||
<a title="删除" href="{:url('del?id='.$item['id'])}" class="confirm ajax-get">删除</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
{/volist}
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
{$page|raw}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{/block}
|
{/block}
|
||||||
{block name="script"}
|
{block name="script"}
|
||||||
<script type="text/javascript" src="__PUBLIC__/js/bootstrap-editable.min.js"></script>
|
<!-- bootstrap-table 表格插件 -->
|
||||||
<script type="text/javascript">
|
<script src="__static__/plugins/bootstrap-table/bootstrap-table.min.js"></script>
|
||||||
$(function() {
|
<script src="__static__/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.min.js"></script>
|
||||||
//点击排序
|
<script src="__static__/plugins/bootstrap-table/extensions/mobile/bootstrap-table-mobile.js"></script>
|
||||||
$('.item_sort').click(function(){
|
<script src="__static__/plugins/bootstrap-table/extensions/toolbar/bootstrap-table-toolbar.min.js"></script>
|
||||||
var url = $(this).attr('url');
|
<script src="__static__/plugins/bootstrap-table/extensions/columns/bootstrap-table-fixed-columns.js"></script>
|
||||||
var ids = $('.ids:checked');
|
|
||||||
var param = '';
|
|
||||||
if(ids.length > 0){
|
|
||||||
var str = new Array();
|
|
||||||
ids.each(function(){
|
|
||||||
str.push($(this).val());
|
|
||||||
});
|
|
||||||
param = str.join(',');
|
|
||||||
}
|
|
||||||
|
|
||||||
if(url != undefined && url != ''){
|
<script type="text/javascript">
|
||||||
window.location.href = url + '/ids/' + param;
|
$(function(){
|
||||||
}
|
var editFlag = "";
|
||||||
|
var removeFlag = "";
|
||||||
|
var resetPwdFlag = "";
|
||||||
|
|
||||||
|
$.table.init({
|
||||||
|
url: "/admin/client/index",
|
||||||
|
createUrl: "/admin/client/add",
|
||||||
|
updateUrl: "/admin/client/edit/id/{id}",
|
||||||
|
removeUrl: "/admin/client/remove",
|
||||||
|
sortName: "id",
|
||||||
|
sortOrder: "desc",
|
||||||
|
modalName: "客户端",
|
||||||
|
columns: [
|
||||||
|
{
|
||||||
|
checkbox: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'title',
|
||||||
|
title: '客户端名称'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'appid',
|
||||||
|
title: 'APPID'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'appsecret',
|
||||||
|
title: 'APP秘钥'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'create_time',
|
||||||
|
title: '创建时间',
|
||||||
|
sortable: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '操作',
|
||||||
|
align: 'center',
|
||||||
|
formatter: function(value, row, index) {
|
||||||
|
var actions = [];
|
||||||
|
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
|
||||||
|
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a> ');
|
||||||
|
return actions.join('');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
});
|
});
|
||||||
$.fn.editable.defaults.mode = 'popup';
|
})
|
||||||
$.fn.editableform.buttons = '<button type="submit" class="btn btn-success editable-submit btn-mini"><i class="fa fa-check-square-o fa-white"></i></button>' +
|
|
||||||
'<button type="button" class="btn editable-cancel btn-mini"><i class="fa fa-times"></i></button>';
|
|
||||||
$('.editable').editable();
|
|
||||||
});
|
|
||||||
</script>
|
</script>
|
||||||
{/block}
|
{/block}
|
||||||
@@ -1,75 +1,87 @@
|
|||||||
{extend name="admin/base"/}
|
{extend name="admin/base"/}
|
||||||
{block name="style"}
|
|
||||||
<link rel="stylesheet" type="text/css" href="__PUBLIC__/css/libs/bootstrap-editable.css">
|
|
||||||
{/block}
|
|
||||||
{block name="body"}
|
{block name="body"}
|
||||||
<div class="box box-primary">
|
<div class="box box-primary">
|
||||||
<header class="box-header with-border">
|
<header class="box-header with-border">
|
||||||
<h3 class="box-title">{$meta_title|default='新功能'}</h3>
|
<h3 class="box-title">{$meta_title|default='新功能'}</h3>
|
||||||
<div class="pull-right">
|
<div class="pull-right">
|
||||||
<a class="btn btn-primary" href="{:url('addhook')}">新 增</a>
|
|
||||||
<button class="btn btn-danger ajax-post confirm" url="{:url('delhook')}" target-form="ids">删 除</button>
|
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
<div class="box-body">
|
<div class="box-body">
|
||||||
<div class="table-responsive clearfix">
|
|
||||||
<table class="table table-hover">
|
<div class="btn-group-sm" id="toolbar" role="group">
|
||||||
<thead>
|
<a class="btn btn-success" onclick="$.operate.add()">
|
||||||
<tr>
|
<i class="fa fa-plus"></i> 新增
|
||||||
<th><input class="checkbox check-all" type="checkbox"></th>
|
</a>
|
||||||
<th>ID</th>
|
<a class="btn btn-primary single disabled" onclick="$.operate.edit()">
|
||||||
<th>名称</th>
|
<i class="fa fa-edit"></i> 修改
|
||||||
<th>描述</th>
|
</a>
|
||||||
<th>类型</th>
|
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()">
|
||||||
<th>操作</th>
|
<i class="fa fa-remove"></i> 删除
|
||||||
</tr>
|
</a>
|
||||||
</thead>
|
</div>
|
||||||
<tbody>
|
|
||||||
{volist name="list" id="item"}
|
<div class="table-striped">
|
||||||
<tr>
|
<table id="bootstrap-table" data-mobile-responsive="true"></table>
|
||||||
<td><input class="ids row-selected" type="checkbox" name="ids[]" value="{$item['id']}"></td>
|
|
||||||
<td>{$item['id']|default=0}</td>
|
|
||||||
<td>{$item['name']}</td>
|
|
||||||
<td>{$item['description']}</td>
|
|
||||||
<td>{$item['type_text']}</td>
|
|
||||||
<td>
|
|
||||||
<a href="{:url('edithook?id='.$item['id'])}">编辑</a>
|
|
||||||
<a href="{:url('delhook?id='.$item['id'])}" class="confirm ajax-get">删除</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
{/volist}
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
{$page|raw}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{/block}
|
{/block}
|
||||||
{block name="script"}
|
{block name="script"}
|
||||||
<script type="text/javascript" src="__PUBLIC__/js/bootstrap-editable.min.js"></script>
|
<!-- bootstrap-table 表格插件 -->
|
||||||
<script type="text/javascript">
|
<script src="__static__/plugins/bootstrap-table/bootstrap-table.min.js"></script>
|
||||||
$(function() {
|
<script src="__static__/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.min.js"></script>
|
||||||
//点击排序
|
<script src="__static__/plugins/bootstrap-table/extensions/mobile/bootstrap-table-mobile.js"></script>
|
||||||
$('.item_sort').click(function(){
|
<script src="__static__/plugins/bootstrap-table/extensions/toolbar/bootstrap-table-toolbar.min.js"></script>
|
||||||
var url = $(this).attr('url');
|
<script src="__static__/plugins/bootstrap-table/extensions/columns/bootstrap-table-fixed-columns.js"></script>
|
||||||
var ids = $('.ids:checked');
|
|
||||||
var param = '';
|
|
||||||
if(ids.length > 0){
|
|
||||||
var str = new Array();
|
|
||||||
ids.each(function(){
|
|
||||||
str.push($(this).val());
|
|
||||||
});
|
|
||||||
param = str.join(',');
|
|
||||||
}
|
|
||||||
|
|
||||||
if(url != undefined && url != ''){
|
<script type="text/javascript">
|
||||||
window.location.href = url + '/ids/' + param;
|
$(function(){
|
||||||
}
|
var editFlag = "";
|
||||||
|
var removeFlag = "";
|
||||||
|
var resetPwdFlag = "";
|
||||||
|
|
||||||
|
$.table.init({
|
||||||
|
url: "/admin/client/index",
|
||||||
|
createUrl: "/admin/client/add",
|
||||||
|
updateUrl: "/admin/client/edit/id/{id}",
|
||||||
|
removeUrl: "/admin/client/remove",
|
||||||
|
sortName: "id",
|
||||||
|
sortOrder: "desc",
|
||||||
|
modalName: "客户端",
|
||||||
|
columns: [
|
||||||
|
{
|
||||||
|
checkbox: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'title',
|
||||||
|
title: '客户端名称'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'appid',
|
||||||
|
title: 'APPID'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'appsecret',
|
||||||
|
title: 'APP秘钥'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'create_time',
|
||||||
|
title: '创建时间',
|
||||||
|
sortable: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '操作',
|
||||||
|
align: 'center',
|
||||||
|
formatter: function(value, row, index) {
|
||||||
|
var actions = [];
|
||||||
|
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
|
||||||
|
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a> ');
|
||||||
|
return actions.join('');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
});
|
});
|
||||||
$.fn.editable.defaults.mode = 'popup';
|
})
|
||||||
$.fn.editableform.buttons = '<button type="submit" class="btn btn-success editable-submit btn-mini"><i class="fa fa-check-square-o fa-white"></i></button>' +
|
|
||||||
'<button type="button" class="btn editable-cancel btn-mini"><i class="fa fa-times"></i></button>';
|
|
||||||
$('.editable').editable();
|
|
||||||
});
|
|
||||||
</script>
|
</script>
|
||||||
{/block}
|
{/block}
|
||||||
@@ -1,91 +1,87 @@
|
|||||||
{extend name="admin/base"/}
|
{extend name="admin/base"/}
|
||||||
{block name="style"}
|
|
||||||
<link rel="stylesheet" type="text/css" href="__PUBLIC__/css/libs/bootstrap-editable.css">
|
|
||||||
{/block}
|
|
||||||
{block name="body"}
|
{block name="body"}
|
||||||
<div class="box box-primary">
|
<div class="box box-primary">
|
||||||
<header class="box-header with-border">
|
<header class="box-header with-border">
|
||||||
<h3 class="box-title">{$meta_title|default='新功能'}</h3>
|
<h3 class="box-title">{$meta_title|default='新功能'}</h3>
|
||||||
<div class="pull-right">
|
<div class="pull-right">
|
||||||
<a class="btn btn-info" href="{:url('index?refresh=1')}">更 新</a>
|
|
||||||
<a class="btn btn-primary" href="{:url('add')}">新 增</a>
|
|
||||||
<button class="btn btn-danger ajax-post confirm" url="{:url('del')}" target-form="ids">删 除</button>
|
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
<div class="box-body">
|
<div class="box-body">
|
||||||
<div class="table-responsive clearfix">
|
|
||||||
<table class="table table-hover">
|
<div class="btn-group-sm" id="toolbar" role="group">
|
||||||
<thead>
|
<a class="btn btn-success" onclick="$.operate.add()">
|
||||||
<tr>
|
<i class="fa fa-plus"></i> 新增
|
||||||
<th><input class="checkbox check-all" type="checkbox"></th>
|
</a>
|
||||||
<th>ID</th>
|
<a class="btn btn-primary single disabled" onclick="$.operate.edit()">
|
||||||
<th>名称</th>
|
<i class="fa fa-edit"></i> 修改
|
||||||
<th>标识</th>
|
</a>
|
||||||
<th>描述</th>
|
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()">
|
||||||
<th>状态</th>
|
<i class="fa fa-remove"></i> 删除
|
||||||
<th>作者</th>
|
</a>
|
||||||
<th>版本</th>
|
</div>
|
||||||
<th>操作</th>
|
|
||||||
</tr>
|
<div class="table-striped">
|
||||||
</thead>
|
<table id="bootstrap-table" data-mobile-responsive="true"></table>
|
||||||
<tbody>
|
|
||||||
{volist name="list" id="item"}
|
|
||||||
<tr>
|
|
||||||
<td><input class="ids row-selected" type="checkbox" name="id[]" value="{$item['id']}"></td>
|
|
||||||
<td>{$item['id']|default=0}</td>
|
|
||||||
<td>{$item['title']}</td>
|
|
||||||
<td>{$item['name']}</td>
|
|
||||||
<td>{$item['description']}</td>
|
|
||||||
<td>{$item['status_text']}</td>
|
|
||||||
<td>{$item['author']}</td>
|
|
||||||
<td>{$item['version']}</td>
|
|
||||||
<td>
|
|
||||||
{if !$item['isinstall']}
|
|
||||||
<a href="{:url('install?addon_name='.$item['name'])}" class="ajax-get">安装</a>
|
|
||||||
{else/}
|
|
||||||
<a href="{:url('uninstall?id='.$item['id'])}" class="confirm ajax-get">卸载</a>
|
|
||||||
{if $item['status']}
|
|
||||||
<a href="{:url('disable?id='.$item['id'])}" class="confirm ajax-get">禁用</a>
|
|
||||||
{else/}
|
|
||||||
<a href="{:url('enable?id='.$item['id'])}" class="confirm ajax-get">启用</a>
|
|
||||||
{/if}
|
|
||||||
<a href="{:url('config?id='.$item['id'])}">设置</a>
|
|
||||||
{/if}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
{/volist}
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
{$page|raw}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{/block}
|
{/block}
|
||||||
{block name="script"}
|
{block name="script"}
|
||||||
<script type="text/javascript" src="__PUBLIC__/js/bootstrap-editable.min.js"></script>
|
<!-- bootstrap-table 表格插件 -->
|
||||||
<script type="text/javascript">
|
<script src="__static__/plugins/bootstrap-table/bootstrap-table.min.js"></script>
|
||||||
$(function() {
|
<script src="__static__/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.min.js"></script>
|
||||||
//点击排序
|
<script src="__static__/plugins/bootstrap-table/extensions/mobile/bootstrap-table-mobile.js"></script>
|
||||||
$('.item_sort').click(function(){
|
<script src="__static__/plugins/bootstrap-table/extensions/toolbar/bootstrap-table-toolbar.min.js"></script>
|
||||||
var url = $(this).attr('url');
|
<script src="__static__/plugins/bootstrap-table/extensions/columns/bootstrap-table-fixed-columns.js"></script>
|
||||||
var ids = $('.ids:checked');
|
|
||||||
var param = '';
|
|
||||||
if(ids.length > 0){
|
|
||||||
var str = new Array();
|
|
||||||
ids.each(function(){
|
|
||||||
str.push($(this).val());
|
|
||||||
});
|
|
||||||
param = str.join(',');
|
|
||||||
}
|
|
||||||
|
|
||||||
if(url != undefined && url != ''){
|
<script type="text/javascript">
|
||||||
window.location.href = url + '/ids/' + param;
|
$(function(){
|
||||||
}
|
var editFlag = "";
|
||||||
|
var removeFlag = "";
|
||||||
|
var resetPwdFlag = "";
|
||||||
|
|
||||||
|
$.table.init({
|
||||||
|
url: "/admin/client/index",
|
||||||
|
createUrl: "/admin/client/add",
|
||||||
|
updateUrl: "/admin/client/edit/id/{id}",
|
||||||
|
removeUrl: "/admin/client/remove",
|
||||||
|
sortName: "id",
|
||||||
|
sortOrder: "desc",
|
||||||
|
modalName: "客户端",
|
||||||
|
columns: [
|
||||||
|
{
|
||||||
|
checkbox: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'title',
|
||||||
|
title: '客户端名称'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'appid',
|
||||||
|
title: 'APPID'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'appsecret',
|
||||||
|
title: 'APP秘钥'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'create_time',
|
||||||
|
title: '创建时间',
|
||||||
|
sortable: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '操作',
|
||||||
|
align: 'center',
|
||||||
|
formatter: function(value, row, index) {
|
||||||
|
var actions = [];
|
||||||
|
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
|
||||||
|
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a> ');
|
||||||
|
return actions.join('');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
});
|
});
|
||||||
$.fn.editable.defaults.mode = 'popup';
|
})
|
||||||
$.fn.editableform.buttons = '<button type="submit" class="btn btn-success editable-submit btn-mini"><i class="fa fa-check-square-o fa-white"></i></button>' +
|
|
||||||
'<button type="button" class="btn editable-cancel btn-mini"><i class="fa fa-times"></i></button>';
|
|
||||||
$('.editable').editable();
|
|
||||||
});
|
|
||||||
</script>
|
</script>
|
||||||
{/block}
|
{/block}
|
||||||
@@ -19,6 +19,7 @@ folder instead of downloading all of them to reduce the load. -->
|
|||||||
<link rel="stylesheet" href="__css__/themes.css">
|
<link rel="stylesheet" href="__css__/themes.css">
|
||||||
<!-- jQuery 3 -->
|
<!-- jQuery 3 -->
|
||||||
<script src="__static__/plugins/jquery/dist/jquery.min.js"></script>
|
<script src="__static__/plugins/jquery/dist/jquery.min.js"></script>
|
||||||
|
<script src="__static__/plugins/blockUI/jquery.blockUI.js"></script>
|
||||||
<!-- Bootstrap 3.3.7 -->
|
<!-- Bootstrap 3.3.7 -->
|
||||||
<script src="__static__/plugins/bootstrap/dist/js/bootstrap.min.js"></script>
|
<script src="__static__/plugins/bootstrap/dist/js/bootstrap.min.js"></script>
|
||||||
<!-- Slimscroll -->
|
<!-- Slimscroll -->
|
||||||
@@ -56,10 +57,10 @@ folder instead of downloading all of them to reduce the load. -->
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- AdminLTE App -->
|
<!-- AdminLTE App -->
|
||||||
<script src="__static__/common/js/core.js?v={$sent_version}"></script>
|
<script src="__static__/common/js/core.js?v={:time()}{$sent_version}"></script>
|
||||||
<script src="__js__/sentcms.js?v={$sent_version}"></script>
|
<script src="__js__/sentcms.js?v={:time()}{$sent_version}"></script>
|
||||||
<!-- AdminLTE for demo purposes -->
|
<!-- AdminLTE for demo purposes -->
|
||||||
<script src="__js__/app.js?v={$sent_version}"></script>
|
<script src="__js__/app.js?v={:time()}{$sent_version}"></script>
|
||||||
{block name="script"}{/block}
|
{block name="script"}{/block}
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
@@ -1,67 +1,87 @@
|
|||||||
{extend name="admin/base"/}
|
{extend name="admin/base"/}
|
||||||
{block name="style"}
|
|
||||||
<link rel="stylesheet" type="text/css" href="__PUBLIC__/css/libs/bootstrap-editable.css">
|
|
||||||
{/block}
|
|
||||||
{block name="body"}
|
{block name="body"}
|
||||||
<div class="box box-primary">
|
<div class="box box-primary">
|
||||||
<header class="box-header with-border">
|
<header class="box-header with-border">
|
||||||
<h3 class="box-title">{$meta_title|default='新功能'}</h3>
|
<h3 class="box-title">{$meta_title|default='新功能'}</h3>
|
||||||
<div class="pull-right">
|
<div class="pull-right">
|
||||||
<a class="btn btn-primary" href="{:url('add')}">新 增</a>
|
|
||||||
<button class="btn btn-danger ajax-post confirm" url="{:url('del')}" target-form="ids">删 除</button>
|
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
<div class="box-body">
|
<div class="box-body">
|
||||||
<div class="table-responsive clearfix">
|
|
||||||
<table class="table table-hover">
|
<div class="btn-group-sm" id="toolbar" role="group">
|
||||||
<thead>
|
<a class="btn btn-success" onclick="$.operate.add()">
|
||||||
<tr>
|
<i class="fa fa-plus"></i> 新增
|
||||||
<th width="30"><input class="checkbox check-all" type="checkbox"></th>
|
</a>
|
||||||
<th width="60">ID</th>
|
<a class="btn btn-primary single disabled" onclick="$.operate.edit()">
|
||||||
<th>名称</th>
|
<i class="fa fa-edit"></i> 修改
|
||||||
<th>排序</th>
|
</a>
|
||||||
<th>时间</th>
|
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()">
|
||||||
<th>操作</th>
|
<i class="fa fa-remove"></i> 删除
|
||||||
</tr>
|
</a>
|
||||||
</thead>
|
</div>
|
||||||
<tbody>
|
|
||||||
{notempty name="list"}
|
<div class="table-striped">
|
||||||
{volist name="list" id="item"}
|
<table id="bootstrap-table" data-mobile-responsive="true"></table>
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<input class="ids" type="checkbox" name="ids[]" value="{$item['id']}" />
|
|
||||||
</td>
|
|
||||||
<td>{$item['id']}</td>
|
|
||||||
<td>{$item['name']}</td>
|
|
||||||
<td>
|
|
||||||
<a data-id="{$item.id}" href="{:url('form/edit?id='.$item['id'])}">{$item['title']}</a>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<span>{$item.create_time|time_format}</span>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
{if $item['status']}
|
|
||||||
<span class="label label-primary">{$item['status_text']}</span>
|
|
||||||
{else/}
|
|
||||||
<span class="label label-danger">{$item['status_text']}</span>
|
|
||||||
{/if}
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<a href="{:url('admin/form/attr?form_id='.$item['id'])}">字段</a>
|
|
||||||
<a href="{:url('admin/form/status?id='.$item['id'].'&status='.abs(1-$item['status']))}" class="ajax-get">{$item['status']|show_status_op}</a>
|
|
||||||
<a href="{:url('admin/form/edit?id='.$item['id'])}">编辑</a>
|
|
||||||
<a href="{:url('admin/form/del?id='.$item['id'])}" class="confirm ajax-get">删除</a>
|
|
||||||
<a href="{:url('admin/form/lists?form_id='.$item['id'])}">数据</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
{/volist}
|
|
||||||
{else/}
|
|
||||||
<td colspan="7" class="text-center">aOh! 暂时还没有创建模型!</td>
|
|
||||||
{/notempty}
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
{$page|raw}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
{/block}
|
||||||
|
{block name="script"}
|
||||||
|
<!-- bootstrap-table 表格插件 -->
|
||||||
|
<script src="__static__/plugins/bootstrap-table/bootstrap-table.min.js"></script>
|
||||||
|
<script src="__static__/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.min.js"></script>
|
||||||
|
<script src="__static__/plugins/bootstrap-table/extensions/mobile/bootstrap-table-mobile.js"></script>
|
||||||
|
<script src="__static__/plugins/bootstrap-table/extensions/toolbar/bootstrap-table-toolbar.min.js"></script>
|
||||||
|
<script src="__static__/plugins/bootstrap-table/extensions/columns/bootstrap-table-fixed-columns.js"></script>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(function(){
|
||||||
|
var editFlag = "";
|
||||||
|
var removeFlag = "";
|
||||||
|
var resetPwdFlag = "";
|
||||||
|
|
||||||
|
$.table.init({
|
||||||
|
url: "/admin/client/index",
|
||||||
|
createUrl: "/admin/client/add",
|
||||||
|
updateUrl: "/admin/client/edit/id/{id}",
|
||||||
|
removeUrl: "/admin/client/remove",
|
||||||
|
sortName: "id",
|
||||||
|
sortOrder: "desc",
|
||||||
|
modalName: "客户端",
|
||||||
|
columns: [
|
||||||
|
{
|
||||||
|
checkbox: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'title',
|
||||||
|
title: '客户端名称'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'appid',
|
||||||
|
title: 'APPID'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'appsecret',
|
||||||
|
title: 'APP秘钥'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'create_time',
|
||||||
|
title: '创建时间',
|
||||||
|
sortable: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '操作',
|
||||||
|
align: 'center',
|
||||||
|
formatter: function(value, row, index) {
|
||||||
|
var actions = [];
|
||||||
|
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
|
||||||
|
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a> ');
|
||||||
|
return actions.join('');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
});
|
||||||
|
})
|
||||||
|
|
||||||
|
</script>
|
||||||
{/block}
|
{/block}
|
||||||
@@ -4,72 +4,84 @@
|
|||||||
<header class="box-header with-border">
|
<header class="box-header with-border">
|
||||||
<h3 class="box-title">{$meta_title|default='新功能'}</h3>
|
<h3 class="box-title">{$meta_title|default='新功能'}</h3>
|
||||||
<div class="pull-right">
|
<div class="pull-right">
|
||||||
<a href="{:url('Group/addnode',array('type'=>$type))}" class="btn btn-danger">
|
|
||||||
<i class="fa fa-plus"></i>
|
|
||||||
添加节点
|
|
||||||
</a>
|
|
||||||
<a href="{:url('Group/upnode',array('type'=>$type))}" class="btn btn-danger ajax-get">
|
|
||||||
<i class="fa fa-plus"></i>
|
|
||||||
更新节点
|
|
||||||
</a>
|
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
<div class="box-body">
|
<div class="box-body">
|
||||||
<div class="tabs-wrapper">
|
|
||||||
<ul class="nav nav-tabs">
|
<div class="btn-group-sm" id="toolbar" role="group">
|
||||||
{volist name=":config('user_group_type')" id="item"}
|
<a class="btn btn-success" onclick="$.operate.add()">
|
||||||
<li {if condition="$key eq $type"}class="active"{/if}>
|
<i class="fa fa-plus"></i> 新增
|
||||||
<a href="{:url('Group/access',array('type'=>$key))}">{$item}</a>
|
</a>
|
||||||
</li>
|
<a class="btn btn-primary single disabled" onclick="$.operate.edit()">
|
||||||
{/volist}
|
<i class="fa fa-edit"></i> 修改
|
||||||
</ul>
|
</a>
|
||||||
<div class="tab-content">
|
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()">
|
||||||
<div class="tab-pane fade in active" id="tab-home">
|
<i class="fa fa-remove"></i> 删除
|
||||||
{if condition="empty($list)"}
|
</a>
|
||||||
<p>暂无数据!</p>
|
</div>
|
||||||
{else/}
|
|
||||||
<div class="table-responsive clearfix">
|
<div class="table-striped">
|
||||||
<table class="table table-striped table-hover">
|
<table id="bootstrap-table" data-mobile-responsive="true"></table>
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th width="30"><input class="checkbox check-all" type="checkbox"></th>
|
|
||||||
<th width="60">ID</th>
|
|
||||||
<th>组名</th>
|
|
||||||
<th>标识</th>
|
|
||||||
<th>分组</th>
|
|
||||||
<th>状态</th>
|
|
||||||
<th>操作</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
{volist name="list" id="item"}
|
|
||||||
<tr>
|
|
||||||
<th width="30"><input class="ids row-selected" type="checkbox" name="id[]" value="{$item['id']}"></th>
|
|
||||||
<td>{$item['id']}</td>
|
|
||||||
<td>{$item['title']}</td>
|
|
||||||
<td>{$item['name']}</td>
|
|
||||||
<td>{$item['group']}</td>
|
|
||||||
<td>
|
|
||||||
{if condition="$item['status'] eq '0'"}
|
|
||||||
<span class="label label-danger">禁用</span>
|
|
||||||
{elseif condition="$item['status'] eq '1'"/}
|
|
||||||
<span class="label label-primary">启用</span>
|
|
||||||
{/if}
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<a href="{:url('Group/editnode',array('id'=>$item['id']))}">编辑</a>
|
|
||||||
<a href="{:url('Group/delnode',array('id'=>$item['id']))}" class="confirm ajax-get">删除</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
{/volist}
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
{$page|raw}
|
|
||||||
</div>
|
|
||||||
{/if}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
{/block}
|
||||||
|
{block name="script"}
|
||||||
|
<!-- bootstrap-table 表格插件 -->
|
||||||
|
<script src="__static__/plugins/bootstrap-table/bootstrap-table.min.js"></script>
|
||||||
|
<script src="__static__/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.min.js"></script>
|
||||||
|
<script src="__static__/plugins/bootstrap-table/extensions/mobile/bootstrap-table-mobile.js"></script>
|
||||||
|
<script src="__static__/plugins/bootstrap-table/extensions/toolbar/bootstrap-table-toolbar.min.js"></script>
|
||||||
|
<script src="__static__/plugins/bootstrap-table/extensions/columns/bootstrap-table-fixed-columns.js"></script>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(function(){
|
||||||
|
var editFlag = "";
|
||||||
|
var removeFlag = "";
|
||||||
|
var resetPwdFlag = "";
|
||||||
|
|
||||||
|
$.table.init({
|
||||||
|
url: "/admin/client/index",
|
||||||
|
createUrl: "/admin/client/add",
|
||||||
|
updateUrl: "/admin/client/edit/id/{id}",
|
||||||
|
removeUrl: "/admin/client/remove",
|
||||||
|
sortName: "id",
|
||||||
|
sortOrder: "desc",
|
||||||
|
modalName: "客户端",
|
||||||
|
columns: [
|
||||||
|
{
|
||||||
|
checkbox: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'title',
|
||||||
|
title: '客户端名称'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'appid',
|
||||||
|
title: 'APPID'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'appsecret',
|
||||||
|
title: 'APP秘钥'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'create_time',
|
||||||
|
title: '创建时间',
|
||||||
|
sortable: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '操作',
|
||||||
|
align: 'center',
|
||||||
|
formatter: function(value, row, index) {
|
||||||
|
var actions = [];
|
||||||
|
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
|
||||||
|
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a> ');
|
||||||
|
return actions.join('');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
});
|
||||||
|
})
|
||||||
|
|
||||||
|
</script>
|
||||||
{/block}
|
{/block}
|
||||||
@@ -1,81 +1,87 @@
|
|||||||
{extend name="admin/base"/}
|
{extend name="admin/base"/}
|
||||||
{block name="style"}
|
|
||||||
<link rel="stylesheet" type="text/css" href="__PUBLIC__/css/libs/bootstrap-editable.css">
|
|
||||||
{/block}
|
|
||||||
{block name="body"}
|
{block name="body"}
|
||||||
<div class="box box-primary">
|
<div class="box box-primary">
|
||||||
<header class="box-header with-border">
|
<header class="box-header with-border">
|
||||||
<h3 class="box-title">{$meta_title|default='新功能'}</h3>
|
<h3 class="box-title">{$meta_title|default='新功能'}</h3>
|
||||||
<div class="pull-right">
|
<div class="pull-right">
|
||||||
<a href="{:url('Group/add',array('type'=>$type))}" class="btn btn-danger"><i class="fa fa-plus"></i> 添加用户组</a>
|
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
<div class="box-body">
|
<div class="box-body">
|
||||||
<div class="tabs-wrapper">
|
|
||||||
<ul class="nav nav-tabs">
|
<div class="btn-group-sm" id="toolbar" role="group">
|
||||||
{volist name=":config('USER_GROUP_TYPE')" id="item"}
|
<a class="btn btn-success" onclick="$.operate.add()">
|
||||||
<li {if condition="$key eq $type"}class="active"{/if}>
|
<i class="fa fa-plus"></i> 新增
|
||||||
<a href="{:url('Group/index',array('type'=>$key))}">{$item}</a>
|
</a>
|
||||||
</li>
|
<a class="btn btn-primary single disabled" onclick="$.operate.edit()">
|
||||||
{/volist}
|
<i class="fa fa-edit"></i> 修改
|
||||||
</ul>
|
</a>
|
||||||
<div class="tab-content">
|
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()">
|
||||||
<div class="tab-pane fade in active" id="tab-home">
|
<i class="fa fa-remove"></i> 删除
|
||||||
{if condition="empty($list)"}
|
</a>
|
||||||
<p>暂无数据!</p>
|
</div>
|
||||||
{else/}
|
|
||||||
<div class="table-responsive clearfix">
|
<div class="table-striped">
|
||||||
<table class="table table-striped table-hover">
|
<table id="bootstrap-table" data-mobile-responsive="true"></table>
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th width="30"><input class="checkbox check-all" type="checkbox"></th>
|
|
||||||
<th width="60">ID</th>
|
|
||||||
<th>组名</th>
|
|
||||||
<th>描述</th>
|
|
||||||
<th>状态</th>
|
|
||||||
<th>操作</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
{volist name="list" id="item"}
|
|
||||||
<tr>
|
|
||||||
<td><input class="ids row-selected" type="checkbox" name="ids[]" value="{$item['id']}"></td>
|
|
||||||
<td>{$item['id']}</td>
|
|
||||||
<td><a href="#" class="editable editable-click" data-id="{$item['id']}" data-name="title" data-type="text" data-pk="{$item['id']}" data-url="{:url('editable')}">{$item['title']}</a></td>
|
|
||||||
<td>{$item['description']}</td>
|
|
||||||
<td>
|
|
||||||
{if condition="$item['status'] eq '0'"}
|
|
||||||
<span class="label label-danger">禁用</span>
|
|
||||||
{elseif condition="$item['status'] eq '1'"/}
|
|
||||||
<span class="label label-primary">启用</span>
|
|
||||||
{/if}
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<a href="{:url('Group/edit',array('id'=>$item['id']))}">编辑</a>
|
|
||||||
<a href="{:url('Group/auth',array('id'=>$item['id']))}">授权</a>
|
|
||||||
<a href="{:url('Group/del',array('id'=>$item['id']))}" class="confirm ajax-get">删除</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
{/volist}
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
{$page|raw}
|
|
||||||
</div>
|
|
||||||
{/if}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{/block}
|
{/block}
|
||||||
{block name="script"}
|
{block name="script"}
|
||||||
<script type="text/javascript" src="__PUBLIC__/js/bootstrap-editable.min.js"></script>
|
<!-- bootstrap-table 表格插件 -->
|
||||||
|
<script src="__static__/plugins/bootstrap-table/bootstrap-table.min.js"></script>
|
||||||
|
<script src="__static__/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.min.js"></script>
|
||||||
|
<script src="__static__/plugins/bootstrap-table/extensions/mobile/bootstrap-table-mobile.js"></script>
|
||||||
|
<script src="__static__/plugins/bootstrap-table/extensions/toolbar/bootstrap-table-toolbar.min.js"></script>
|
||||||
|
<script src="__static__/plugins/bootstrap-table/extensions/columns/bootstrap-table-fixed-columns.js"></script>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(function(){
|
$(function(){
|
||||||
$.fn.editable.defaults.mode = 'popup';
|
var editFlag = "";
|
||||||
$.fn.editableform.buttons = '<button type="submit" class="btn btn-success editable-submit btn-mini"><i class="fa fa-check-square-o fa-white"></i></button>' +
|
var removeFlag = "";
|
||||||
'<button type="button" class="btn editable-cancel btn-mini"><i class="fa fa-times"></i></button>';
|
var resetPwdFlag = "";
|
||||||
$('.editable').editable();
|
|
||||||
|
$.table.init({
|
||||||
|
url: "/admin/client/index",
|
||||||
|
createUrl: "/admin/client/add",
|
||||||
|
updateUrl: "/admin/client/edit/id/{id}",
|
||||||
|
removeUrl: "/admin/client/remove",
|
||||||
|
sortName: "id",
|
||||||
|
sortOrder: "desc",
|
||||||
|
modalName: "客户端",
|
||||||
|
columns: [
|
||||||
|
{
|
||||||
|
checkbox: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'title',
|
||||||
|
title: '客户端名称'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'appid',
|
||||||
|
title: 'APPID'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'appsecret',
|
||||||
|
title: 'APP秘钥'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'create_time',
|
||||||
|
title: '创建时间',
|
||||||
|
sortable: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '操作',
|
||||||
|
align: 'center',
|
||||||
|
formatter: function(value, row, index) {
|
||||||
|
var actions = [];
|
||||||
|
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
|
||||||
|
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a> ');
|
||||||
|
return actions.join('');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
});
|
||||||
})
|
})
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
{/block}
|
{/block}
|
||||||
@@ -13,7 +13,7 @@
|
|||||||
<link rel="stylesheet" href="__static__/plugins/Ionicons/css/ionicons.min.css">
|
<link rel="stylesheet" href="__static__/plugins/Ionicons/css/ionicons.min.css">
|
||||||
<!-- Theme style -->
|
<!-- Theme style -->
|
||||||
<link rel="stylesheet" href="__css__/sentcms.min.css">
|
<link rel="stylesheet" href="__css__/sentcms.min.css">
|
||||||
<link rel="stylesheet" href="__css__/style.css?v={$sent_version}">
|
<link rel="stylesheet" href="__css__/style.css?v={sent_version}">
|
||||||
<!-- AdminLTE Skins. Choose a skin from the css/skins
|
<!-- AdminLTE Skins. Choose a skin from the css/skins
|
||||||
folder instead of downloading all of them to reduce the load. -->
|
folder instead of downloading all of them to reduce the load. -->
|
||||||
<link rel="stylesheet" href="__css__/themes.css">
|
<link rel="stylesheet" href="__css__/themes.css">
|
||||||
@@ -87,7 +87,7 @@ folder instead of downloading all of them to reduce the load. -->
|
|||||||
<a href="/admin/user/profile.html" class="btn btn-default btn-flat" data-action="url" data-type="tab">个人资料</a>
|
<a href="/admin/user/profile.html" class="btn btn-default btn-flat" data-action="url" data-type="tab">个人资料</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="pull-right">
|
<div class="pull-right">
|
||||||
<a href="/admin/user/logout.html" class="btn btn-default btn-flat" data-action="url" data-type="msg">退出</a>
|
<a href="/admin/index/logout.html" class="btn btn-default btn-flat" data-action="url" data-type="msg">退出</a>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
@@ -169,7 +169,7 @@ folder instead of downloading all of them to reduce the load. -->
|
|||||||
<span class="button" data-action="scroll" data-type="left"><i class="fa fa-backward"></i></span>
|
<span class="button" data-action="scroll" data-type="left"><i class="fa fa-backward"></i></span>
|
||||||
<div class="tab-list">
|
<div class="tab-list">
|
||||||
<div class="page-tabs-content">
|
<div class="page-tabs-content">
|
||||||
<a href="javascript:;" class="home active menuTab" data-id="/admin/system/dashboard"><span>首页</span></a>
|
<a href="javascript:;" class="home active menuTab" data-id="/admin/system/dashboard"><span><i class="fa fa-home"></i> 系统首页</span></a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="dropdown" data-tab-action="nav">
|
<div class="dropdown" data-tab-action="nav">
|
||||||
|
|||||||
@@ -1,47 +1,87 @@
|
|||||||
{extend name="admin/base"/}
|
{extend name="admin/base"/}
|
||||||
{block name="style"}
|
|
||||||
<link rel="stylesheet" type="text/css" href="__PUBLIC__/css/libs/bootstrap-editable.css">
|
|
||||||
{/block}
|
|
||||||
{block name="body"}
|
{block name="body"}
|
||||||
<div class="box box-primary">
|
<div class="box box-primary">
|
||||||
<header class="box-header with-border">
|
<header class="box-header with-border">
|
||||||
<h3 class="box-title">{$meta_title|default='新功能'}</h3>
|
<h3 class="box-title">{$meta_title|default='新功能'}</h3>
|
||||||
<div class="pull-right">
|
<div class="pull-right">
|
||||||
<a class="btn btn-primary" href="{:url('add')}">新 增</a>
|
|
||||||
<button class="btn btn-danger ajax-post confirm" url="{:url('delete')}" target-form="ids">删 除</button>
|
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
<div class="box-body">
|
<div class="box-body">
|
||||||
<div class="table-responsive clearfix">
|
|
||||||
<table class="table table-hover">
|
<div class="btn-group-sm" id="toolbar" role="group">
|
||||||
<thead>
|
<a class="btn btn-success" onclick="$.operate.add()">
|
||||||
<tr>
|
<i class="fa fa-plus"></i> 新增
|
||||||
<th width="30"><input class="checkbox check-all" type="checkbox"></th>
|
</a>
|
||||||
<th width="60">ID</th>
|
<a class="btn btn-primary single disabled" onclick="$.operate.edit()">
|
||||||
<th>名称</th>
|
<i class="fa fa-edit"></i> 修改
|
||||||
<th>排序</th>
|
</a>
|
||||||
<th>时间</th>
|
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()">
|
||||||
<th>操作</th>
|
<i class="fa fa-remove"></i> 删除
|
||||||
</tr>
|
</a>
|
||||||
</thead>
|
</div>
|
||||||
<tbody>
|
|
||||||
{volist name="list" id="item"}
|
<div class="table-striped">
|
||||||
<tr>
|
<table id="bootstrap-table" data-mobile-responsive="true"></table>
|
||||||
<td><input class="ids row-selected" type="checkbox" name="id[]" value="{$item['id']}"></td>
|
|
||||||
<td>{$item['id']}</td>
|
|
||||||
<td>{$item['title']}</td>
|
|
||||||
<td>{$item['sort']}</td>
|
|
||||||
<td>{$item['update_time']|date='Y-m-d',###}</td>
|
|
||||||
<td>
|
|
||||||
<a href="{:url('edit?id='.$item['id'])}">编辑</a>
|
|
||||||
<a href="{:url('delete?id='.$item['id'])}" class="confirm ajax-get">删除</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
{/volist}
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
{$page|raw}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
{/block}
|
||||||
|
{block name="script"}
|
||||||
|
<!-- bootstrap-table 表格插件 -->
|
||||||
|
<script src="__static__/plugins/bootstrap-table/bootstrap-table.min.js"></script>
|
||||||
|
<script src="__static__/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.min.js"></script>
|
||||||
|
<script src="__static__/plugins/bootstrap-table/extensions/mobile/bootstrap-table-mobile.js"></script>
|
||||||
|
<script src="__static__/plugins/bootstrap-table/extensions/toolbar/bootstrap-table-toolbar.min.js"></script>
|
||||||
|
<script src="__static__/plugins/bootstrap-table/extensions/columns/bootstrap-table-fixed-columns.js"></script>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(function(){
|
||||||
|
var editFlag = "";
|
||||||
|
var removeFlag = "";
|
||||||
|
var resetPwdFlag = "";
|
||||||
|
|
||||||
|
$.table.init({
|
||||||
|
url: "/admin/client/index",
|
||||||
|
createUrl: "/admin/client/add",
|
||||||
|
updateUrl: "/admin/client/edit/id/{id}",
|
||||||
|
removeUrl: "/admin/client/remove",
|
||||||
|
sortName: "id",
|
||||||
|
sortOrder: "desc",
|
||||||
|
modalName: "客户端",
|
||||||
|
columns: [
|
||||||
|
{
|
||||||
|
checkbox: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'title',
|
||||||
|
title: '客户端名称'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'appid',
|
||||||
|
title: 'APPID'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'appsecret',
|
||||||
|
title: 'APP秘钥'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'create_time',
|
||||||
|
title: '创建时间',
|
||||||
|
sortable: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '操作',
|
||||||
|
align: 'center',
|
||||||
|
formatter: function(value, row, index) {
|
||||||
|
var actions = [];
|
||||||
|
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
|
||||||
|
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a> ');
|
||||||
|
return actions.join('');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
});
|
||||||
|
})
|
||||||
|
|
||||||
|
</script>
|
||||||
{/block}
|
{/block}
|
||||||
@@ -8,51 +8,51 @@
|
|||||||
<div class="box-body">
|
<div class="box-body">
|
||||||
<form method="post" class="form form-horizontal">
|
<form method="post" class="form form-horizontal">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-lg-2 control-label">标题</label>
|
<label class="col-sm-2 control-label">标题</label>
|
||||||
<div class="col-lg-10">
|
<div class="col-sm-10">
|
||||||
<input type="text" class="form-control" name="title" value="{$info.title|default=''}" style="width: 80%">
|
<input type="text" class="form-control" name="title" value="{$info.title|default=''}" style="width: 80%">
|
||||||
<span class="help-block">(用于后台显示的配置标题)</span>
|
<span class="help-block">(用于后台显示的配置标题)</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-lg-2 control-label">小图标</label>
|
<label class="col-sm-2 control-label">小图标</label>
|
||||||
<div class="col-lg-10">
|
<div class="col-sm-10">
|
||||||
<input type="text" class="form-control" name="icon" value="{$info.icon|default=''}" style="width: 80%">
|
<input type="text" class="form-control" name="icon" value="{$info.icon|default=''}" style="width: 80%">
|
||||||
<span class="help-block">(用于显示在菜单左侧,不填则不显示)</span>
|
<span class="help-block">(用于显示在菜单左侧,不填则不显示)</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-lg-2 control-label">排序</label>
|
<label class="col-sm-2 control-label">排序</label>
|
||||||
<div class="col-lg-10">
|
<div class="col-sm-10">
|
||||||
<input type="text" class="form-control" name="sort" value="{$info.sort|default=0}" style="width: 60%">
|
<input type="text" class="form-control" name="sort" value="{$info.sort|default=0}" style="width: 60%">
|
||||||
<span class="help-block">(用于分组显示的顺序)</span>
|
<span class="help-block">(用于分组显示的顺序)</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-lg-2 control-label">链接</label>
|
<label class="col-sm-2 control-label">链接</label>
|
||||||
<div class="col-lg-10">
|
<div class="col-sm-10">
|
||||||
<input type="text" class="form-control" name="url" value="{$info['url']|default=''}" style="width: 80%">
|
<input type="text" class="form-control" name="url" value="{$info['url']|default=''}" style="width: 80%">
|
||||||
<span class="help-block">(U函数解析的URL或者外链)</span>
|
<span class="help-block">(U函数解析的URL或者外链)</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-lg-2 control-label">上级菜单</label>
|
<label class="col-sm-2 control-label">上级菜单</label>
|
||||||
<div class="col-lg-10">
|
<div class="col-sm-10">
|
||||||
<select name="pid" class="form-control" style="width: 50%">
|
<select name="pid" class="form-control" style="width: 50%">
|
||||||
</select>
|
</select>
|
||||||
<span class="help-block">(所属的上级菜单)</span>
|
<span class="help-block">(所属的上级菜单)</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-lg-2 control-label">分组</label>
|
<label class="col-sm-2 control-label">分组</label>
|
||||||
<div class="col-lg-10">
|
<div class="col-sm-10">
|
||||||
<input type="text" class="form-control" name="group" value="{$info['group']|default=''}" style="width: 50%">
|
<input type="text" class="form-control" name="group" value="{$info['group']|default=''}" style="width: 50%">
|
||||||
<span class="help-block">(用于左侧分组二级菜单)</span>
|
<span class="help-block">(用于左侧分组二级菜单)</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-lg-2 control-label">是否隐藏</label>
|
<label class="col-sm-2 control-label">是否隐藏</label>
|
||||||
<div class="col-lg-1">
|
<div class="col-sm-2">
|
||||||
<select name="hide" class="form-control">
|
<select name="hide" class="form-control">
|
||||||
<option value="0" >否</option>
|
<option value="0" >否</option>
|
||||||
<option value="1" {if isset($info['hide']) && $info['hide']==1}selected{/if}>是
|
<option value="1" {if isset($info['hide']) && $info['hide']==1}selected{/if}>是
|
||||||
@@ -61,8 +61,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-lg-2 control-label">仅开发者模式可见</label>
|
<label class="col-sm-2 control-label">仅开发者模式可见</label>
|
||||||
<div class="col-lg-1">
|
<div class="col-sm-2">
|
||||||
<select name="is_dev" class="form-control">
|
<select name="is_dev" class="form-control">
|
||||||
<option value="0" >否</option>
|
<option value="0" >否</option>
|
||||||
<option value="1" {if isset($info['is_dev']) && $info['is_dev']==1}selected{/if}>是
|
<option value="1" {if isset($info['is_dev']) && $info['is_dev']==1}selected{/if}>是
|
||||||
@@ -71,20 +71,20 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-lg-2 control-label">说明</label>
|
<label class="col-sm-2 control-label">说明</label>
|
||||||
<div class="col-lg-10">
|
<div class="col-sm-10">
|
||||||
<input type="text" class="form-control" name="tip" value="{$info.tip|default=''}" style="width: 60%;">
|
<input type="text" class="form-control" name="tip" value="{$info.tip|default=''}" style="width: 60%;">
|
||||||
<span class="help-block">(菜单详细说明)</span>
|
<span class="help-block">(菜单详细说明)</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<!-- <div class="form-group">
|
||||||
<div class="col-lg-offset-2 col-lg-10">
|
<div class="col-sm-offset-2 col-sm-10">
|
||||||
<input type="hidden" name="id" value="{$info['id']|default=''}">
|
|
||||||
<button class="btn btn-success submit-btn ajax-post" type="submit" target-form="form-horizontal">确 定</button>
|
<button class="btn btn-success submit-btn ajax-post" type="submit" target-form="form-horizontal">确 定</button>
|
||||||
<button class="btn btn-danger btn-return" onclick="javascript:history.back(-1);return false;">返 回</button>
|
<button class="btn btn-danger btn-return" onclick="javascript:history.back(-1);return false;">返 回</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div> -->
|
||||||
|
<input type="hidden" name="id" value="{$info['id']|default=''}">
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -42,9 +42,9 @@ $(function(){
|
|||||||
expandAll: false,
|
expandAll: false,
|
||||||
expandFirst: false,
|
expandFirst: false,
|
||||||
url: "/admin/menu/index",
|
url: "/admin/menu/index",
|
||||||
createUrl: "/admin/menu/add/{id}",
|
createUrl: "/admin/menu/add?id={id}",
|
||||||
updateUrl: "/admin/menu/edit/{id}",
|
updateUrl: "/admin/menu/edit?id={id}",
|
||||||
removeUrl: "/admin/menu/remove/{id}",
|
removeUrl: "/admin/menu/remove?id={id}",
|
||||||
modalName: "菜单",
|
modalName: "菜单",
|
||||||
columns:[
|
columns:[
|
||||||
{field: 'selectItem', radio: true},
|
{field: 'selectItem', radio: true},
|
||||||
@@ -78,9 +78,9 @@ $(function(){
|
|||||||
align: "left",
|
align: "left",
|
||||||
formatter: function(value, row, index) {
|
formatter: function(value, row, index) {
|
||||||
var actions = [];
|
var actions = [];
|
||||||
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.menuId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
|
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
|
||||||
actions.push('<a class="btn btn-info btn-xs ' + addFlag + '" href="javascript:void(0)" onclick="$.operate.add(\'' + row.menuId + '\')"><i class="fa fa-plus"></i>新增</a> ');
|
actions.push('<a class="btn btn-info btn-xs ' + addFlag + '" href="javascript:void(0)" onclick="$.operate.add(\'' + row.id + '\')"><i class="fa fa-plus"></i>新增</a> ');
|
||||||
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.menuId + '\')"><i class="fa fa-trash"></i>删除</a>');
|
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-trash"></i>删除</a>');
|
||||||
return actions.join('');
|
return actions.join('');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user