优化配置
@ -99,7 +99,7 @@ function get_admin($id)
|
||||
//读取后台菜单列表
|
||||
function get_admin_menu()
|
||||
{
|
||||
$menu = \think\facade\Db::name('admin_menu')->order('order asc')->select()->toArray();
|
||||
$menu = \think\facade\Db::name('admin_menu')->order('sort asc')->select()->toArray();
|
||||
return $menu;
|
||||
}
|
||||
|
||||
@ -140,7 +140,7 @@ function get_admin_menus()
|
||||
$v = explode(',', $v);
|
||||
$adminMenus = array_merge($adminMenus, $v);
|
||||
}
|
||||
$menu = \think\facade\Db::name('admin_menu')->where('id', 'in', $adminMenus)->order('order asc')->select()->toArray();
|
||||
$menu = \think\facade\Db::name('admin_menu')->where('id', 'in', $adminMenus)->order('sort asc')->select()->toArray();
|
||||
$list = list_to_tree($menu);
|
||||
\think\facade\Cache::tag('adminMenu')->set('menu' . get_login_admin('id'), $list);
|
||||
}
|
||||
@ -150,7 +150,7 @@ function get_admin_menus()
|
||||
//读取导航列表,用于后台
|
||||
function get_nav($nav_id)
|
||||
{
|
||||
$nav = \think\facade\Db::name('NavInfo')->where('nav_id', $nav_id)->order('order asc')->select();
|
||||
$nav = \think\facade\Db::name('NavInfo')->where('nav_id', $nav_id)->order('sort asc')->select();
|
||||
return $nav;
|
||||
}
|
||||
|
||||
|
@ -121,7 +121,7 @@ class Api extends BaseController
|
||||
//清空缓存
|
||||
public function cache_clear()
|
||||
{
|
||||
think\facade\Cache::clear();
|
||||
\think\facade\Cache::clear();
|
||||
return to_assign(1, '系统缓存已清空');
|
||||
}
|
||||
|
||||
|
@ -6,112 +6,103 @@ namespace app\admin\controller;
|
||||
use app\admin\BaseController;
|
||||
use app\admin\validate\ConfCheck;
|
||||
use think\exception\ValidateException;
|
||||
use think\facade\Db;
|
||||
use think\facade\View;
|
||||
|
||||
class Conf extends BaseController
|
||||
{
|
||||
//网站信息
|
||||
public function web()
|
||||
public function index()
|
||||
{
|
||||
$conf = get_config('webconfig');
|
||||
$webConf = [
|
||||
'title' => empty($conf['title']) ? '' : $conf['title'],
|
||||
'keywords' => empty($conf['keywords']) ? '' : $conf['keywords'],
|
||||
'desc' => empty($conf['desc']) ? '' : $conf['desc'],
|
||||
'logo' => empty($conf['logo']) ? '' : $conf['logo'],
|
||||
'admin_title' => empty($conf['admin_title']) ? '' : $conf['admin_title'],
|
||||
'icp' => empty($conf['icp']) ? '' : $conf['icp'],
|
||||
'code' => empty($conf['code']) ? '' : $conf['code'],
|
||||
'domain' => empty($conf['domain']) ? '' : $conf['domain'],
|
||||
'version' => empty($conf['version']) ? '' : $conf['version'],
|
||||
'port_cache_time' => empty($conf['port_cache_time']) ? '' : $conf['port_cache_time'],
|
||||
];
|
||||
return view('', ['webConf' => $webConf]);
|
||||
return view();
|
||||
}
|
||||
|
||||
//提交网站信息
|
||||
public function web_submit()
|
||||
public function get_list()
|
||||
{
|
||||
$param = get_params();
|
||||
try {
|
||||
validate(ConfCheck::class)->scene('web')->check($param);
|
||||
} catch (ValidateException $e) {
|
||||
// 验证失败 输出错误信息
|
||||
return to_assign(0, $e->getError());
|
||||
$where = array();
|
||||
$where[] = ['status', '>=', 0];
|
||||
$rows = empty($param['limit']) ? get_config(app.page_size) : $param['limit'];
|
||||
$content = Db::name('config')
|
||||
->where($where)
|
||||
->paginate($rows, false, ['query' => $param]);
|
||||
return table_assign(1, '', $content);
|
||||
}
|
||||
|
||||
//添加
|
||||
public function add()
|
||||
{
|
||||
$id = empty(get_params('id')) ? 0 : get_params('id');
|
||||
if ($id > 0) {
|
||||
$config = Db::name('config')->where(['id' => $id])->find();
|
||||
View::assign('config', $config);
|
||||
}
|
||||
$conf = "<?php return ['admin_title'=>'{$param["admin_title"]}','title'=>'{$param["title"]}','keywords'=>'{$param["keywords"]}','logo'=>'{$param["logo"]}','desc'=>'{$param["desc"]}','icp'=>'{$param["icp"]}','code'=>'{$param["code"]}','domain'=>'{$param["domain"]}','version'=>'{$param["version"]}','port_cache_time'=>'{$param["port_cache_time"]}'];";
|
||||
file_put_contents(CMS_ROOT . "config/webconfig.php", $conf);
|
||||
add_log('edit',0,$param);
|
||||
return to_assign();
|
||||
View::assign('id', $id);
|
||||
return view();
|
||||
}
|
||||
|
||||
//邮箱配置
|
||||
public function email()
|
||||
//提交添加
|
||||
public function post_submit()
|
||||
{
|
||||
$conf = get_config('emailconfig');
|
||||
$emailConf = [
|
||||
'smtp' => empty($conf['smtp']) ? '' : $conf['smtp'],
|
||||
'username' => empty($conf['username']) ? '' : $conf['username'],
|
||||
'password' => empty($conf['password']) ? '' : $conf['password'],
|
||||
'port' => empty($conf['port']) ? '' : $conf['port'],
|
||||
'email' => empty($conf['email']) ? '' : $conf['email'],
|
||||
'from' => empty($conf['from']) ? '' : $conf['from'],
|
||||
'template' => empty($conf['template']) ? '' : $conf['template'],
|
||||
];
|
||||
return view('', ['emailConf' => $emailConf]);
|
||||
}
|
||||
|
||||
//提交邮箱配置
|
||||
public function email_submit()
|
||||
{
|
||||
$param = get_params();
|
||||
try {
|
||||
validate(ConfCheck::class)->scene('email')->check($param);
|
||||
} catch (ValidateException $e) {
|
||||
// 验证失败 输出错误信息
|
||||
return to_assign(0, $e->getError());
|
||||
if ($this->request->isPost()) {
|
||||
$param = get_params();
|
||||
try {
|
||||
validate(ConfCheck::class)->check($param);
|
||||
} catch (ValidateException $e) {
|
||||
// 验证失败 输出错误信息
|
||||
return to_assign(0, $e->getError());
|
||||
}
|
||||
if (!empty($param['id']) && $param['id'] > 0) {
|
||||
$param['update_time'] = time();
|
||||
$res = Db::name('config')->strict(false)->field(true)->update($param);
|
||||
if($res) add_log('edit',$param['id'],$param);
|
||||
return to_assign();
|
||||
} else {
|
||||
$param['create_time'] = time();
|
||||
$insertId = Db::name('config')->strict(false)->field(true)->insertGetId($param);
|
||||
if($insertId) add_log('add',$insertId,$param);
|
||||
return to_assign();
|
||||
}
|
||||
}
|
||||
$conf = "<?php return ['smtp'=>'{$param["smtp"]}','username'=>'{$param["username"]}','password'=>'{$param["password"]}','port'=>'{$param["port"]}','email'=>'{$param["email"]}','from'=>'{$param["from"]}','template'=>'{$param["template"]}'];";
|
||||
file_put_contents(CMS_ROOT . "config/emailconfig.php", $conf);
|
||||
add_log('edit',0,$param);
|
||||
return to_assign();
|
||||
}
|
||||
|
||||
//微信配置
|
||||
public function wechat()
|
||||
//删除
|
||||
public function delete()
|
||||
{
|
||||
$conf = get_config('wechatconfig');
|
||||
$wechatConf = [
|
||||
'Token' => empty($conf['Token']) ? '' : $conf['Token'],
|
||||
'appID' => empty($conf['appID']) ? '' : $conf['appID'],
|
||||
'appsecret' => empty($conf['appsecret']) ? '' : $conf['appsecret'],
|
||||
//微信支付商户号
|
||||
'MCHID' => empty($conf['MCHID']) ? '' : $conf['MCHID'],
|
||||
//微信支付API密钥
|
||||
'SECRECT_KEY' => empty($conf['SECRECT_KEY']) ? '' : $conf['SECRECT_KEY'],
|
||||
//微信支付证书路径
|
||||
'CERT_URL' => empty($conf['CERT_URL']) ? '' : $conf['CERT_URL'],
|
||||
//微信支付回调地址
|
||||
'PAY_BACK_URL' => empty($conf['PAY_BACK_URL']) ? '' : $conf['PAY_BACK_URL'],
|
||||
//微信登录回调地址
|
||||
'LOGIN_BACK_URL' => empty($conf['LOGIN_BACK_URL']) ? '' : $conf['LOGIN_BACK_URL'],
|
||||
];
|
||||
return view('', ['wechatConf' => $wechatConf]);
|
||||
}
|
||||
|
||||
//微信配置配置
|
||||
public function wechat_submit()
|
||||
{
|
||||
$param = get_params();
|
||||
try {
|
||||
validate(ConfCheck::class)->scene('wechat')->check($param);
|
||||
} catch (ValidateException $e) {
|
||||
// 验证失败 输出错误信息
|
||||
return to_assign(0, $e->getError());
|
||||
$id = get_params("id");
|
||||
$data['status'] = '-1';
|
||||
$data['id'] = $id;
|
||||
$data['update_time'] = time();
|
||||
if (Db::name('config')->update($data) !== false) {
|
||||
add_log('delete',$id,$data);
|
||||
return to_assign(1, "删除成功");
|
||||
} else {
|
||||
return to_assign(0, "删除失败");
|
||||
}
|
||||
}
|
||||
|
||||
//编辑配置
|
||||
public function edit()
|
||||
{
|
||||
$id = empty(get_params('id')) ? 0 : get_params('id');
|
||||
$conf = Db::name('config')->where('id',$id)->find();
|
||||
$config=[];
|
||||
if($conf['content']){
|
||||
$config = unserialize($conf['content']);
|
||||
}
|
||||
return view($conf['name'], ['id'=>$id,'config' => $config]);
|
||||
}
|
||||
//提交添加
|
||||
public function conf_submit()
|
||||
{
|
||||
if ($this->request->isPost()) {
|
||||
$param = get_params();
|
||||
$data['content'] = serialize($param);
|
||||
$data['update_time'] = time();
|
||||
$data['id'] = $param['id'];
|
||||
$res = Db::name('config')->strict(false)->field(true)->update($data);
|
||||
$conf = Db::name('config')->where('id',$param['id'])->find();
|
||||
clear_cache('system_config' . $conf['name']);
|
||||
if($res) add_log('edit',$param['id'],$param);
|
||||
return to_assign();
|
||||
}
|
||||
$conf = "<?php return ['Token'=>'{$param["Token"]}','LOGIN_BACK_URL' => '{$param["LOGIN_BACK_URL"]}','appID'=>'{$param["appID"]}','appsecret'=>'{$param["appsecret"]}','MCHID' => '{$param["MCHID"]}','SECRECT_KEY' => '{$param["SECRECT_KEY"]}','CERT_URL' => '{$param["CERT_URL"]}','PAY_BACK_URL' => '{$param["PAY_BACK_URL"]}'];";
|
||||
file_put_contents(CMS_ROOT . "config/wechatconfig.php", $conf);
|
||||
add_log('edit',0,$param);
|
||||
return to_assign();
|
||||
}
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ class Menu extends BaseController
|
||||
|
||||
public function get_list()
|
||||
{
|
||||
$menu = Db::name('AdminMenu')->order('order asc')->select();
|
||||
$menu = Db::name('AdminMenu')->order('sort asc')->select();
|
||||
return to_assign(0, '', $menu);
|
||||
}
|
||||
|
||||
|
@ -122,7 +122,7 @@ class Nav extends BaseController
|
||||
$id = get_params('id');
|
||||
$navInfoList = Db::name('NavInfo')
|
||||
->where(['nav_id' => $id])
|
||||
->order('order asc')
|
||||
->order('sort asc')
|
||||
->select();
|
||||
return to_assign(0, '', $navInfoList);
|
||||
}
|
||||
@ -131,10 +131,17 @@ class Nav extends BaseController
|
||||
|
||||
public function nav_info_add()
|
||||
{
|
||||
return view('', [
|
||||
'nav_id' => get_params('nid'),
|
||||
'pid' => get_params('pid'),
|
||||
]);
|
||||
$id = empty(get_params('id')) ? 0 : get_params('id');
|
||||
View::assign('id', $id);
|
||||
View::assign('nav_id', get_params('nid'));
|
||||
View::assign('pid', get_params('pid'));
|
||||
if ($id > 0) {
|
||||
$nav = Db::name('NavInfo')->where(['id' => $id])->find();
|
||||
View::assign('nav', $nav);
|
||||
View::assign('nav_id', $nav['nav_id']);
|
||||
View::assign('pid', $nav['pid']);
|
||||
}
|
||||
return view();
|
||||
}
|
||||
|
||||
//保存添加
|
||||
@ -150,12 +157,10 @@ class Nav extends BaseController
|
||||
// 验证失败 输出错误信息
|
||||
return to_assign(0, $e->getError());
|
||||
}
|
||||
$data[$param['field']] = $param['value'];
|
||||
$data['id'] = $param['id'];
|
||||
NavInfo::strict(false)->field(true)->update($data);
|
||||
NavInfo::strict(false)->field(true)->update($param);
|
||||
// 删除导航缓存
|
||||
clear_cache('homeNav');
|
||||
add_log('edit',$param['id'], $data);
|
||||
add_log('edit',$param['id'], $param);
|
||||
return to_assign();
|
||||
} else {
|
||||
try {
|
||||
|
@ -26,7 +26,12 @@ class Auth
|
||||
// 验证用户访问权限
|
||||
if ($action !== 'index' && $action !== 'api') {
|
||||
if (!$this->checkAuth($controller, $pathInfo, $action, Session::get($session_admin)['id'])) {
|
||||
return $request->isAjax() ? to_assign(202, '你没有权限!') : redirect((string) url('/admin/login/errorshow'));
|
||||
if($request->isAjax()){
|
||||
return to_assign(202, '你没有权限,请联系超级管理员!');
|
||||
}
|
||||
else{
|
||||
echo '<div style="text-align:center;color:red;margin-top:20%;">您没有权限,请联系超级管理员</div>';exit;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -5,44 +5,14 @@ use think\Validate;
|
||||
class ConfCheck extends Validate
|
||||
{
|
||||
protected $rule = [
|
||||
'title' => 'require',
|
||||
'admin_title' => 'require',
|
||||
'smtp' => 'require',
|
||||
'username' => 'require',
|
||||
'password' => 'require',
|
||||
'port' => 'require',
|
||||
'email' => 'require',
|
||||
'from' => 'require',
|
||||
'appkey' => 'require',
|
||||
'secretkey' => 'require',
|
||||
'FreeSignName' => 'require',
|
||||
'Token' => 'require',
|
||||
'appID' => 'require',
|
||||
'appsecret' => 'require',
|
||||
'LOGIN_BACK_URL' => 'require',
|
||||
'title' => 'require|unique:config',
|
||||
'name' => 'require|unique:config'
|
||||
];
|
||||
|
||||
protected $message = [
|
||||
'title.require' => '网站标题不能为空',
|
||||
'admin_title.require' => '后台标题不能为空',
|
||||
'smpt.require' => 'SMTP服务器地址不能为空',
|
||||
'username.require' => '邮箱账户不能为空',
|
||||
'password.require' => '密码不能为空',
|
||||
'port.require' => '端口不能为空',
|
||||
'email.require' => '发送者邮箱不能为空',
|
||||
'from.require' => '要显示的发送者信息不能为空',
|
||||
'appkey.require' => 'appkey不能为空',
|
||||
'secretkey.require' => 'secretkey不能为空',
|
||||
'FreeSignName.require' => '签名不能为空',
|
||||
'Token.require' => 'Token不能为空',
|
||||
'appID.require' => 'appID不能为空',
|
||||
'appsecret.require' => 'appsecret不能为空',
|
||||
'LOGIN_BACK_URL.require' => '微信授权登录回到地址不能为空',
|
||||
];
|
||||
|
||||
protected $scene = [
|
||||
'web' => ['title', 'admin_title'],
|
||||
'email' => ['smtp', 'username', 'password', 'port', 'email', 'from'],
|
||||
'wechat' => ['Token', 'appID', 'appsecret','LOGIN_BACK_URL'],
|
||||
'title.require' => '配置名称不能为空',
|
||||
'name.require' => '配置标识不能为空',
|
||||
'title.unique' => '同样的配置名称已经存在',
|
||||
'name.unique' => '同样的配置标识已经存在'
|
||||
];
|
||||
}
|
@ -10,8 +10,7 @@ class NavCheck extends Validate
|
||||
'name' => 'require|unique:nav',
|
||||
'id' => 'require',
|
||||
'status' => 'require',
|
||||
'slide_id' => 'require',
|
||||
'field' => 'require',
|
||||
'slide_id' => 'require'
|
||||
];
|
||||
|
||||
protected $message = [
|
||||
@ -29,6 +28,6 @@ class NavCheck extends Validate
|
||||
'add' => ['title', 'name', 'status'],
|
||||
'edit' => ['id', 'title', 'name', 'status'],
|
||||
'addInfo' => ['title', 'nav_id'],
|
||||
'editInfo' => ['id', 'field'],
|
||||
'editInfo' => ['id', 'title'],
|
||||
];
|
||||
}
|
||||
|
@ -60,27 +60,25 @@
|
||||
<input type="text" name="origin_url" class="layui-input" autocomplete="off" placeholder="请输入来源链接">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray2">缩略图</td>
|
||||
<td colspan="7">
|
||||
<div class="layui-upload">
|
||||
<button type="button" class="layui-btn layui-btn-normal layui-btn-sm" id="test1">上传缩略图(尺寸:498x280)</button>
|
||||
<div class="layui-upload-list" id="demo1">
|
||||
<img src="" style="max-width: 100%; height:100px;" />
|
||||
<input type="hidden" name="thumb" value="">
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray2" style="vertical-align:top;">摘要</td>
|
||||
<td colspan="7">
|
||||
<td colspan="3">
|
||||
<textarea name="desc" placeholder="请输入摘要,不能超过200个字" class="layui-textarea"></textarea>
|
||||
</td>
|
||||
<td class="layui-td-gray2" style="vertical-align:top;">缩略图</td>
|
||||
<td>
|
||||
<div class="layui-upload">
|
||||
<button type="button" class="layui-btn layui-btn-normal layui-btn-sm" id="test1">上传缩略图(尺寸:498x280)</button>
|
||||
<div class="layui-upload-list" id="demo1" style="width: 120px; height:66px; overflow: hidden;">
|
||||
<img src="" style="max-width: 100%; height:66px;" />
|
||||
<input type="hidden" name="thumb" value="">
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray2" style="vertical-align:top;">内容</td>
|
||||
<td colspan="7">
|
||||
<td colspan="5">
|
||||
<textarea name="content" placeholder="请输入内容" class="layui-textarea" id="container" lay-verify="required"
|
||||
style="border:0;padding:0"></textarea>
|
||||
</td>
|
||||
|
@ -65,26 +65,24 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray2">缩略图</td>
|
||||
<td colspan="7">
|
||||
<td class="layui-td-gray2" style="vertical-align:top;">摘要</td>
|
||||
<td colspan="3">
|
||||
<textarea name="desc" placeholder="请输入摘要,不能超过200个字" class="layui-textarea">{$article.desc}</textarea>
|
||||
</td>
|
||||
<td class="layui-td-gray2" style="vertical-align:top;">缩略图</td>
|
||||
<td>
|
||||
<div class="layui-upload">
|
||||
<button type="button" class="layui-btn layui-btn-normal layui-btn-sm" id="test1">上传缩略图(尺寸:498x280)</button>
|
||||
<div class="layui-upload-list" id="demo1">
|
||||
<img src="{:get_file($article.thumb)}" style="max-width: 100%; height:100px;" />
|
||||
<div class="layui-upload-list" id="demo1" style="width: 120px; height:66px; overflow: hidden;">
|
||||
<img src="{:get_file($article.thumb)}" style="max-width: 100%; height:66px;" />
|
||||
<input type="hidden" name="thumb" value="{$article.thumb}">
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray2" style="vertical-align:top;">摘要</td>
|
||||
<td colspan="7">
|
||||
<textarea name="desc" placeholder="请输入摘要,不能超过200个字" class="layui-textarea">{$article.desc}</textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray2" style="vertical-align:top;">内容</td>
|
||||
<td colspan="7">
|
||||
<td colspan="5">
|
||||
<textarea name="content" placeholder="请输入内容" class="layui-textarea" id="container" lay-verify="required"
|
||||
style="border:0;padding:0">{$article.content}</textarea>
|
||||
</td>
|
||||
|
@ -16,8 +16,8 @@
|
||||
<meta name="description" content="{:get_config('webconfig.desc')}"/>
|
||||
{/block}
|
||||
{block name="css"}
|
||||
<link rel="stylesheet" href="{__LAYUI__}/css/layui.css?v={:get_config('webconfig.version')}" media="all">
|
||||
<link rel="stylesheet" href="{__ADMIN_CSS__}/common.css?v={:get_config('webconfig.version')}" media="all">
|
||||
<link rel="stylesheet" href="{__LAYUI__}/css/layui.css?v={:get_system_config('web','version')}" media="all">
|
||||
<link rel="stylesheet" href="{__ADMIN_CSS__}/common.css?v={:get_system_config('web','version')}" media="all">
|
||||
{/block}
|
||||
{block name="style"}{/block}
|
||||
{block name="js"}
|
||||
|
82
app/admin/view/conf/add.html
Normal file
@ -0,0 +1,82 @@
|
||||
{extend name="common/base"/}
|
||||
<!-- 主体 -->
|
||||
{block name="body"}
|
||||
<form class="layui-form body-content">
|
||||
<table class="layui-table layui-table-form">
|
||||
<tr>
|
||||
<td class="layui-td-gray2">配置名称<font>*</font>
|
||||
</td>
|
||||
<td>
|
||||
<input type="hidden" name="id" value="{$id}" />
|
||||
<input type="text" name="title" lay-verify="required" autocomplete="off" placeholder="请输入配置名称"
|
||||
class="layui-input" {notempty name="$config.title"}
|
||||
value="{$config.title}" {/notempty}>
|
||||
</td>
|
||||
<td class="layui-td-gray2">状态<font>*</font></td>
|
||||
<td>{if condition="$id eq 0"}
|
||||
<input type="radio" name="status" value="1" title="正常" checked>
|
||||
<input type="radio" name="status" value="0" title="禁用">
|
||||
{else/}
|
||||
<input type="radio" name="status" value="1" title="正常" {eq name="$config.status" value="1"
|
||||
}checked{/eq}>
|
||||
<input type="radio" name="status" value="0" title="禁用" {eq name="$config.status" value="0"
|
||||
}checked{/eq}>
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray2" style="vertical-align: top;">
|
||||
配置标识<font>*</font>
|
||||
</td>
|
||||
<td colspan="3">
|
||||
<input style="width: 300px;" type="text" name="name" placeholder="请输入配置标识" lay-verify="required" autocomplete="off" class="layui-input" {notempty name="$config.name"} value="{$config.name}" {/notempty}>
|
||||
<span style ="color: red; font-size: 12px; margin-top: 5px;">(注意:新增配置项以后,需要对应新增模板文件,模板文件名称需与标识名称一致,建议复制现有的配置模板文件,然后根据需求修改对应的表单即可)</span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div style="padding: 10px 0">
|
||||
<button class="layui-btn layui-btn-normal" lay-submit="" lay-filter="webform">立即提交</button>
|
||||
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
|
||||
<button lay-event="back" class="layui-btn layui-btn-primary">返回</button>
|
||||
</div>
|
||||
</form>
|
||||
{/block}
|
||||
<!-- /主体 -->
|
||||
|
||||
<!-- 脚本 -->
|
||||
{block name="script"}
|
||||
<script>
|
||||
function init(layui) {
|
||||
var form = layui.form
|
||||
, layer = layui.layer;
|
||||
|
||||
//监听提交
|
||||
form.on('submit(webform)', function (data) {
|
||||
$.ajax({
|
||||
url: "/admin/conf/post_submit",
|
||||
type: 'post',
|
||||
data: data.field,
|
||||
success: function (e) {
|
||||
if (e.code == 1) {
|
||||
layer.confirm('保存成功,返回列表页吗?', { icon: 3, title: '提示' }, function (index) {
|
||||
history.back(-1);
|
||||
layer.close(index);
|
||||
});
|
||||
} else {
|
||||
layer.msg(e.msg);
|
||||
}
|
||||
}
|
||||
})
|
||||
return false;
|
||||
});
|
||||
//监听返回
|
||||
$('.body-content').on('click', '[lay-event="back"]', function () {
|
||||
history.back(-1);
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
{include file="common/layui" base='base' extend="[]" use="['form']" callback="init" /}
|
||||
{/block}
|
||||
<!-- /脚本 -->
|
@ -8,8 +8,9 @@
|
||||
<td class="layui-td-gray2">SMTP地址<font>*</font>
|
||||
</td>
|
||||
<td>
|
||||
<input type="hidden" name="id" value="{$id}">
|
||||
<input type="text" name="smtp" lay-verify="required" autocomplete="off" placeholder="请输入SMTP服务器地址"
|
||||
class="layui-input" value="{$emailConf.smtp}" style="width:240px;display: inline-block;">
|
||||
class="layui-input" {notempty name="$config.smtp"} value="{$config.smtp}" {/notempty} style="width:240px;display: inline-block;">
|
||||
<span style="color:#999; font-size:12px;">如:QQ邮箱的SMTP服务器地址是smtp.qq.com,163邮箱的SMTP服务器地址是smtp.163.com</span>
|
||||
</td>
|
||||
</tr>
|
||||
@ -18,7 +19,7 @@
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="port" lay-verify="required" autocomplete="off" placeholder="请输入端口"
|
||||
class="layui-input" value="{$emailConf.port}" style="width:240px;display: inline-block;">
|
||||
class="layui-input" {notempty name="$config.port"} value="{$config.port}" {/notempty} style="width:240px;display: inline-block;">
|
||||
<span style="color:#999; font-size:12px;">如:QQ邮箱的ssl协议方式端口号是465/587,163邮箱的ssl协议方式端口号是465/994</span>
|
||||
</td>
|
||||
</tr>
|
||||
@ -27,7 +28,7 @@
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="username" lay-verify="required" autocomplete="off" placeholder="请输入邮箱用户名"
|
||||
class="layui-input" value="{$emailConf.username}" style="width:240px;display: inline-block;">
|
||||
class="layui-input" {notempty name="$config.username"} value="{$config.username}" {/notempty} style="width:240px;display: inline-block;">
|
||||
<span style="color:#999; font-size:12px;">如:gougucms@qq.com</span>
|
||||
</td>
|
||||
</tr>
|
||||
@ -36,7 +37,7 @@
|
||||
</td>
|
||||
<td>
|
||||
<input type="password" name="password" lay-verify="required" autocomplete="off" placeholder="请输入邮箱密码"
|
||||
class="layui-input" value="{$emailConf.password}" style="width:240px;display: inline-block;">
|
||||
class="layui-input" {notempty name="$config.password"} value="{$config.password}" {/notempty} style="width:240px;display: inline-block;">
|
||||
<span style="color:#999; font-size:12px;">
|
||||
不一定是登录密码,如QQ邮箱的是第三方授权登录码,要自己去开启,在邮箱的设置->账户->POP3/IMAP/SMTP/Exchange/CardDAV/CalDAV服务</span>
|
||||
</td>
|
||||
@ -47,7 +48,7 @@
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="from" lay-verify="required" autocomplete="off" placeholder="请输入要显示的发送者"
|
||||
class="layui-input" value="{$emailConf.from}" style="width:240px; display: inline-block;">
|
||||
class="layui-input" {notempty name="$config.from"} value="{$config.from}" {/notempty} style="width:240px; display: inline-block;">
|
||||
<span style="color:#999; font-size:12px;">用于展示给发送方,如:勾股CMS系统管理员</span>
|
||||
</td>
|
||||
</tr>
|
||||
@ -56,13 +57,13 @@
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="email" lay-verify="required" autocomplete="off" placeholder="请输入要显示的发送者邮箱"
|
||||
class="layui-input" value="{$emailConf.email}" style="width:240px;display: inline-block;">
|
||||
class="layui-input" {notempty name="$config.email"} value="{$config.email}" {/notempty} style="width:240px;display: inline-block;">
|
||||
<span style="color:#999;font-size:12px;">可以不同于上面的账户,用于展示给发送方的邮箱,如:admin@gougucms.com</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray2">邮件模板</td>
|
||||
<td><textarea name="template" placeholder="" class="layui-textarea" id="container" style="border:0;padding:0">{$emailConf.template}</textarea></td>
|
||||
<td><textarea name="template" placeholder="" class="layui-textarea" id="container" style="border:0;padding:0">{notempty name="$config.template"}{$config.template}{/notempty}</textarea></td>
|
||||
</tr>
|
||||
</table>
|
||||
<div style="padding: 10px 0">
|
||||
@ -84,13 +85,13 @@
|
||||
//监听提交
|
||||
form.on('submit(webform)', function (data) {
|
||||
$.ajax({
|
||||
url: "/admin/conf/email_submit",
|
||||
url: "/admin/conf/conf_submit",
|
||||
type: 'post',
|
||||
data: data.field,
|
||||
success: function (e) {
|
||||
if (e.code == 1) {
|
||||
layer.confirm('保存成功,关闭本页面吗?', { icon: 3, title: '提示' }, function (index) {
|
||||
$('.ittab-tab .layui-tab-title .layui-this i', parent.document).click();
|
||||
history.back(-1);
|
||||
layer.close(index);
|
||||
});
|
||||
} else {
|
||||
|
109
app/admin/view/conf/index.html
Normal file
@ -0,0 +1,109 @@
|
||||
{extend name="common/base"/}
|
||||
<!-- 主体 -->
|
||||
{block name="body"}
|
||||
<div class="body-content">
|
||||
<table class="layui-hide" id="test" lay-filter="test"></table>
|
||||
</div>
|
||||
|
||||
<script type="text/html" id="status">
|
||||
<i class="layui-icon {{# if(d.status == 1){ }}layui-icon-ok{{# } else { }}layui-icon-close{{# } }}"></i>
|
||||
</script>
|
||||
<script type="text/html" id="toolbarDemo">
|
||||
<div class="layui-btn-container">
|
||||
<a class="layui-btn layui-btn-normal layui-btn-sm" href="/admin/conf/add">添加配置项</a>
|
||||
</div>
|
||||
</script>
|
||||
{/block}
|
||||
<!-- /主体 -->
|
||||
|
||||
<!-- 脚本 -->
|
||||
{block name="script"}
|
||||
<script>
|
||||
function init(layui) {
|
||||
var table = layui.table,
|
||||
form = layui.form;
|
||||
|
||||
var tableIns = table.render({
|
||||
elem: '#test',
|
||||
title: '配置列表',
|
||||
toolbar: '#toolbarDemo',
|
||||
url: '/admin/conf/get_list',
|
||||
page: true, //开启分页
|
||||
limit: 20,
|
||||
cols: [
|
||||
[{
|
||||
field: 'id',
|
||||
width: 80,
|
||||
title: 'ID编号',
|
||||
align: 'center'
|
||||
},{
|
||||
field: 'title',
|
||||
title: '配置名称'
|
||||
}, {
|
||||
field: 'name',
|
||||
title: '配置标识(新增的模板文件名称需与标识名称一致)'
|
||||
},{
|
||||
field: 'status',
|
||||
width: 80,
|
||||
title: '状态',
|
||||
templet: '#status',
|
||||
align: 'center'
|
||||
}, {
|
||||
width: 200,
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
templet: function (d) {
|
||||
var html = '';
|
||||
var delBtn = '<a class="layui-btn layui-btn-xs" href="/admin/conf/add?id=' + d.id + '">修改</a><a class="layui-btn layui-btn-normal layui-btn-xs" href="/admin/conf/edit?id=' + d.id + '">编辑配置</a><a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>';
|
||||
return delBtn;
|
||||
}
|
||||
}]
|
||||
]
|
||||
});
|
||||
|
||||
//监听搜索提交
|
||||
form.on('submit(webform)', function (data) {
|
||||
if (data.field.keywords) {
|
||||
tableIns.reload({
|
||||
where: {
|
||||
keywords: data.field.keywords
|
||||
},
|
||||
page: {
|
||||
curr: 1
|
||||
}
|
||||
});
|
||||
} else {
|
||||
location.reload();
|
||||
}
|
||||
return false;
|
||||
});
|
||||
|
||||
//删除
|
||||
table.on('tool(test)', function (obj) {
|
||||
if (obj.event === 'del') {
|
||||
layer.confirm('确定要删除吗?', {
|
||||
icon: 3,
|
||||
title: '提示'
|
||||
}, function (index) {
|
||||
$.ajax({
|
||||
url: "/admin/conf/delete",
|
||||
type: 'post',
|
||||
data: {
|
||||
id: obj.data.id
|
||||
},
|
||||
success: function (res) {
|
||||
layer.msg(res.msg);
|
||||
if (res.code == 1) {
|
||||
obj.del();
|
||||
}
|
||||
}
|
||||
})
|
||||
layer.close(index);
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
{include file="common/layui" base='base' extend="[]" use="['table','form']" callback="init" /}
|
||||
{/block}
|
||||
<!-- /脚本 -->
|
@ -8,21 +8,22 @@
|
||||
<td class="layui-td-gray2">系统名称<font>*</font>
|
||||
</td>
|
||||
<td>
|
||||
<input type="hidden" name="id" value="{$id}">
|
||||
<input type="text" name="admin_title" lay-verify="required" autocomplete="off" placeholder="请输入系统名称"
|
||||
lay-reqText="请输入系统名称" class="layui-input" value="{$webConf.admin_title}">
|
||||
lay-reqText="请输入系统名称" class="layui-input" {notempty name="$config.admin_title"} value="{$config.admin_title}" {/notempty}>
|
||||
</td>
|
||||
<td class="layui-td-gray2">网站名称<font>*</font>
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="title" lay-verify="required" autocomplete="off" placeholder="请输入网站平台名称"
|
||||
lay-reqText="请输入网站名称" class="layui-input" value="{$webConf.title}">
|
||||
lay-reqText="请输入网站名称" class="layui-input" {notempty name="$config.title"} value="{$config.title}" {/notempty}>
|
||||
</td>
|
||||
<td rowspan="3" class="layui-td-gray2">系统LOGO</td>
|
||||
<td rowspan="3" style="width: 240px;">
|
||||
<div class="layui-upload" style="width: 240px;">
|
||||
<div class="layui-upload-list" id="demo1" style="width: 100%; height:100px; overflow: hidden;">
|
||||
<img src="{$webConf.logo}" style="max-width: 100%; width: 100%;" />
|
||||
<input type="hidden" name="logo" value="{$webConf.logo}">
|
||||
<img src='{notempty name="$config.logo"}{$config.logo}{/notempty}' style="max-width: 100%; width: 100%;" />
|
||||
<input type="hidden" name="logo" {notempty name="$config.logo"} value="{$config.logo}" {/notempty}>
|
||||
</div>
|
||||
<button type="button" class="layui-btn layui-btn-normal" style="width: 100%;"
|
||||
id="test1">上传LOGO</button>
|
||||
@ -34,12 +35,12 @@
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="domain" lay-verify="required" autocomplete="off" placeholder="请输入网站域名"
|
||||
lay-reqText="请输入网站域名" class="layui-input" value="{$webConf.domain}">
|
||||
lay-reqText="请输入网站域名" class="layui-input" {notempty name="$config.domain"} value="{$config.domain}" {/notempty}>
|
||||
</td>
|
||||
<td class="layui-td-gray2">ICP备案号</td>
|
||||
<td>
|
||||
<input type="text" name="icp" autocomplete="off" placeholder="请输入ICP备案号" class="layui-input"
|
||||
value="{$webConf.icp}">
|
||||
{notempty name="$config.icp"} value="{$config.icp}" {/notempty}>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -47,7 +48,7 @@
|
||||
</td>
|
||||
<td colspan="3">
|
||||
<input type="text" name="keywords" lay-verify="required" autocomplete="off" placeholder="多个关键词用“,”隔开"
|
||||
lay-reqText="请输入SEO关键字" class="layui-input" value="{$webConf.keywords}">
|
||||
lay-reqText="请输入SEO关键字" class="layui-input" {notempty name="$config.keywords"} value="{$config.keywords}" {/notempty}>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -55,26 +56,26 @@
|
||||
</td>
|
||||
<td colspan="5">
|
||||
<textarea name="desc" lay-verify="required" placeholder="请输入网站描述" lay-reqText="请输入网站描述"
|
||||
class="layui-textarea">{$webConf.desc}</textarea>
|
||||
class="layui-textarea">{notempty name="$config.desc"}{$config.desc} {/notempty}</textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray2">统计代码</td>
|
||||
<td colspan="5">
|
||||
<textarea name="code" placeholder="请输入完整的统计代码" class="layui-textarea">{$webConf.code}</textarea>
|
||||
<textarea name="code" placeholder="请输入完整的统计代码" class="layui-textarea">{notempty name="$config.code"} value={$config.code}{/notempty}</textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray2">API缓存时间</td>
|
||||
<td>
|
||||
<input type="text" name="port_cache_time" autocomplete="off" placeholder="请输入API模块接口数据缓存时间"
|
||||
class="layui-input" value="{$webConf.port_cache_time}">
|
||||
<td class="layui-td-gray2">版权信息</td>
|
||||
<td colspan="3">
|
||||
<input type="text" name="copyright" autocomplete="off" placeholder="请输入版权信息"
|
||||
lay-reqText="请输入版权信息" class="layui-input"{notempty name="$config.copyright"} value="{$config.copyright}" {/notempty}>
|
||||
</td>
|
||||
<td class="layui-td-gray2">代码版本号<font>*</font>
|
||||
</td>
|
||||
<td colspan="3">
|
||||
<td>
|
||||
<input type="text" lay-verify="required" name="version" autocomplete="off" placeholder="请输入版本号"
|
||||
lay-reqText="请输入版本号" class="layui-input" value="{$webConf.version}">
|
||||
lay-reqText="请输入版本号" class="layui-input" {notempty name="$config.version"} value="{$config.version}" {/notempty}>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@ -115,7 +116,7 @@
|
||||
//监听提交
|
||||
form.on('submit(webform)', function (data) {
|
||||
$.ajax({
|
||||
url: "/admin/conf/web_submit",
|
||||
url: "/admin/conf/conf_submit",
|
||||
type: 'post',
|
||||
data: data.field,
|
||||
success: function (e) {
|
||||
@ -124,7 +125,7 @@
|
||||
icon: 3,
|
||||
title: '提示'
|
||||
}, function (index) {
|
||||
$('.ittab-tab .layui-tab-title .layui-this i', parent.document).click();
|
||||
history.back(-1);
|
||||
layer.close(index);
|
||||
});
|
||||
} else {
|
||||
|
@ -5,51 +5,46 @@
|
||||
<h3 style="height:36px">微信配置</h3>
|
||||
<table class="layui-table layui-table-form">
|
||||
<tr>
|
||||
<td class="layui-td-gray2">Token<font>*</font></td>
|
||||
<td>
|
||||
<input type="text" name="Token" lay-verify="required" autocomplete="off" placeholder="请输入Token" class="layui-input"
|
||||
value="{$wechatConf.Token}">
|
||||
<td class="layui-td-gray2">token<font>*</font></td>
|
||||
<td>
|
||||
<input type="hidden" value="{$id}" name="id">
|
||||
<input type="text" name="token" lay-verify="required" autocomplete="off" placeholder="请输入Token" class="layui-input" {notempty name="$config.token"} value="{$config.token}" {/notempty}>
|
||||
</td>
|
||||
<td class="layui-td-gray2">登录回调地址<font>*</font></td>
|
||||
<td>
|
||||
<input type="text" name="LOGIN_BACK_URL" lay-verify="required" autocomplete="off" placeholder="请输入微信登录回调地址" class="layui-input"
|
||||
value="{$wechatConf.LOGIN_BACK_URL}">
|
||||
<input type="text" name="login_back_url" lay-verify="required" autocomplete="off" placeholder="请输入微信登录回调地址" class="layui-input" {notempty name="$config.login_back_url"} value="{$config.login_back_url}" {/notempty}>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray2">appID<font>*</font></td>
|
||||
<td class="layui-td-gray2">appid<font>*</font></td>
|
||||
<td>
|
||||
<input type="text" name="appID" lay-verify="required" autocomplete="off" placeholder="请输入appID" class="layui-input"
|
||||
value="{$wechatConf.appID}">
|
||||
<input type="text" name="appid" lay-verify="required" autocomplete="off" placeholder="请输入appID" class="layui-input" {notempty name="$config.appid"} value="{$config.appid}" {/notempty}>
|
||||
</td>
|
||||
<td class="layui-td-gray2">appsecret<font>*</font></td>
|
||||
<td>
|
||||
<input type="text" name="appsecret" lay-verify="required" autocomplete="off" placeholder="请输入secretey" class="layui-input"
|
||||
value="{$wechatConf.appsecret}">
|
||||
<input type="text" name="appsecret" lay-verify="required" autocomplete="off" placeholder="请输入secretey" class="layui-input" {notempty name="$config.appsecret"} value="{$config.appsecret}" {/notempty}>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray2">支付商户号</td>
|
||||
<td>
|
||||
<input type="text" name="MCHID" autocomplete="off" placeholder="请输入微信支付商户号" class="layui-input"
|
||||
value="{$wechatConf.MCHID}">
|
||||
<input type="text" name="mchid" autocomplete="off" placeholder="请输入微信支付商户号" class="layui-input" {notempty name="$config.mchid"} value="{$config.mchid}" {/notempty}>
|
||||
</td>
|
||||
<td class="layui-td-gray2">支付API密钥</td>
|
||||
<td>
|
||||
<input type="text" name="SECRECT_KEY" autocomplete="off" placeholder="请输入微信支付API密钥" class="layui-input"
|
||||
value="{$wechatConf.SECRECT_KEY}">
|
||||
<input type="text" name="secrect_key" autocomplete="off" placeholder="请输入微信支付API密钥" class="layui-input"
|
||||
{notempty name="$config.secrect_key"} value="{$config.secrect_key}" {/notempty}>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray2">支付证书路径</td>
|
||||
<td>
|
||||
<input type="text" name="CERT_URL" autocomplete="off" placeholder="请输入微信支付证书路径" class="layui-input"
|
||||
value="{$wechatConf.CERT_URL}">
|
||||
<input type="text" name="cert_url" autocomplete="off" placeholder="请输入微信支付证书路径" class="layui-input"
|
||||
{notempty name="$config.cert_url"} value="{$config.cert_url}" {/notempty}>
|
||||
</td>
|
||||
<td class="layui-td-gray2">支付回调地址</td>
|
||||
<td>
|
||||
<input type="text" name="PAY_BACK_URL" autocomplete="off" placeholder="请输入微信支付回调地址" class="layui-input"
|
||||
value="{$wechatConf.PAY_BACK_URL}">
|
||||
<input type="text" name="pay_back_url" autocomplete="off" placeholder="请输入微信支付回调地址" class="layui-input" {notempty name="$config.pay_back_url"} value="{$config.pay_back_url}" {/notempty}>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@ -71,7 +66,7 @@
|
||||
//监听提交
|
||||
form.on('submit(webform)', function(data) {
|
||||
$.ajax({
|
||||
url: "/admin/conf/wechat_submit",
|
||||
url: "/admin/conf/conf_submit",
|
||||
type: 'post',
|
||||
data: data.field,
|
||||
success: function(e) {
|
||||
@ -80,7 +75,7 @@
|
||||
icon: 3,
|
||||
title: '提示'
|
||||
}, function(index) {
|
||||
$('.ittab-tab .layui-tab-title .layui-this i', parent.document).click();
|
||||
history.back(-1);
|
||||
layer.close(index);
|
||||
});
|
||||
} else {
|
||||
|
@ -129,6 +129,6 @@
|
||||
});
|
||||
};
|
||||
</script>
|
||||
{include file="common/layui" base='base' extend="[]" use="['layer','fanqiecms']" callback="init" /}
|
||||
{include file="common/layui" base='base' extend="[]" use="['layer','gougucms']" callback="init" /}
|
||||
{/block}
|
||||
<!-- /脚本 -->
|
@ -40,7 +40,7 @@
|
||||
, treeShowName: 'title'//以树形式显示的字段
|
||||
, height: 'full-0'
|
||||
, cols: [[
|
||||
{ field: 'order', width: 80, title: '排序', edit: "text", align: 'center' }
|
||||
{ field: 'sort', width: 80, title: '排序', edit: "text", align: 'center' }
|
||||
, { field: 'id', width: 80, title: 'ID号', align: 'center' }
|
||||
, { field: 'title', edit: 'text', width: 240, title: '名称', edit: "text" }
|
||||
, { field: 'icon', edit: 'text', width: 180, title: '图标<a href="{__LAYUI__}/font/extend/demo_index.html" target="_blank" style="color:#007AFF">[图标选择]</a>', edit: "text" }
|
||||
|
@ -19,13 +19,20 @@
|
||||
<table class="layui-hide" id="treeTable" lay-filter="treeTable"></table>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/html" id="target">
|
||||
<i class="layui-icon {{# if(d.target == 1){ }}layui-icon-ok{{# } else { }}layui-icon-close{{# } }}"></i>
|
||||
</script>
|
||||
<script type="text/html" id="status">
|
||||
<i class="layui-icon {{# if(d.status == 1){ }}layui-icon-ok{{# } else { }}layui-icon-close{{# } }}"></i>
|
||||
</script>
|
||||
{/block}
|
||||
<!-- /主体 -->
|
||||
|
||||
<!-- 脚本 -->
|
||||
{block name="script"}
|
||||
<script>
|
||||
var editObj = null,
|
||||
var nid = {$nav_id},
|
||||
editObj = null,
|
||||
ptable = null,
|
||||
treeGrid = null,
|
||||
tableId = 'treeTable',
|
||||
@ -35,14 +42,13 @@
|
||||
var table = layui.table;
|
||||
treeGrid = layui.treeGrid; //很重要
|
||||
layer = layui.layer;
|
||||
ittab = layui.ittab;
|
||||
ptable = treeGrid.render({
|
||||
id: tableId,
|
||||
elem: '#' + tableId,
|
||||
idField: 'id',
|
||||
url: '/admin/nav/nav_info_list', //数据接口
|
||||
where: {
|
||||
id: ittab.getParam('id')
|
||||
id:nid
|
||||
},
|
||||
cellMinWidth: 100,
|
||||
treeId: 'id', //树形id字段名称
|
||||
@ -50,10 +56,9 @@
|
||||
treeShowName: 'title', //以树形式显示的字段
|
||||
cols: [
|
||||
[{
|
||||
field: 'order',
|
||||
field: 'sort',
|
||||
width: 80,
|
||||
title: '排序',
|
||||
edit: "text",
|
||||
align: 'center'
|
||||
}, {
|
||||
field: 'id',
|
||||
@ -62,34 +67,42 @@
|
||||
align: 'center'
|
||||
}, {
|
||||
field: 'title',
|
||||
edit: 'text',
|
||||
width: 240,
|
||||
title: '名称',
|
||||
}, {
|
||||
field: 'pid',
|
||||
title: '父级ID',
|
||||
edit: "text",
|
||||
width: 80,
|
||||
align: 'center'
|
||||
}, {
|
||||
field: 'src',
|
||||
title: '链接',
|
||||
edit: "text"
|
||||
title: '链接'
|
||||
}, {
|
||||
field: 'param',
|
||||
title: '参数',
|
||||
edit: "text",
|
||||
width: 200,
|
||||
align: 'center'
|
||||
},{
|
||||
field: 'target',
|
||||
title: '新窗口打开',
|
||||
toolbar: '#target',
|
||||
align: 'center',
|
||||
width: 100
|
||||
},{
|
||||
field: 'status',
|
||||
title: '状态',
|
||||
toolbar: '#status',
|
||||
align: 'center',
|
||||
width: 60
|
||||
}, {
|
||||
width: 120,
|
||||
width: 180,
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
templet: function (d) {
|
||||
var html = '';
|
||||
var addBtn =
|
||||
'<a class="layui-btn layui-btn-normal layui-btn-xs" href="/admin/nav/nav_info_add?nid={$nav_id}&pid=' + d.id +
|
||||
'">添加</a>';
|
||||
'">添加子导航</a><a class="layui-btn layui-btn-xs" href="/admin/nav/nav_info_add?nid={$nav_id}&id=' + d.id +
|
||||
'">编辑</a>';
|
||||
var delBtn = '<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>';
|
||||
return addBtn + delBtn;
|
||||
}
|
||||
@ -97,32 +110,6 @@
|
||||
],
|
||||
page: false
|
||||
});
|
||||
//单元格编辑
|
||||
treeGrid.on('edit(' + tableId + ')', function (obj) {
|
||||
layer.confirm('确定要提交修改吗?', {
|
||||
icon: 3,
|
||||
title: '提示'
|
||||
}, function (index) {
|
||||
$.ajax({
|
||||
url: "/admin/nav/nav_info_submit",
|
||||
type: 'post',
|
||||
data: {
|
||||
id: obj.data.id,
|
||||
field: obj.field,
|
||||
value: obj.value
|
||||
},
|
||||
success: function (res) {
|
||||
if (res.code == 1) {
|
||||
layer.msg('操作成功');
|
||||
}
|
||||
else {
|
||||
layer.msg(res.msg);
|
||||
}
|
||||
}
|
||||
})
|
||||
layer.close(index);
|
||||
});
|
||||
});
|
||||
//删除
|
||||
treeGrid.on('tool(' + tableId + ')', function (obj) {
|
||||
if (obj.event === 'del') {
|
||||
@ -149,7 +136,7 @@
|
||||
});
|
||||
}
|
||||
</script>
|
||||
{include file="common/layui" base='base' extend="['treeGrid']" use="['treeGrid','layer','table','ittab']"
|
||||
{include file="common/layui" base='base' extend="['treeGrid']" use="['treeGrid','layer','table']"
|
||||
callback="init" /}
|
||||
{/block}
|
||||
<!-- /脚本 -->
|
@ -6,6 +6,7 @@
|
||||
<tr>
|
||||
<td class="layui-td-gray2">父级导航<font>*</font></td>
|
||||
<td>
|
||||
<input type="hidden" name="id" value="{$id}"/>
|
||||
<input type="hidden" name="nav_id" value="{$nav_id}"/>
|
||||
<select name="pid" lay-verify="required" lay-reqText="请选择父级导航" >
|
||||
<option value="0">作为顶级导航</option>
|
||||
@ -14,19 +15,49 @@
|
||||
{/volist}
|
||||
</select>
|
||||
</td>
|
||||
<td class="layui-td-gray2">名称<font>*</font></td>
|
||||
<td class="layui-td-gray2">排序</td>
|
||||
<td>
|
||||
<input type="text" name="title" lay-verify="required" autocomplete="off" placeholder="请输入名称" lay-reqText="请输入名称" class="layui-input">
|
||||
<input type="text" name="sort" autocomplete="off" class="layui-input" {notempty name="$nav.sort" }value="{$nav.sort}"{else/}value="0" {/notempty}>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray2">路径</td>
|
||||
<td class="layui-td-gray2">导航名称<font>*</font></td>
|
||||
<td>
|
||||
<input type="text" name="src" placeholder="请输入导航路径,可空" autocomplete="off" class="layui-input">
|
||||
<input type="text" name="title" lay-verify="required" autocomplete="off" placeholder="请输入名称" lay-reqText="请输入名称" class="layui-input" {notempty name="$nav.title" }value="{$nav.title}"{/notempty}>
|
||||
</td>
|
||||
<td class="layui-td-gray2">网址链接</td>
|
||||
<td>
|
||||
<input type="text" name="src" placeholder="请输入导航网址链接,可空" autocomplete="off" class="layui-input" {notempty name="$nav.src" }value="{$nav.src}"{/notempty}>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray2">参数</td>
|
||||
<td>
|
||||
<input type="text" name="param" placeholder="请输入导航参数,可空" autocomplete="off" class="layui-input">
|
||||
<input type="text" name="param" placeholder="请输入导航参数,可空" autocomplete="off" class="layui-input" {notempty name="$nav.param" }value="{$nav.param}"{/notempty}>
|
||||
</td>
|
||||
<td class="layui-td-gray2">是否新窗口打开
|
||||
</td>
|
||||
<td>
|
||||
{if condition="$id eq 0"}
|
||||
<input type="radio" name="target" value="0" title="否" checked>
|
||||
<input type="radio" name="target" value="1" title="是">
|
||||
{else/}
|
||||
<input type="radio" name="target" value="0" title="否" {eq name="$nav.target" value="0" }checked{/eq}>
|
||||
<input type="radio" name="target" value="1" title="是" {eq name="$nav.target" value="1" }checked{/eq}>
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray2">状态<font>*</font>
|
||||
</td>
|
||||
<td colspan="3">
|
||||
{if condition="$id eq 0"}
|
||||
<input type="radio" name="status" value="1" title="正常" checked>
|
||||
<input type="radio" name="status" value="-1" title="禁用">
|
||||
{else/}
|
||||
<input type="radio" name="status" value="1" title="正常" {eq name="$nav.status" value="1" }checked{/eq}>
|
||||
<input type="radio" name="status" value="-1" title="禁用" {eq name="$nav.status" value="-1" }checked{/eq}>
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
@ -155,6 +155,6 @@
|
||||
}
|
||||
|
||||
</script>
|
||||
{include file="common/layui" base='base' extend="[]" use="['tree', 'form', 'layer', 'ittab']" callback="init" /}
|
||||
{include file="common/layui" base='base' extend="[]" use="['tree', 'form', 'layer']" callback="init" /}
|
||||
{/block}
|
||||
<!-- /脚本 -->
|
@ -2,13 +2,52 @@
|
||||
// 应用公共文件
|
||||
use think\facade\Cache;
|
||||
use think\facade\Config;
|
||||
use think\facade\Db;
|
||||
use think\facade\Request;
|
||||
//取系统配置
|
||||
|
||||
//设置缓存
|
||||
function set_cache($key, $value, $date = 86400)
|
||||
{
|
||||
Cache::set($key, $value, $date);
|
||||
}
|
||||
|
||||
//读取缓存
|
||||
function get_cache($key)
|
||||
{
|
||||
return Cache::get($key);
|
||||
}
|
||||
|
||||
//清空缓存
|
||||
function clear_cache($key)
|
||||
{
|
||||
Cache::clear($key);
|
||||
}
|
||||
|
||||
|
||||
//读取文件配置
|
||||
function get_config($key)
|
||||
{
|
||||
return Config::get($key);
|
||||
}
|
||||
|
||||
//读取系统配置
|
||||
function get_system_config($name,$key)
|
||||
{
|
||||
$config=[];
|
||||
if (get_cache('system_config' . $name)) {
|
||||
$config = get_cache('system_config' . $name);
|
||||
} else {
|
||||
$conf = Db::name('config')->where('name',$name)->find();
|
||||
if($conf['content']){
|
||||
$config = unserialize($conf['content']);
|
||||
}
|
||||
set_cache('system_config' . $name, $config);
|
||||
}
|
||||
if($config[$key]){
|
||||
return $config[$key];
|
||||
}
|
||||
}
|
||||
|
||||
//系统信息
|
||||
function get_system_info($key)
|
||||
{
|
||||
@ -52,24 +91,6 @@ function set_password($pwd, $salt)
|
||||
return md5(md5($pwd . $salt) . $salt);
|
||||
}
|
||||
|
||||
//设置缓存
|
||||
function set_cache($key, $value, $date = 86400)
|
||||
{
|
||||
Cache::set($key, $value, $date);
|
||||
}
|
||||
|
||||
//读取缓存
|
||||
function get_cache($key)
|
||||
{
|
||||
Cache::get($key);
|
||||
}
|
||||
|
||||
//情况缓存
|
||||
function clear_cache($key)
|
||||
{
|
||||
Cache::clear($key);
|
||||
}
|
||||
|
||||
//判断cms是否完成安装
|
||||
function is_installed()
|
||||
{
|
||||
@ -214,10 +235,10 @@ function get_file($id)
|
||||
return $url;
|
||||
} elseif ($geturl['status'] == 0) {
|
||||
//待审核
|
||||
return '/themes/admin_themes/lib/static/images/none_pic.jpg';
|
||||
return '/static/admin/images/none_pic.jpg';
|
||||
} else {
|
||||
//不通过
|
||||
return '/themes/admin_themes/lib/static/images/none_pic.jpg';
|
||||
return '/static/admin/images/none_pic.jpg';
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
@ -72,6 +72,8 @@ abstract class BaseController
|
||||
$params['nickname'] = $info['nickname'];
|
||||
$params['username'] = $info['username'];
|
||||
}
|
||||
$COMMON_NAV = get_navs('NAV_HOME');
|
||||
View::assign('COMMON_NAV', $COMMON_NAV);
|
||||
View::assign('webconfig', get_config('webconfig'));
|
||||
View::assign('params', $params);
|
||||
View::assign('login_class', $login_class);
|
||||
|
@ -90,7 +90,7 @@ function get_navs($name)
|
||||
if (empty($nav_id)) {
|
||||
return '';
|
||||
}
|
||||
$list = \think\facade\Db::name('NavInfo')->where(['nav_id' => $nav_id, 'status' => 1])->select();
|
||||
$list = \think\facade\Db::name('NavInfo')->where(['nav_id' => $nav_id, 'status' => 1])->order('sort asc')->select();
|
||||
\think\facade\Cache::tag('homeNav')->set('homeNav' . $name, $list);
|
||||
}
|
||||
$navs = get_cache('homeNav' . $name);
|
||||
|
@ -1,168 +0,0 @@
|
||||
<?php
|
||||
declare (strict_types = 1);
|
||||
|
||||
namespace app\home\controller;
|
||||
|
||||
use app\home\BaseController;
|
||||
use think\facade\Db;
|
||||
use think\facade\View;
|
||||
|
||||
class Bi extends BaseController
|
||||
{
|
||||
public function set_bi_user()
|
||||
{
|
||||
$bi_user_id = get_params('bi_user_id');
|
||||
$uid = get_login_user('id');
|
||||
$res= Db::name('user')->where(['id' => $uid])->update(['bi_user_id' => $bi_user_id]);
|
||||
if($res){
|
||||
to_assign();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public function my_data()
|
||||
{
|
||||
$uid = get_login_user('id');
|
||||
$bi_user= Db::name('user')->where(['id' => $uid])->find();
|
||||
$topic = Db::name('bi_topic')->where(['uid' => $uid, 'status' => 1])->order('id asc')->select()->toArray();
|
||||
foreach ($topic as $key => $value) {
|
||||
$topic[$key]['tables'] = Db::name('bi_table')
|
||||
->where(['tid' => $value['id'], 'status' => 1])
|
||||
->select()
|
||||
->toArray();
|
||||
}
|
||||
View::assign('topic', $topic);
|
||||
View::assign('bi_user', $bi_user);
|
||||
return view();
|
||||
}
|
||||
|
||||
public function data_detail()
|
||||
{
|
||||
$id = get_params('id');
|
||||
$uid = get_login_user('id');
|
||||
$bi_user= Db::name('user')->where(['id' => $uid])->find();
|
||||
$topic = Db::name('bi_topic')->where(['id' => $id, 'uid' => $uid, 'status' => 1])->find();
|
||||
$tables = Db::name('bi_table')->where(['uid' => $uid, 'tid' => $id, 'status' => 1])->order('id asc')->select()->toArray();
|
||||
foreach ($tables as $key => $val) {
|
||||
$tables[$key]['columns'] = unserialize($val['table_columns']);
|
||||
$tables[$key]['columns_json'] = json_encode(unserialize($val['table_columns']));
|
||||
}
|
||||
View::assign('bi_user', $bi_user);
|
||||
View::assign('topic', $topic);
|
||||
View::assign('tables', $tables);
|
||||
return view();
|
||||
}
|
||||
|
||||
/**
|
||||
* 增加主题请求方法
|
||||
*/
|
||||
public function topic_add()
|
||||
{
|
||||
if ($this->request->isPost()) {
|
||||
$param = get_params();
|
||||
if (!isset($param['title'])) {
|
||||
return to_assign(0, '非法操作');
|
||||
}
|
||||
if ($param['id'] > 0) {
|
||||
$param['update_time'] = time();
|
||||
$res = Db::name('bi_topic')->where('id', $param['id'])->update($param);
|
||||
} else {
|
||||
$param['uid'] = get_login_user('id');
|
||||
$param['create_time'] = time();
|
||||
$res = Db::name('bi_topic')->strict(false)->field(true)->insertGetId($param);
|
||||
}
|
||||
if ($res) {
|
||||
// 添加操作记录
|
||||
// add_user_log($param, $msg);
|
||||
return to_assign(1, '操作成功');
|
||||
}
|
||||
}
|
||||
return to_assign(0, '非法操作');
|
||||
}
|
||||
|
||||
//删除主题请求方法
|
||||
public function topic_delete()
|
||||
{
|
||||
$id = get_params("id");
|
||||
$data['status'] = '0';
|
||||
$data['id'] = $id;
|
||||
$data['update_time'] = time();
|
||||
if (Db::name('bi_topic')->update($data) !== false) {
|
||||
// add_log('delete', $id);
|
||||
return to_assign(1, "删除成功");
|
||||
} else {
|
||||
return to_assign(0, "删除失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 增加表请求方法
|
||||
*/
|
||||
public function table_add()
|
||||
{
|
||||
if ($this->request->isPost()) {
|
||||
$param = get_params();
|
||||
if (!isset($param['title'])) {
|
||||
return to_assign(0, '非法操作');
|
||||
}
|
||||
$param['table_columns'] = serialize($param['item']);
|
||||
if ($param['id'] > 0) {
|
||||
$param['update_time'] = time();
|
||||
$res = Db::name('bi_table')->where('id', $param['id'])->strict(false)->field(true)->update($param);
|
||||
} else {
|
||||
$param['uid'] = get_login_user('id');
|
||||
$has = Db::name('bi_table')->where(['uid' => $param['uid'], 'table_name'=> $param['table_name']])->find();
|
||||
if($has){
|
||||
return to_assign(0, '操作失败,同样的表名已经存在');
|
||||
}
|
||||
$param['create_time'] = time();
|
||||
$res = Db::name('bi_table')->strict(false)->field(true)->insertGetId($param);
|
||||
}
|
||||
if ($res) {
|
||||
// 添加操作记录
|
||||
// add_user_log($param, $msg);
|
||||
return to_assign(1, '操作成功');
|
||||
}
|
||||
}
|
||||
return to_assign(0, '非法操作');
|
||||
}
|
||||
|
||||
public function table_detail()
|
||||
{
|
||||
$id = get_params('id');
|
||||
$tables = Db::name('bi_table')->where(['id' => $id])->order('id asc')->find();
|
||||
$tables['columns'] = unserialize($tables['table_columns']);
|
||||
to_assign(1,'', $tables);
|
||||
}
|
||||
|
||||
//删除主题请求方法
|
||||
public function table_delete()
|
||||
{
|
||||
$id = get_params("id");
|
||||
$data['status'] = '0';
|
||||
$data['id'] = $id;
|
||||
$data['update_time'] = time();
|
||||
if (Db::name('bi_table')->update($data) !== false) {
|
||||
// add_log('delete', $id);
|
||||
return to_assign(1, "删除成功");
|
||||
} else {
|
||||
return to_assign(0, "删除失败");
|
||||
}
|
||||
}
|
||||
|
||||
public function my_dataview()
|
||||
{
|
||||
return view();
|
||||
}
|
||||
|
||||
public function my_chart()
|
||||
{
|
||||
return view();
|
||||
}
|
||||
|
||||
public function my_report()
|
||||
{
|
||||
return view();
|
||||
}
|
||||
|
||||
}
|
@ -1,320 +0,0 @@
|
||||
{extend name="common/base"/}
|
||||
{block name="style"}
|
||||
<link rel="stylesheet" href="{__CSS__}/user.css?v={:get_config('webconfig.version')}" media="all">
|
||||
{/block}
|
||||
<!-- 主体 -->
|
||||
{block name="body"}
|
||||
{include file="common/header" nav='info' /}
|
||||
<div class="user">
|
||||
<div class="user-home"><a href="/">首页</a> - 个人中心</div>
|
||||
<div class="user-box clearfix">
|
||||
<div class="l user-menu">
|
||||
{include file="common/usermenu" nav='info' /}
|
||||
</div>
|
||||
<div class="r user-right">
|
||||
<div id="dataFile" class="data-topic">
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<th colspan="4">
|
||||
<div class="l">
|
||||
<h3>{$topic.title}</h3>
|
||||
</div>
|
||||
<div class="r"><span class="upload-post-btn table-add" data-id="{$topic.id}">添加数据表</span>
|
||||
</div>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th width="15%">表名</th>
|
||||
<th width="15%">表注释</th>
|
||||
<th width="45%">字段</th>
|
||||
<th width="25%">操作</th>
|
||||
</tr>
|
||||
{empty name="tables"}
|
||||
<tr>
|
||||
<td colspan="4">
|
||||
<div style="text-align:center; color:#999; font-size: 12px;">暂无数据表,<a href="javascript:;"
|
||||
class="table-add" style="color: #4385F5;">去新建</a></div>
|
||||
</td>
|
||||
</tr>
|
||||
{/empty}
|
||||
{volist name="tables" id="vo"}
|
||||
<tr>
|
||||
<td>{$vo.table_name}</td>
|
||||
<td>{$vo.title}</td>
|
||||
<td>
|
||||
<ul>
|
||||
{volist name="vo.columns" id="voo"}
|
||||
<li data-id="{$vo.id}">● {$voo.name}<span
|
||||
class="columns-span">[注释:{$voo.title},数据类型:{$voo.type}]</span></li>
|
||||
{/volist}
|
||||
</ul>
|
||||
</td>
|
||||
<td style="text-align: center;">
|
||||
<a href="javascript:;" class="file-add" data-uid="1" data-table="{$vo.table_name}" data-columns="{$vo.columns_json}">上传数据</a>
|
||||
<a href="javascript:;" class="table-view">预览数据</a>
|
||||
<a href="javascript:;" class="table-edit" data-id="{$vo.id}">编辑</a>
|
||||
<a href="javascript:;" class="table-del" data-id="{$vo.id}">删除</a>
|
||||
</td>
|
||||
</tr>
|
||||
{/volist}
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
<!-- /主体 -->
|
||||
|
||||
<!-- 脚本 -->
|
||||
{block name="script"}
|
||||
<script src="https://cdn.bootcdn.net/ajax/libs/xlsx/0.16.8/xlsx.core.min.js"></script>
|
||||
<script type="text/javascript" src="{__JS__}/excel.upload.js"></script>
|
||||
<script>
|
||||
var tid = '{$topic.id}';//0.13.5
|
||||
var user_id = '{$bi_user.id}';
|
||||
var user_salt = '{$bi_user.salt}';
|
||||
//远程创建bi_table
|
||||
function createBiTable(table_name,table_schema){
|
||||
var table ={
|
||||
"user_id": user_salt+user_id,
|
||||
"table_name": table_name,
|
||||
"table_schema": "CREATE TABLE cehsitablea (d DateTime, "+table_schema+")ENGINE = MergeTree PARTITION BY toYYYYMM(d) ORDER BY d;"
|
||||
};
|
||||
$.ajax({
|
||||
url: "http://i.slambase.cn:8081/v1/table",
|
||||
data: JSON.stringify(table),
|
||||
type: 'POST',
|
||||
contentType: "application/json;charset=UTF-8",
|
||||
success: function (res) {
|
||||
console.log(res);
|
||||
if (res.code == 200) {
|
||||
layer.msg('操作成功');
|
||||
window.location.reload();
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
function isCheck(val, type) {
|
||||
if (val == type) {
|
||||
return 'checked'
|
||||
}
|
||||
else {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
||||
function editTable(id, data) {
|
||||
var tableItem = '';
|
||||
for (var i = 0; i < data.columns.length; i++) {
|
||||
var index = new Date().getTime() + i;
|
||||
tableItem += '<tr class="table-edit-item" data-index="' + index + '">\
|
||||
<td><input type="text" class="bi-input" name="columns_name" value="'+ data.columns[i].name + '" autocomplete="off" placeholder="字段名,如:name"></td>\
|
||||
<td><input type="text" class="bi-input" name="columns_title" value="'+ data.columns[i].title + '" autocomplete="off" placeholder="字段注释,如:用户名"></td>\
|
||||
<td><label><input type="radio" name="columns_type'+ index + '" value="String" ' + isCheck(data.columns[i].type, 'string') + '>文本</label>\
|
||||
<label><input type="radio" name="columns_type'+ index + '" value="Int64" ' + isCheck(data.columns[i].type, 'int') + '>整数</label>\
|
||||
<label><input type="radio" name="columns_type'+ index + '" value="Float64" ' + isCheck(data.columns[i].type, 'float') + '>小数</label>\
|
||||
<label><input type="radio" name="columns_type'+ index + '" value="Date" ' + isCheck(data.columns[i].type, 'date') + '>日期</label></td>\
|
||||
<td class="table-del">删除</td>\
|
||||
</tr>';
|
||||
}
|
||||
layer.open({
|
||||
title: '数据表',
|
||||
type: 1,
|
||||
area: ['800px', '560px'],
|
||||
btn: ['提交保存'],
|
||||
btnAlign: 'c',
|
||||
yes: function(index, layero){
|
||||
var id = $('[name="table_id"]').val();
|
||||
var table_name = $('[name="table_name"]').val();
|
||||
var title = $('[name="title"]').val();
|
||||
if (table_name == '') {
|
||||
layer.msg('请完善数据表名');
|
||||
return false;
|
||||
}
|
||||
if (/^[a-z\_]*$/g.test(table_name) == false) {
|
||||
layer.msg('数据表名只能是小写字母和下划线"_"的组合');
|
||||
return false;
|
||||
}
|
||||
if (title == '') {
|
||||
layer.msg('请完善数据表注释');
|
||||
return false;
|
||||
}
|
||||
var item = $('.table-edit-item'), itemArray = [], table_schema = '', flat = 0;
|
||||
for (var i = 0; i < item.length; i++) {
|
||||
var idx = $(item[i]).data('index');
|
||||
var columns_name = $(item[i]).find('[name="columns_name"]').val();
|
||||
var columns_title = $(item[i]).find('[name="columns_title"]').val();
|
||||
var columns_type = $("input[name='columns_type" + idx + "']:checked").val();
|
||||
if (columns_name == '') {
|
||||
layer.msg('请完善第' + (i + 1) + '行的字段名');
|
||||
flat = 1;
|
||||
break;
|
||||
}
|
||||
if (/^[a-z\_]*$/g.test(columns_name) == false) {
|
||||
layer.msg('第' + (i + 1) + '行的字段名只能是小写字母和下划线"_"的组合');
|
||||
return false;
|
||||
}
|
||||
if (columns_title == '') {
|
||||
layer.msg('请完善第' + (i + 1) + '行的字段注释');
|
||||
flat = 1;
|
||||
break;
|
||||
}
|
||||
if (!columns_type) {
|
||||
layer.msg('请完善第' + (i + 1) + '行的字段类型');
|
||||
flat = 1;
|
||||
break;
|
||||
}
|
||||
if (columns_name != '' && columns_title != '' && columns_type) {
|
||||
itemArray.push({
|
||||
'name': columns_name,
|
||||
'title': columns_title,
|
||||
'type': columns_type
|
||||
})
|
||||
if(i==0){
|
||||
table_schema+=columns_name+' '+columns_type;
|
||||
}else{
|
||||
table_schema+=','+columns_name+' '+columns_type;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (flat == 0) {
|
||||
$.ajax({
|
||||
url: '/home/bi/table_add',
|
||||
data: { 'id': id, 'tid': tid, 'title': title, 'table_name': table_name, 'item': itemArray },
|
||||
type: 'post',
|
||||
success: function (res) {
|
||||
if (res.code == 1) {
|
||||
createBiTable(table_name,table_schema);
|
||||
}
|
||||
else {
|
||||
layer.msg(res.msg);
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
content: '<div class="table-box" id="tableBox">\
|
||||
<form id="tableForm">\
|
||||
<input type="hidden" name="table_id" value="'+ data.id + '">\
|
||||
<p class="table-edit-title">表信息</p>\
|
||||
表名:<input type="text" class="bi-input" name="table_name" value="'+ data.table_name + '" autocomplete="off" placeholder="表名,如:user">\
|
||||
表注释:<input type="text" class="bi-input" name="title" value="'+ data.title + '" autocomplete="off" placeholder="表注释,如:用户表">\
|
||||
<p class="table-edit-title">表字段</p>\
|
||||
<table id="tableItem"><tr><th>字段名</th><th>字段注释</th><th>字段类型</th><th>操作</th></tr>'+ tableItem + '</table></form>\
|
||||
<div class="table-edit-btn">\
|
||||
<span class="upload-post-btn table-add">+新增字段</span>\
|
||||
</div>\
|
||||
</div>',
|
||||
success: function (layero, index) {
|
||||
$('#tableBox').on('click', '.table-add', function () {
|
||||
var idx = new Date().getTime();
|
||||
var item = '<tr class="table-edit-item" data-index="' + idx + '">\
|
||||
<td><input type="text" class="bi-input" name="columns_name" value="" autocomplete="off" placeholder="字段名,如:name"></td>\
|
||||
<td><input type="text" class="bi-input" name="columns_title" value="" autocomplete="off" placeholder="字段注释,如:用户名"></td>\
|
||||
<td><label><input type="radio" name="columns_type'+ idx + '" value="String">文本</label>\
|
||||
<label><input type="radio" name="columns_type'+ idx + '" value="Int64">整数</label>\
|
||||
<label><input type="radio" name="columns_type'+ idx + '" value="Float64">小数</label>\
|
||||
<label><input type="radio" name="columns_type'+ idx + '" value="Date">日期</label></td>\
|
||||
<td><span class="table-del">删除</span></td>\
|
||||
</tr>';
|
||||
$('#tableItem').append(item);
|
||||
})
|
||||
|
||||
$('#tableBox').on('click', '.table-del', function () {
|
||||
var tr = $('#tableItem').find('tr'), that = $(this);
|
||||
if (tr.length < 4) {
|
||||
layer.msg('至少保留两个字段');
|
||||
return false;
|
||||
}
|
||||
layer.confirm('确定要删除该字段吗?', {
|
||||
icon: 3, title: '提示'
|
||||
}, function (index) {
|
||||
that.parents('tr').remove();
|
||||
layer.close(index);
|
||||
});
|
||||
})
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
//增加数据表
|
||||
$('#dataFile').on('click', '.table-add', function () {
|
||||
var id = $(this).data('id');
|
||||
var data = {
|
||||
id: 0,
|
||||
table_name: '',
|
||||
title: '',
|
||||
columns: [{
|
||||
name: '',
|
||||
title: '',
|
||||
type: ''
|
||||
}, {
|
||||
name: '',
|
||||
title: '',
|
||||
type: ''
|
||||
}]
|
||||
}
|
||||
editTable(id, data);
|
||||
})
|
||||
|
||||
//编辑数据表
|
||||
$('#dataFile').on('click', '.table-edit', function () {
|
||||
var id = $(this).data('id');
|
||||
$.ajax({
|
||||
url: "/home/bi/table_detail",
|
||||
data: {
|
||||
id: id
|
||||
},
|
||||
success: function (res) {
|
||||
if (res.code == 1) {
|
||||
var data = res.data;
|
||||
editTable(id, data);
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
//删除数据表
|
||||
$('#dataFile').on('click', '.table-del', function () {
|
||||
var id = $(this).data('id');
|
||||
layer.confirm('删除该数据表,该数据表包含的数据也会被删除,确定要删除吗?', {
|
||||
icon: 3,
|
||||
title: '提示'
|
||||
}, function (index) {
|
||||
$.ajax({
|
||||
url: "/home/bi/table_delete",
|
||||
data: {
|
||||
id: id
|
||||
},
|
||||
success: function (res) {
|
||||
if (res.code == 1) {
|
||||
layer.msg('操作成功');
|
||||
window.location.reload();
|
||||
}
|
||||
}
|
||||
})
|
||||
layer.close(index);
|
||||
});
|
||||
});
|
||||
|
||||
//上传表格
|
||||
$('#dataFile').on('click', '.file-add', function () {
|
||||
var uid = $(this).data('uid');
|
||||
var table = $(this).data('table');
|
||||
var columns = $(this).data('columns');
|
||||
uploadExcel({
|
||||
data: {'user_id':'ceshi','table_name':'ceshitable','table_schema':columns},
|
||||
success: function (file, info) {
|
||||
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{/block}
|
||||
<!-- /脚本 -->
|
@ -1,403 +0,0 @@
|
||||
{extend name="common/base"/}
|
||||
{block name="style"}
|
||||
<link rel="stylesheet" href="{__CSS__}/user.css?v={:get_config('webconfig.version')}" media="all">
|
||||
{/block}
|
||||
<!-- 主体 -->
|
||||
{block name="body"}
|
||||
{include file="common/header" /}
|
||||
<div class="user">
|
||||
<div class="user-home"><a href="/">首页</a> - 个人中心</div>
|
||||
<div class="user-box clearfix">
|
||||
<div class="l user-menu">
|
||||
{include file="common/usermenu" /}
|
||||
</div>
|
||||
<div class="r user-right">
|
||||
<div class="chart-row">
|
||||
<div class="chart-col">
|
||||
<div class="chart-card">
|
||||
<div class="chart-card-header">用户</div>
|
||||
<div class="chart-card-body">
|
||||
<div id="data1" style="width: 100%; height:300px"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="chart-col">
|
||||
<div class="chart-card">
|
||||
<div class="chart-card-header">访问量</div>
|
||||
<div class="chart-card-body">
|
||||
<div id="data2" style="width: 100%; height:300px"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="chart-col">
|
||||
<div class="chart-card">
|
||||
<div class="chart-card-header">销售量</div>
|
||||
<div class="chart-card-body">
|
||||
<div id="data3" style="width: 100%; height:300px"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="chart-col">
|
||||
<div class="chart-card">
|
||||
<div class="chart-card-header">客户来源</div>
|
||||
<div class="chart-card-body">
|
||||
<div id="data4" style="width: 100%; height:300px"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
<!-- /主体 -->
|
||||
|
||||
<!-- 脚本 -->
|
||||
{block name="script"}
|
||||
<script type="text/javascript" src="{__JS__}/echarts.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
var chartA = echarts.init(document.getElementById('data1'));
|
||||
var chartB = echarts.init(document.getElementById('data2'));
|
||||
var chartC = echarts.init(document.getElementById('data3'));
|
||||
var chartD = echarts.init(document.getElementById('data4'));
|
||||
|
||||
const dataA = {
|
||||
grid: {
|
||||
left: '10%', // 与容器左侧的距离
|
||||
right: '12%', // 与容器右侧的距离
|
||||
//top: '15%', // 与容器顶部的距离
|
||||
bottom: '12%', // 与容器底部的距离
|
||||
},
|
||||
tooltip: {
|
||||
trigger: "axis"
|
||||
},
|
||||
legend: {
|
||||
data: ["访客人数", "注册人数"],
|
||||
top: 15
|
||||
},
|
||||
calculable: !0,
|
||||
xAxis: [{
|
||||
type: "category",
|
||||
boundaryGap: !1,
|
||||
data: ["周一", "周二", "周三", "周四", "周五", "周六", "周日"]
|
||||
}],
|
||||
yAxis: [{
|
||||
show: true,
|
||||
axisLine: {
|
||||
show: true
|
||||
},
|
||||
axisTick: {
|
||||
show: true
|
||||
},
|
||||
type: "value"
|
||||
}],
|
||||
series: [{
|
||||
name: "访客人数",
|
||||
type: "line",
|
||||
data: [110, 150, 136, 130, 120, 136, 100],
|
||||
markPoint: {
|
||||
data: [{
|
||||
type: "max",
|
||||
name: "最大值"
|
||||
}, {
|
||||
type: "min",
|
||||
name: "最小值"
|
||||
}]
|
||||
},
|
||||
markLine: {
|
||||
data: [{
|
||||
type: "average",
|
||||
name: "平均值"
|
||||
}]
|
||||
}
|
||||
}, {
|
||||
name: "注册人数",
|
||||
type: "line",
|
||||
data: [10, 20, 18, 50, 32, 24, 16],
|
||||
markPoint: {
|
||||
data: [{
|
||||
type: "max",
|
||||
name: "最大值"
|
||||
}, {
|
||||
type: "min",
|
||||
name: "最小值"
|
||||
}]
|
||||
},
|
||||
markLine: {
|
||||
data: [{
|
||||
type: "average",
|
||||
name: "平均值"
|
||||
}]
|
||||
}
|
||||
}]
|
||||
};
|
||||
|
||||
const dataB = {
|
||||
grid: {
|
||||
left: '12%', // 与容器左侧的距离
|
||||
right: '6%', // 与容器右侧的距离
|
||||
//top: '15%', // 与容器顶部的距离
|
||||
bottom: '12%', // 与容器底部的距离
|
||||
},
|
||||
tooltip: {
|
||||
trigger: "axis"
|
||||
},
|
||||
legend: {
|
||||
data: ["邮件营销", "联盟广告", "视频广告", "直接访问", "搜索引擎"],
|
||||
top: 15
|
||||
},
|
||||
calculable: !0,
|
||||
xAxis: [{
|
||||
type: "category",
|
||||
boundaryGap: !1,
|
||||
data: ["周一", "周二", "周三", "周四", "周五", "周六", "周日"]
|
||||
}],
|
||||
yAxis: [{
|
||||
type: "value",
|
||||
axisLine: {
|
||||
show: true
|
||||
},
|
||||
axisTick: {
|
||||
show: true
|
||||
},
|
||||
}],
|
||||
series: [{
|
||||
name: "邮件营销",
|
||||
type: "line",
|
||||
stack: "总量",
|
||||
itemStyle: {
|
||||
normal: {
|
||||
areaStyle: {
|
||||
type: "default"
|
||||
}
|
||||
}
|
||||
},
|
||||
data: [120, 132, 101, 134, 90, 230, 210]
|
||||
}, {
|
||||
name: "联盟广告",
|
||||
type: "line",
|
||||
stack: "总量",
|
||||
itemStyle: {
|
||||
normal: {
|
||||
areaStyle: {
|
||||
type: "default"
|
||||
}
|
||||
}
|
||||
},
|
||||
data: [220, 182, 191, 234, 290, 330, 310]
|
||||
}, {
|
||||
name: "视频广告",
|
||||
type: "line",
|
||||
stack: "总量",
|
||||
itemStyle: {
|
||||
normal: {
|
||||
areaStyle: {
|
||||
type: "default"
|
||||
}
|
||||
}
|
||||
},
|
||||
data: [150, 232, 201, 154, 190, 330, 410]
|
||||
}, {
|
||||
name: "直接访问",
|
||||
type: "line",
|
||||
stack: "总量",
|
||||
itemStyle: {
|
||||
normal: {
|
||||
areaStyle: {
|
||||
type: "default"
|
||||
}
|
||||
}
|
||||
},
|
||||
data: [320, 332, 301, 334, 390, 330, 320]
|
||||
}, {
|
||||
name: "搜索引擎",
|
||||
type: "line",
|
||||
stack: "总量",
|
||||
itemStyle: {
|
||||
normal: {
|
||||
areaStyle: {
|
||||
type: "default"
|
||||
}
|
||||
}
|
||||
},
|
||||
data: [820, 932, 901, 934, 1290, 1330, 1320]
|
||||
}],
|
||||
}
|
||||
|
||||
const dataC = {
|
||||
grid: {
|
||||
left: '8%', // 与容器左侧的距离
|
||||
right: '12%', // 与容器右侧的距离
|
||||
top: '25%', // 与容器顶部的距离
|
||||
bottom: '12%', // 与容器底部的距离
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
axisPointer: {
|
||||
type: 'cross',
|
||||
label: {
|
||||
backgroundColor: '#283b56'
|
||||
}
|
||||
}
|
||||
},
|
||||
legend: {
|
||||
data: ['最新成交价', '预购队列'],
|
||||
top: 15
|
||||
},
|
||||
xAxis: [{
|
||||
type: 'category',
|
||||
boundaryGap: true,
|
||||
data: (function() {
|
||||
var now = new Date();
|
||||
var res = [];
|
||||
var len = 10;
|
||||
while (len--) {
|
||||
res.unshift(now.toLocaleTimeString().replace(/^\D*/, ''));
|
||||
now = new Date(now - 2000);
|
||||
}
|
||||
return res;
|
||||
})()
|
||||
},
|
||||
{
|
||||
type: 'category',
|
||||
boundaryGap: true,
|
||||
data: (function() {
|
||||
var res = [];
|
||||
var len = 10;
|
||||
while (len--) {
|
||||
res.push(10 - len - 1);
|
||||
}
|
||||
return res;
|
||||
})()
|
||||
}
|
||||
],
|
||||
yAxis: [{
|
||||
type: 'value',
|
||||
scale: true,
|
||||
name: '价格',
|
||||
max: 30,
|
||||
min: 0,
|
||||
boundaryGap: [0.2, 0.2],
|
||||
axisLine: {
|
||||
show: true
|
||||
},
|
||||
axisTick: {
|
||||
show: true
|
||||
},
|
||||
},
|
||||
{
|
||||
type: 'value',
|
||||
scale: true,
|
||||
name: '预购量',
|
||||
max: 1200,
|
||||
min: 0,
|
||||
boundaryGap: [0.2, 0.2]
|
||||
}
|
||||
],
|
||||
series: [{
|
||||
name: '预购队列',
|
||||
type: 'bar',
|
||||
xAxisIndex: 1,
|
||||
yAxisIndex: 1,
|
||||
data: (function() {
|
||||
var res = [];
|
||||
var len = 10;
|
||||
while (len--) {
|
||||
res.push(Math.round(Math.random() * 1000));
|
||||
}
|
||||
return res;
|
||||
})()
|
||||
},
|
||||
{
|
||||
name: '最新成交价',
|
||||
type: 'line',
|
||||
data: (function() {
|
||||
var res = [];
|
||||
var len = 0;
|
||||
while (len < 10) {
|
||||
res.push((Math.random() * 10 + 5).toFixed(1) - 0);
|
||||
len++;
|
||||
}
|
||||
return res;
|
||||
})()
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
const dataD = {
|
||||
grid: {
|
||||
left: '12%', // 与容器左侧的距离
|
||||
right: '7%', // 与容器右侧的距离
|
||||
//top: '15%', // 与容器顶部的距离
|
||||
bottom: '12%', // 与容器底部的距离
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'item',
|
||||
formatter: '{a} <br/>{b} : {c} ({d}%)'
|
||||
},
|
||||
legend: {
|
||||
top: '15',
|
||||
data: ['直接访问', '邮件营销', '联盟广告', '视频广告', '搜索引擎']
|
||||
},
|
||||
series: [{
|
||||
name: '访问来源',
|
||||
type: 'pie',
|
||||
radius: '68%',
|
||||
center: ['50%', '58%'],
|
||||
data: [{
|
||||
value: 335,
|
||||
name: '直接访问'
|
||||
},
|
||||
{
|
||||
value: 310,
|
||||
name: '邮件营销'
|
||||
},
|
||||
{
|
||||
value: 234,
|
||||
name: '联盟广告'
|
||||
},
|
||||
{
|
||||
value: 135,
|
||||
name: '视频广告'
|
||||
},
|
||||
{
|
||||
value: 1548,
|
||||
name: '搜索引擎'
|
||||
}
|
||||
],
|
||||
emphasis: {
|
||||
itemStyle: {
|
||||
shadowBlur: 10,
|
||||
shadowOffsetX: 0,
|
||||
shadowColor: 'rgba(0, 0, 0, 0.5)'
|
||||
}
|
||||
}
|
||||
}]
|
||||
}
|
||||
|
||||
chartA.setOption(dataA);
|
||||
chartB.setOption(dataB);
|
||||
chartC.setOption(dataC);
|
||||
chartD.setOption(dataD);
|
||||
|
||||
var count = 11;
|
||||
setInterval(function() {
|
||||
var axisData = (new Date()).toLocaleTimeString().replace(/^\D*/, '');
|
||||
|
||||
var data0 = dataC.series[0].data;
|
||||
var data1 = dataC.series[1].data;
|
||||
data0.shift();
|
||||
data0.push(Math.round(Math.random() * 1000));
|
||||
data1.shift();
|
||||
data1.push((Math.random() * 10 + 5).toFixed(1) - 0);
|
||||
|
||||
dataC.xAxis[0].data.shift();
|
||||
dataC.xAxis[0].data.push(axisData);
|
||||
dataC.xAxis[1].data.shift();
|
||||
dataC.xAxis[1].data.push(count++);
|
||||
|
||||
chartC.setOption(dataC);
|
||||
}, 2000);
|
||||
</script>
|
||||
{/block}
|
||||
<!-- /脚本 -->
|
@ -1,160 +0,0 @@
|
||||
{extend name="common/base"/}
|
||||
{block name="style"}
|
||||
<link rel="stylesheet" href="{__CSS__}/user.css?v={:get_config('webconfig.version')}" media="all">
|
||||
{/block}
|
||||
<!-- 主体 -->
|
||||
{block name="body"}
|
||||
{include file="common/header" nav='info' /}
|
||||
<div class="user">
|
||||
<div class="user-home"><a href="/">首页</a> - 个人中心</div>
|
||||
<div class="user-box clearfix">
|
||||
<div class="l user-menu">
|
||||
{include file="common/usermenu" nav='info' /}
|
||||
</div>
|
||||
<div class="r user-right">
|
||||
<div id="dataFile" class="data-topic">
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<th colspan="3">
|
||||
<div class="l">
|
||||
<h3>数据中心</h3>
|
||||
</div>
|
||||
<div class="r"><span class="upload-post-btn topic-edit" data-id="0"
|
||||
data-title="">添加数据主题</span></div>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th width="40%">数据主题</th>
|
||||
<th width="40%">数据表</th>
|
||||
<th width="20%">操作</th>
|
||||
</tr>
|
||||
{empty name="topic"}
|
||||
<tr>
|
||||
<td colspan="3">
|
||||
<div style="text-align:center; color:#999; font-size: 12px;">暂无主题,<a href="javascript:;"
|
||||
class="table-add topic-edit" data-id="0" data-title=""
|
||||
style="color: #4385F5;">去新建</a></div>
|
||||
</td>
|
||||
</tr>
|
||||
{/empty}
|
||||
{volist name="topic" id='vo'}
|
||||
<tr>
|
||||
<td>{$vo.title}</td>
|
||||
<td>
|
||||
{empty name="vo.tables"}
|
||||
<span style="color:#999; font-size: 12px;">暂无数据表,</span><a
|
||||
href="/home/bi/data_detail?id={$vo.id}" class="topic-view">去新建</a>
|
||||
{/empty}
|
||||
<ul>
|
||||
{volist name="vo.tables" id="voo"}
|
||||
<li data-id="1">
|
||||
● {$voo.table_name}<span class="columns-span">[注释:{$voo.title}]</span>
|
||||
</li>
|
||||
{/volist}
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
<td style="text-align: center;">
|
||||
<a href="/home/bi/data_detail?id={$vo.id}" class="topic-view">查看详细</a>
|
||||
<a href="javascript:;" class="topic-edit" data-id="{$vo.id}" data-title="{$vo.title}">编辑</a>
|
||||
<a href="javascript:;" class="topic-del" data-id="{$vo.id}">删除</a>
|
||||
</td>
|
||||
</tr>
|
||||
{/volist}
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
<!-- /主体 -->
|
||||
|
||||
<!-- 脚本 -->
|
||||
{block name="script"}
|
||||
<script>
|
||||
var bi_user_id = '{$bi_user.bi_user_id}';
|
||||
var user_id = '{$bi_user.id}';
|
||||
var user_salt = '{$bi_user.salt}';
|
||||
//远程创建bi_user
|
||||
if (bi_user_id == '') {
|
||||
$.ajax({
|
||||
url: "http://i.slambase.cn:8081/v1/user",
|
||||
data: JSON.stringify({ "user_id": user_salt+user_id }),
|
||||
type: 'POST',
|
||||
contentType: "application/json;charset=UTF-8",
|
||||
success: function (res) {
|
||||
console.log(res);
|
||||
if (res.code == 200) {
|
||||
$.ajax({
|
||||
url: "/home/bi/set_bi_user",
|
||||
data: {'bi_user_id':user_salt+user_id},
|
||||
type: 'POST',
|
||||
success: function (res) {
|
||||
console.log(res);
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
//增加&编辑主题
|
||||
$('#dataFile').on('click', '.topic-edit', function () {
|
||||
var id = $(this).data('id');
|
||||
var title = $(this).data('title');
|
||||
layer.open({
|
||||
title: '填写名称',
|
||||
type: 1,
|
||||
btn: ['提交保存'],
|
||||
btnAlign: 'c',
|
||||
yes: function (index, layero) {
|
||||
var text = $('.topic-input').val();
|
||||
if (text == '') {
|
||||
layer.msg('请先填写名称');
|
||||
return false;
|
||||
}
|
||||
$.ajax({
|
||||
url: '/home/bi/topic_add',
|
||||
data: { 'id': id, 'title': text },
|
||||
type: 'post',
|
||||
success: function (res) {
|
||||
if (res.code == 1) {
|
||||
layer.msg('操作成功');
|
||||
window.location.reload();
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
area: ['450px', '200px'],
|
||||
content: '<div class="topic-item"><input type="text" class="topic-input" value="' + title + '" autocomplete="off" placeholder="请填写名称"></div>'
|
||||
});
|
||||
})
|
||||
|
||||
//删除主题
|
||||
$('#dataFile').on('click', '.topic-del', function () {
|
||||
var id = $(this).data('id');
|
||||
layer.confirm('删除该主题,该主题包含的表格也会被删除,确定要删除吗?', {
|
||||
icon: 3,
|
||||
title: '提示'
|
||||
}, function (index) {
|
||||
$.ajax({
|
||||
url: "/home/bi/topic_delete",
|
||||
data: {
|
||||
id: id
|
||||
},
|
||||
success: function (res) {
|
||||
if (res.code == 1) {
|
||||
layer.msg('操作成功');
|
||||
}
|
||||
else {
|
||||
layer.msg(res.msg);
|
||||
window.location.reload();
|
||||
}
|
||||
}
|
||||
})
|
||||
layer.close(index);
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
{/block}
|
||||
<!-- /脚本 -->
|
@ -1,53 +0,0 @@
|
||||
{extend name="common/base"/}
|
||||
{block name="style"}
|
||||
<link rel="stylesheet" href="{__CSS__}/user.css?v={:get_config('webconfig.version')}" media="all">
|
||||
{/block}
|
||||
<!-- 主体 -->
|
||||
{block name="body"}
|
||||
{include file="common/header" nav='info' /}
|
||||
<div class="user">
|
||||
<div class="user-home"><a href="/">首页</a> - 个人中心</div>
|
||||
<div class="user-box clearfix">
|
||||
<div class="l user-menu">
|
||||
{include file="common/usermenu" nav='info' /}
|
||||
</div>
|
||||
<div class="r user-right">
|
||||
<div id="dataFile" class="data-topic">
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<th colspan="3">
|
||||
<div class="l">
|
||||
<h3>数据模型</h3>
|
||||
</div>
|
||||
<div class="r"><span class="data-upload upload-post-btn">创建数据模型</span></div>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th width="30%">标题</th>
|
||||
<th width="60%">详情</th>
|
||||
<th width="10%">操作</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3">
|
||||
<div style="padding: 20px 0; color: #999; text-align: center;">暂无数据<div
|
||||
style="padding-top: 20px;"><span class="data-upload upload-post-btn">去创建数据模型</span>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
<!-- /主体 -->
|
||||
|
||||
<!-- 脚本 -->
|
||||
{block name="script"}
|
||||
<script>
|
||||
|
||||
</script>
|
||||
{/block}
|
||||
<!-- /脚本 -->
|
@ -1,405 +0,0 @@
|
||||
{extend name="common/base"/}
|
||||
{block name="style"}
|
||||
<link rel="stylesheet" href="{__CSS__}/user.css?v={:get_config('webconfig.version')}" media="all">
|
||||
{/block}
|
||||
<!-- 主体 -->
|
||||
{block name="body"}
|
||||
{include file="common/header" nav='info' /}
|
||||
<div class="user">
|
||||
<div class="user-home"><a href="/">首页</a> - 个人中心</div>
|
||||
<div class="user-box clearfix">
|
||||
<div class="l user-menu">
|
||||
{include file="common/usermenu" nav='info' /}
|
||||
</div>
|
||||
<div class="r user-right">
|
||||
<div class="chart-detail">
|
||||
<div class="detail-box">
|
||||
<div class="detail-title">本周平台运营报告</div>
|
||||
<div class="chart-list">
|
||||
<div class="chart-box">
|
||||
<div class="chart-title">01.访客用户</div>
|
||||
<div class="chart-body">
|
||||
<div id="data1" style="width: 100%; height:300px"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="chart-box">
|
||||
<div class="chart-title">02.访问量</div>
|
||||
<div class="chart-body">
|
||||
<div id="data2" style="width: 100%; height:300px"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="chart-box">
|
||||
<div class="chart-title">03.销售量</div>
|
||||
<div class="chart-body">
|
||||
<div id="data3" style="width: 100%; height:300px"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="chart-box">
|
||||
<div class="chart-title">04.客户来源</div>
|
||||
<div class="chart-body">
|
||||
<div id="data4" style="width: 100%; height:300px"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="chart-footer">
|
||||
勾股BI
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
<!-- /主体 -->
|
||||
|
||||
<!-- 脚本 -->
|
||||
{block name="script"}
|
||||
<script type="text/javascript" src="{__JS__}/echarts.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
var chartA = echarts.init(document.getElementById('data1'));
|
||||
var chartB = echarts.init(document.getElementById('data2'));
|
||||
var chartC = echarts.init(document.getElementById('data3'));
|
||||
var chartD = echarts.init(document.getElementById('data4'));
|
||||
|
||||
const dataA = {
|
||||
grid: {
|
||||
left: '10%', // 与容器左侧的距离
|
||||
right: '12%', // 与容器右侧的距离
|
||||
//top: '15%', // 与容器顶部的距离
|
||||
bottom: '12%', // 与容器底部的距离
|
||||
},
|
||||
tooltip: {
|
||||
trigger: "axis"
|
||||
},
|
||||
legend: {
|
||||
data: ["访客人数", "注册人数"],
|
||||
top: 15
|
||||
},
|
||||
calculable: !0,
|
||||
xAxis: [{
|
||||
type: "category",
|
||||
boundaryGap: !1,
|
||||
data: ["周一", "周二", "周三", "周四", "周五", "周六", "周日"]
|
||||
}],
|
||||
yAxis: [{
|
||||
show: true,
|
||||
axisLine: {
|
||||
show: true
|
||||
},
|
||||
axisTick: {
|
||||
show: true
|
||||
},
|
||||
type: "value"
|
||||
}],
|
||||
series: [{
|
||||
name: "访客人数",
|
||||
type: "line",
|
||||
data: [110, 150, 136, 130, 120, 136, 100],
|
||||
markPoint: {
|
||||
data: [{
|
||||
type: "max",
|
||||
name: "最大值"
|
||||
}, {
|
||||
type: "min",
|
||||
name: "最小值"
|
||||
}]
|
||||
},
|
||||
markLine: {
|
||||
data: [{
|
||||
type: "average",
|
||||
name: "平均值"
|
||||
}]
|
||||
}
|
||||
}, {
|
||||
name: "注册人数",
|
||||
type: "line",
|
||||
data: [10, 20, 18, 50, 32, 24, 16],
|
||||
markPoint: {
|
||||
data: [{
|
||||
type: "max",
|
||||
name: "最大值"
|
||||
}, {
|
||||
type: "min",
|
||||
name: "最小值"
|
||||
}]
|
||||
},
|
||||
markLine: {
|
||||
data: [{
|
||||
type: "average",
|
||||
name: "平均值"
|
||||
}]
|
||||
}
|
||||
}]
|
||||
};
|
||||
|
||||
const dataB = {
|
||||
grid: {
|
||||
left: '12%', // 与容器左侧的距离
|
||||
right: '6%', // 与容器右侧的距离
|
||||
//top: '15%', // 与容器顶部的距离
|
||||
bottom: '12%', // 与容器底部的距离
|
||||
},
|
||||
tooltip: {
|
||||
trigger: "axis"
|
||||
},
|
||||
legend: {
|
||||
data: ["邮件营销", "联盟广告", "视频广告", "直接访问", "搜索引擎"],
|
||||
top: 15
|
||||
},
|
||||
calculable: !0,
|
||||
xAxis: [{
|
||||
type: "category",
|
||||
boundaryGap: !1,
|
||||
data: ["周一", "周二", "周三", "周四", "周五", "周六", "周日"]
|
||||
}],
|
||||
yAxis: [{
|
||||
type: "value",
|
||||
axisLine: {
|
||||
show: true
|
||||
},
|
||||
axisTick: {
|
||||
show: true
|
||||
},
|
||||
}],
|
||||
series: [{
|
||||
name: "邮件营销",
|
||||
type: "line",
|
||||
stack: "总量",
|
||||
itemStyle: {
|
||||
normal: {
|
||||
areaStyle: {
|
||||
type: "default"
|
||||
}
|
||||
}
|
||||
},
|
||||
data: [120, 132, 101, 134, 90, 230, 210]
|
||||
}, {
|
||||
name: "联盟广告",
|
||||
type: "line",
|
||||
stack: "总量",
|
||||
itemStyle: {
|
||||
normal: {
|
||||
areaStyle: {
|
||||
type: "default"
|
||||
}
|
||||
}
|
||||
},
|
||||
data: [220, 182, 191, 234, 290, 330, 310]
|
||||
}, {
|
||||
name: "视频广告",
|
||||
type: "line",
|
||||
stack: "总量",
|
||||
itemStyle: {
|
||||
normal: {
|
||||
areaStyle: {
|
||||
type: "default"
|
||||
}
|
||||
}
|
||||
},
|
||||
data: [150, 232, 201, 154, 190, 330, 410]
|
||||
}, {
|
||||
name: "直接访问",
|
||||
type: "line",
|
||||
stack: "总量",
|
||||
itemStyle: {
|
||||
normal: {
|
||||
areaStyle: {
|
||||
type: "default"
|
||||
}
|
||||
}
|
||||
},
|
||||
data: [320, 332, 301, 334, 390, 330, 320]
|
||||
}, {
|
||||
name: "搜索引擎",
|
||||
type: "line",
|
||||
stack: "总量",
|
||||
itemStyle: {
|
||||
normal: {
|
||||
areaStyle: {
|
||||
type: "default"
|
||||
}
|
||||
}
|
||||
},
|
||||
data: [820, 932, 901, 934, 1290, 1330, 1320]
|
||||
}],
|
||||
}
|
||||
|
||||
const dataC = {
|
||||
grid: {
|
||||
left: '8%', // 与容器左侧的距离
|
||||
right: '12%', // 与容器右侧的距离
|
||||
top: '25%', // 与容器顶部的距离
|
||||
bottom: '12%', // 与容器底部的距离
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
axisPointer: {
|
||||
type: 'cross',
|
||||
label: {
|
||||
backgroundColor: '#283b56'
|
||||
}
|
||||
}
|
||||
},
|
||||
legend: {
|
||||
data: ['最新成交价', '预购队列'],
|
||||
top: 15
|
||||
},
|
||||
xAxis: [{
|
||||
type: 'category',
|
||||
boundaryGap: true,
|
||||
data: (function () {
|
||||
var now = new Date();
|
||||
var res = [];
|
||||
var len = 10;
|
||||
while (len--) {
|
||||
res.unshift(now.toLocaleTimeString().replace(/^\D*/, ''));
|
||||
now = new Date(now - 2000);
|
||||
}
|
||||
return res;
|
||||
})()
|
||||
},
|
||||
{
|
||||
type: 'category',
|
||||
boundaryGap: true,
|
||||
data: (function () {
|
||||
var res = [];
|
||||
var len = 10;
|
||||
while (len--) {
|
||||
res.push(10 - len - 1);
|
||||
}
|
||||
return res;
|
||||
})()
|
||||
}
|
||||
],
|
||||
yAxis: [{
|
||||
type: 'value',
|
||||
scale: true,
|
||||
name: '价格',
|
||||
max: 30,
|
||||
min: 0,
|
||||
boundaryGap: [0.2, 0.2],
|
||||
axisLine: {
|
||||
show: true
|
||||
},
|
||||
axisTick: {
|
||||
show: true
|
||||
},
|
||||
},
|
||||
{
|
||||
type: 'value',
|
||||
scale: true,
|
||||
name: '预购量',
|
||||
max: 1200,
|
||||
min: 0,
|
||||
boundaryGap: [0.2, 0.2]
|
||||
}
|
||||
],
|
||||
series: [{
|
||||
name: '预购队列',
|
||||
type: 'bar',
|
||||
xAxisIndex: 1,
|
||||
yAxisIndex: 1,
|
||||
data: (function () {
|
||||
var res = [];
|
||||
var len = 10;
|
||||
while (len--) {
|
||||
res.push(Math.round(Math.random() * 1000));
|
||||
}
|
||||
return res;
|
||||
})()
|
||||
},
|
||||
{
|
||||
name: '最新成交价',
|
||||
type: 'line',
|
||||
data: (function () {
|
||||
var res = [];
|
||||
var len = 0;
|
||||
while (len < 10) {
|
||||
res.push((Math.random() * 10 + 5).toFixed(1) - 0);
|
||||
len++;
|
||||
}
|
||||
return res;
|
||||
})()
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
const dataD = {
|
||||
grid: {
|
||||
left: '12%', // 与容器左侧的距离
|
||||
right: '7%', // 与容器右侧的距离
|
||||
//top: '15%', // 与容器顶部的距离
|
||||
bottom: '12%', // 与容器底部的距离
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'item',
|
||||
formatter: '{a} <br/>{b} : {c} ({d}%)'
|
||||
},
|
||||
legend: {
|
||||
top: '15',
|
||||
data: ['直接访问', '邮件营销', '联盟广告', '视频广告', '搜索引擎']
|
||||
},
|
||||
series: [{
|
||||
name: '访问来源',
|
||||
type: 'pie',
|
||||
radius: '68%',
|
||||
center: ['50%', '58%'],
|
||||
data: [{
|
||||
value: 335,
|
||||
name: '直接访问'
|
||||
},
|
||||
{
|
||||
value: 310,
|
||||
name: '邮件营销'
|
||||
},
|
||||
{
|
||||
value: 234,
|
||||
name: '联盟广告'
|
||||
},
|
||||
{
|
||||
value: 135,
|
||||
name: '视频广告'
|
||||
},
|
||||
{
|
||||
value: 1548,
|
||||
name: '搜索引擎'
|
||||
}
|
||||
],
|
||||
emphasis: {
|
||||
itemStyle: {
|
||||
shadowBlur: 10,
|
||||
shadowOffsetX: 0,
|
||||
shadowColor: 'rgba(0, 0, 0, 0.5)'
|
||||
}
|
||||
}
|
||||
}]
|
||||
}
|
||||
|
||||
chartA.setOption(dataA);
|
||||
chartB.setOption(dataB);
|
||||
chartC.setOption(dataC);
|
||||
chartD.setOption(dataD);
|
||||
|
||||
var count = 11;
|
||||
setInterval(function () {
|
||||
var axisData = (new Date()).toLocaleTimeString().replace(/^\D*/, '');
|
||||
|
||||
var data0 = dataC.series[0].data;
|
||||
var data1 = dataC.series[1].data;
|
||||
data0.shift();
|
||||
data0.push(Math.round(Math.random() * 1000));
|
||||
data1.shift();
|
||||
data1.push((Math.random() * 10 + 5).toFixed(1) - 0);
|
||||
|
||||
dataC.xAxis[0].data.shift();
|
||||
dataC.xAxis[0].data.push(axisData);
|
||||
dataC.xAxis[1].data.shift();
|
||||
dataC.xAxis[1].data.push(count++);
|
||||
|
||||
chartC.setOption(dataC);
|
||||
}, 2000);
|
||||
</script>
|
||||
{/block}
|
||||
<!-- /脚本 -->
|
@ -45,9 +45,9 @@
|
||||
<div class="footer-bottom">
|
||||
<div class="footer-bottom-box clearfix">
|
||||
<div class="l">
|
||||
Copyright © 2020 版权所有:勾股科技有限责任公司<a href="http://www.beian.miit.gov.cn" target="_blank" rel="nofollow" style="margin-left: 15px;color:#dad8d5">粤ICP备1xxxxxx11号-1</a>
|
||||
{:get_config('webconfig.copyright')}<a href="http://www.beian.miit.gov.cn" target="_blank" rel="nofollow" style="margin-left: 15px;color:#dad8d5">粤ICP备1xxxxxx11号-1</a>
|
||||
</div>
|
||||
<div class="r">技术支持:629工作室</div>
|
||||
<div class="r">Powered by GouguCMS</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -5,18 +5,14 @@
|
||||
</div>
|
||||
<div class="r nav-menu">
|
||||
<ul>
|
||||
<li><a class="nav-a" href="/">首 页</a></li>
|
||||
<li><a class="nav-a" href="/">产品方案</a></li>
|
||||
<li><a class="nav-a" href="/">成功案例</a></li>
|
||||
<li><a class="nav-a" href="/">在线社区</a></li>
|
||||
<li><a class="nav-a" href="/">帮助中心</a></li>
|
||||
{volist name="COMMON_NAV" id="vo"}
|
||||
<li><a class="nav-a" href="{$vo.src}" {eq name="vo.target" value="1"} target="_blank"{/eq}>{$vo.title}</a></li>
|
||||
{/volist}
|
||||
<li class="{$login_class}">
|
||||
{:htmlspecialchars_decode($login_top)}
|
||||
<div class="nav-login-box">
|
||||
<div class="login-menu">
|
||||
<a href="/home/bi/my_data">我的数据</a>
|
||||
<a href="/home/bi/my_chart">我的图表</a>
|
||||
<a href="/home/bi/my_report">我的报告</a>
|
||||
<a href="/home/user/index">个人中心</a>
|
||||
</div>
|
||||
<div class="login-menu-bottom clearfix">
|
||||
<a class="l" href="/home/user/index">个人设置</a>
|
||||
|
@ -1,8 +1,4 @@
|
||||
<h3>个人中心</h3>
|
||||
<ul>
|
||||
<li {if condition="($params.action=='index') OR ($params.action=='info_edit')"} class="on"{/if}><a href="/home/user/index">个人中心</a></li>
|
||||
<li {if condition="($params.action=='my_data') OR ($params.action=='data_detail')"} class="on"{/if}><a href="/home/bi/my_data">数据中心</a></li>
|
||||
<li {if condition="$params.action=='my_dataview'"} class="on"{/if}><a href="/home/bi/my_dataview">数据模型</a></li>
|
||||
<li {if condition="$params.action=='my_chart'"} class="on"{/if}><a href="/home/bi/my_chart">数据图表</a></li>
|
||||
<li {if condition="$params.action=='my_report'"} class="on"{/if}><a href="/home/bi/my_report">数据报告</a></li>
|
||||
</ul>
|
@ -9,140 +9,80 @@
|
||||
<div class="intro">
|
||||
<div class="intro-box">
|
||||
<div class="intro-info">
|
||||
<div class="intro-title">EXCEL表格数据处理工具</div>
|
||||
<div>不懂代码也可以对数据进行分析,轻松上手;</div>
|
||||
<div>支持EXCEL文件超万条数据在线处理,毫无压力;</div>
|
||||
<div>数据图表展现完全自定义,饼图、折线图、柱状图、面积图等多种图表,无任何限制;</div>
|
||||
<div>各种图表可相互转换,同时满足生成数据面板、数据报告等日常工作需求。</div>
|
||||
<div class="intro-title">勾股CMS,让WEB开发更简单!</div>
|
||||
<div class="intro-text">勾股CMS是一套基于ThinkPHP6 + Layui + MySql打造的轻量级、高性能快速建站的内容管理系统。<br/>后台管理模块,一目了然,操作简单,通用型后台权限管理框架,紧随潮流、极低门槛、开箱即用。</div>
|
||||
</div>
|
||||
<div class="intro-ops">
|
||||
<div class="cms-download">
|
||||
<a href="#" target="_blank">立即下载</a>
|
||||
</div>
|
||||
<div class="cms-version">
|
||||
<span>当前版本:<i>1.0.0</i></span>
|
||||
<span><a href="#" rel="nofollow" target="_blank">更新日志</a></span>
|
||||
<span>下载量:<i>1021</i></span>
|
||||
</div>
|
||||
<div class="cms-other">
|
||||
<a href="https://github.com/" target="_blank" rel="nofollow" class="site-fork">
|
||||
GitHub
|
||||
</a>
|
||||
<a href="https://gitee.com/sentsin/layui" target="_blank" rel="nofollow" class="site-fork">
|
||||
码云
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<img src="{__IMG__}/home_def.png" height="300">
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<div class="chart-item-wrap">
|
||||
<a href="javascript:;"><img src="{__IMG__}/bingtu.png"><span class="sub-title">饼图</span><span class="sub-text">侧重于描述在整个系统中,每个个体所占的权重</span></a>
|
||||
<a href="javascript:;"><img src="{__IMG__}/zhexiantu.png"><span class="sub-title">折线图</span><span class="sub-text">侧重于清楚地描述出每个系别数量增减变化的情况</span></a>
|
||||
<a href="javascript:;"><img src="{__IMG__}/zhuzhuangtu.png"><span class="sub-title">条形图</span><span class="sub-text">侧重于个体的描述,能准确的知道每个项目的大小</span></a>
|
||||
<a href="javascript:;"><img src="{__IMG__}/mianjitu.png"><span class="sub-title">面积图</span><span class="sub-text">侧重于突出每个系别所占据的面积,把握整体趋势</span></a>
|
||||
<a href="javascript:;"><img src="{__IMG__}/huanxingtu.png"><span class="sub-title">环形图</span><span class="sub-text">侧重于突出总体数值的变化,使用弧线的长度表达权重</span></a>
|
||||
<div class="intro-img">
|
||||
<img src="{__IMG__}/banner_bg.png" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="advantage">
|
||||
<div class="advantage-title">特色优势</div>
|
||||
<div class="advantage-sub-title">简单易用的可视化操作和灵活高效的多维分析能力,让精细化数据洞察为商业决策保驾护航。</div>
|
||||
<div class="advantage-title">系统特色</div>
|
||||
<div class="advantage-sub-title">完全免费开源,系统易于功能扩展,代码维护,方便二次开发,满足专注业务深度开发的需求。</div>
|
||||
<div class="item-wrap">
|
||||
<div class="advantage-item">
|
||||
<div class="feature">
|
||||
<div class="part-icon"><img src="{__IMG__}/safe.png"></div>
|
||||
<div class="part-icon"><img src="{__IMG__}/code.png"></div>
|
||||
<div class="part-text">
|
||||
<h3>安全保密</h3>
|
||||
<p>采用256位SSL加密传输技术,让文件传输更安全更放心</p>
|
||||
<h3>友好的二次开发</h3>
|
||||
<p>系统采用MVC的开发模式,代码完全免费开源,注释清晰,模块相互独立,可以便捷进行二次开发。</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="advantage-item">
|
||||
<div class="feature">
|
||||
<div class="part-icon"><img src="{__IMG__}/cloud.png"></div>
|
||||
<div class="part-icon"><img src="{__IMG__}/auth.png"></div>
|
||||
<div class="part-text">
|
||||
<h3>云端处理</h3>
|
||||
<p>无需安装软件,网站在线即可轻松完成数据分析处理</p>
|
||||
<h3>精细的权限管理</h3>
|
||||
<p>基于Auth权限控制管理、无限父子级权限分组、可自由分配子级权限、一个管理员可同时属于多个组别。</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="advantage-item">
|
||||
<div class="feature">
|
||||
<div class="part-icon"><img src="{__IMG__}/chart.png"></div>
|
||||
<div class="part-icon"><img src="{__IMG__}/log.png"></div>
|
||||
<div class="part-text">
|
||||
<h3>图表多样化</h3>
|
||||
<p>采用先进AI处理技术,支持各种场景下的图表展现</p>
|
||||
<h3>完整的操作日志</h3>
|
||||
<p>对系统管理员的一切操作留痕,方便追溯和定位问题;对平台用户的行为记录,方便分析用户的行为。</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="advantage-item">
|
||||
<div class="feature">
|
||||
<div class="part-icon"><img src="{__IMG__}/platform.png"></div>
|
||||
<div class="part-icon"><img src="{__IMG__}/bak.png"></div>
|
||||
<div class="part-text">
|
||||
<h3>支持多平台</h3>
|
||||
<p>网站支持Windows、linux、Mac等平台登录,随时随地轻松办公</p>
|
||||
<h3>安全的数据备份</h3>
|
||||
<p>在线自由备份、恢复数据库,提供优化表、修复表的功能,无惧数据丢失及人为损坏。</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="scene">
|
||||
<div class="scene-box">
|
||||
<div class="scene-title">应用场景</div>
|
||||
<div class="scene-sub-title">数据图表展现完全自定义,图表种类无任何限制,多场景使用。</div>
|
||||
<div class="tabs-container">
|
||||
<div class="tabs-header" id="tab0">
|
||||
<div class="tab-title active" onmouseover="setTab(0, 0, 'div', 'tabContent')">数据大屏</div>
|
||||
<div class="tab-title" onmouseover="setTab(0, 1, 'div', 'tabContent')">行业数据报告</div>
|
||||
<div class="tab-title" onmouseover="setTab(0, 2, 'div', 'tabContent')">运营数据报告</div>
|
||||
<div class="tab-title" onmouseover="setTab(0, 3, 'div', 'tabContent')">年度数据报告</div>
|
||||
</div>
|
||||
<div class="tab-content active" id="tabContent0">
|
||||
<div class="content-left">
|
||||
<div class="text-1">数据大屏可视化,更直观更智能的决策场景体验</div>
|
||||
<div class="text-2">通过数据大屏实时监测企业数据,了解数据异常增长原因。数据驾驶舱掌控全局,助力企业智能高效决策。</div>
|
||||
</div>
|
||||
<div class="content-right">
|
||||
<img src="{__IMG__}/daping.png" height="360" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-content" id="tabContent1">
|
||||
<div class="content-left">
|
||||
<div class="text-1">行业数据,为企业提供决策依据</div>
|
||||
<div class="text-2">分析影响行业发展的各种因素以及判断对行业的影响力度,预测并引导行业的未来发展趋势,判断行业投资价值,揭示行业投资风险,为投资者以及其他机构提供决策依据或投资依据。</div>
|
||||
</div>
|
||||
<div class="content-right">
|
||||
<img src="{__IMG__}/hangye.png" height="360" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-content" id="tabContent2">
|
||||
<div class="content-left">
|
||||
<div class="text-1">经营数据分析,为企业运营的方向盘和指南针</div>
|
||||
<div class="text-2">对企业各项经营状况进行陈述、分析、挖掘深度情报,是运营管控的重要组成部分,一份内涵丰富的运营分析报告,就是企业运营的方向盘和指南针。</div>
|
||||
</div>
|
||||
<div class="content-right">
|
||||
<img src="{__IMG__}/yuying.png" height="360" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-content" id="tabContent3">
|
||||
<div class="content-left">
|
||||
<div class="text-1">精准的年度数据分析,为企业下一阶段的工作的决策提供依据</div>
|
||||
<div class="text-2">把隐藏在一大批看来杂乱无章的数据中的信息集中和提炼出来,从而找出所研究对象的内在规律,为企业下一阶段的工作的决策提供依据。</div>
|
||||
</div>
|
||||
<div class="content-right">
|
||||
<img src="{__IMG__}/niandu.png" height="360" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="bottom-banner">
|
||||
<div class="bottom-banner-box">
|
||||
<div class="bottom-title">勾股<span>BI</span></div>
|
||||
<div class="bottom-sub-title">释放数据价值,人人都是数据分析师,新一代自助式智能数据分析工具。</div>
|
||||
<div class="bottom-banner-btn"><a href="/home/login/reg">立即体验</a></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
<!-- /主体 -->
|
||||
|
||||
<!-- 脚本 -->
|
||||
{block name="script"}
|
||||
<script>
|
||||
function setTab(m, n, tname, iname) {
|
||||
var title = document.getElementById("tab" + m).getElementsByTagName(tname);
|
||||
for (i = 0; i < title.length; i++) {
|
||||
title[i].className = i == n ? "tab-title active" : "tab-title";
|
||||
document.getElementById(iname + i).className = i == n ? "tab-content active" : "tab-content";
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
{/block}
|
||||
<!-- /脚本 -->
|
@ -78,16 +78,12 @@
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.right-wrap h2 {
|
||||
font-size: 36px;
|
||||
padding: 32px 0;
|
||||
margin: 0;
|
||||
font-weight: 500;
|
||||
color: #4385F5;
|
||||
.right-wrap .login-logo {
|
||||
padding: 25px 0 20px;
|
||||
}
|
||||
.right-wrap h2 span{
|
||||
font-weight: 800;
|
||||
color: #EB3F3B;
|
||||
|
||||
.login-logo img{
|
||||
height:60px;
|
||||
}
|
||||
|
||||
.login-way>span {
|
||||
@ -116,7 +112,7 @@
|
||||
.login-way .active:after {
|
||||
background: #EB3F3B;
|
||||
}
|
||||
.form-item{width: 326px; padding: 6px 50px;}
|
||||
.form-item{width: 326px; padding: 5px 50px;}
|
||||
|
||||
|
||||
.login-input {
|
||||
@ -157,7 +153,7 @@
|
||||
}
|
||||
.footer-operation{
|
||||
padding:12px 0;
|
||||
line-height: 2.4;
|
||||
line-height: 2.7;
|
||||
font-size: 14px;
|
||||
}
|
||||
.footer-operation a{
|
||||
@ -179,10 +175,10 @@
|
||||
<div class="login">
|
||||
<img src="{__IMG__}/login_img.png" class="login-img">
|
||||
<div class="right-wrap">
|
||||
<h2>勾股<span>BI</span></h2>
|
||||
<div class="login-logo"><a href="/"><img src="{__IMG__}/login_logo.png"></a></div>
|
||||
<div class="login-wrap">
|
||||
<div class="login-way">
|
||||
<span class="active">帐号登录</span><span>微信登录</span>
|
||||
<span class="active">帐号登录</span>
|
||||
</div>
|
||||
<div class="account-login">
|
||||
<div class="form-box">
|
||||
@ -201,7 +197,7 @@
|
||||
class="login-input" style="width: 140px;">
|
||||
</div>
|
||||
<div class="captcha_img"
|
||||
style="width:172px; height:42px; display: inline; margin-right:0; vertical-align: middle;">
|
||||
style="width:172px; height:42px; overflow: hidden; display: inline-block; margin-right:0; vertical-align: middle;">
|
||||
{:captcha_img()}
|
||||
<input type="hidden" value="{:make_token()}" />
|
||||
</div>
|
||||
@ -211,13 +207,10 @@
|
||||
</div>
|
||||
</form>
|
||||
<div class="footer-operation">
|
||||
<a>忘记密码?</a>
|
||||
<p><a>忘记密码?</a></p>
|
||||
<p>还没有帐号?<a href="/home/login/reg">立即注册</a></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-item" style="display: none;">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -78,16 +78,12 @@
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.right-wrap h2 {
|
||||
font-size: 36px;
|
||||
padding: 32px 0;
|
||||
margin: 0;
|
||||
font-weight: 500;
|
||||
color: #4385F5;
|
||||
.right-wrap .login-logo {
|
||||
padding: 25px 0 20px;
|
||||
}
|
||||
.right-wrap h2 span{
|
||||
font-weight: 800;
|
||||
color: #EB3F3B;
|
||||
|
||||
.login-logo img{
|
||||
height:60px;
|
||||
}
|
||||
|
||||
.login-way>span {
|
||||
@ -116,7 +112,7 @@
|
||||
.login-way .active:after {
|
||||
background: #EB3F3B;
|
||||
}
|
||||
.form-item{width: 326px; padding: 6px 50px;}
|
||||
.form-item{width: 326px; padding: 5px 50px;}
|
||||
|
||||
|
||||
.login-input {
|
||||
@ -179,7 +175,7 @@
|
||||
<div class="login">
|
||||
<img src="{__IMG__}/login_img.png" class="login-img">
|
||||
<div class="right-wrap">
|
||||
<h2>勾股<span>BI</span></h2>
|
||||
<div class="login-logo"><a href="/"><img src="{__IMG__}/login_logo.png"></a></div>
|
||||
<div class="login-wrap">
|
||||
<div class="login-way">
|
||||
<span class="active">帐号注册</span>
|
||||
@ -203,7 +199,7 @@
|
||||
class="login-input" style="width: 140px;">
|
||||
</div>
|
||||
<div class="captcha_img"
|
||||
style="width:172px; height:42px; display: inline; margin-right:0; vertical-align: middle;">
|
||||
style="width:172px; height:42px; overflow: hidden; display: inline-block; margin-right:0; vertical-align: middle;">
|
||||
{:captcha_img()}
|
||||
<input type="hidden" value="{:make_token()}" />
|
||||
</div>
|
||||
|
@ -118,24 +118,18 @@ class Index
|
||||
return to_assign(0, '创建管理员信息失败');
|
||||
}
|
||||
$link->close();
|
||||
$db_str = "
|
||||
<?php
|
||||
|
||||
$db_str = "<?php
|
||||
return [
|
||||
// 默认使用的数据库连接配置
|
||||
'default' => 'mysql',
|
||||
|
||||
// 自定义时间查询规则
|
||||
'time_query_rule' => [],
|
||||
|
||||
// 自动写入时间戳字段
|
||||
// true为自动识别类型 false关闭
|
||||
// 字符串则明确指定时间字段类型 支持 int timestamp datetime date
|
||||
'auto_timestamp' => true,
|
||||
|
||||
// 时间字段取出后的默认时间格式
|
||||
'datetime_format' => 'Y-m-d H:i:s',
|
||||
|
||||
// 数据库连接配置信息
|
||||
'connections' => [
|
||||
'mysql' => [
|
||||
|
@ -85,28 +85,26 @@ CREATE TABLE `cms_admin_menu` (
|
||||
-- ----------------------------
|
||||
-- Records of cms_admin_menu
|
||||
-- ----------------------------
|
||||
INSERT INTO `cms_admin_menu` VALUES (1, 0, '系统配置', '', 'icon-icon_shezhi', 1, 0, 0);
|
||||
INSERT INTO `cms_admin_menu` VALUES (2, 0, '系统管理', '', 'icon-yingyongguanli', 1, 0, 0);
|
||||
INSERT INTO `cms_admin_menu` VALUES (3, 0, '基础数据', '', 'icon-shebeiguanli', 1, 0, 0);
|
||||
INSERT INTO `cms_admin_menu` VALUES (4, 0, '平台用户', '', 'icon-quanxianshenpi', 1, 0, 0);
|
||||
INSERT INTO `cms_admin_menu` VALUES (5, 0, '资讯中心', '', 'icon-daibanshixiang', 1, 0, 0);
|
||||
INSERT INTO `cms_admin_menu` VALUES (6, 1, '网站信息', 'admin/conf/web', '', 1, 0, 0);
|
||||
INSERT INTO `cms_admin_menu` VALUES (7, 1, '邮箱配置', 'admin/conf/email', '', 1, 0, 0);
|
||||
INSERT INTO `cms_admin_menu` VALUES (8, 1, '微信配置', 'admin/conf/wechat', '', 1, 0, 0);
|
||||
INSERT INTO `cms_admin_menu` VALUES (9, 2, '功能菜单', 'admin/menu/index', '', 1, 0, 0);
|
||||
INSERT INTO `cms_admin_menu` VALUES (10, 2, '功能节点', 'admin/rule/index', '', 1, 0, 0);
|
||||
INSERT INTO `cms_admin_menu` VALUES (11, 2, '权限角色', 'admin/role/index', '', 1, 0, 0);
|
||||
INSERT INTO `cms_admin_menu` VALUES (12, 2, '管 理 员', 'admin/admin/index', '', 1, 0, 0);
|
||||
INSERT INTO `cms_admin_menu` VALUES (13, 2, '操作日志', 'admin/admin/admin_log', '', 1, 0, 0);
|
||||
INSERT INTO `cms_admin_menu` VALUES (14, 3, '导航设置', 'admin/nav/index', '', 1, 0, 0);
|
||||
INSERT INTO `cms_admin_menu` VALUES (15, 3, '网站地图', 'admin/sitemap/index', '', 1, 0, 0);
|
||||
INSERT INTO `cms_admin_menu` VALUES (16, 3, '轮播广告', 'admin/slide/index', '', 1, 0, 0);
|
||||
INSERT INTO `cms_admin_menu` VALUES (17, 3, 'SEO关键字', 'admin/keywords/index', '', 1, 0, 0);
|
||||
INSERT INTO `cms_admin_menu` VALUES (18, 3, '搜索关键词', 'admin/search/index', '', 1, 0, 0);
|
||||
INSERT INTO `cms_admin_menu` VALUES (20, 4, '用户列表', 'admin/user/index', '',1, 0, 0);
|
||||
INSERT INTO `cms_admin_menu` VALUES (21, 4, '操作日志', 'admin/user/user_log', '', 1, 0, 0);
|
||||
INSERT INTO `cms_admin_menu` VALUES (22, 5, '文章分类', 'admin/article/cate', '', 1, 0, 0);
|
||||
INSERT INTO `cms_admin_menu` VALUES (23, 5, '文章列表', 'admin/article/index', '', 1, 0, 0);
|
||||
INSERT INTO `cms_admin_menu` VALUES (1, 0, '系统管理', '', 'icon-yingyongguanli', 1, 0, 0);
|
||||
INSERT INTO `cms_admin_menu` VALUES (2, 0, '基础数据', '', 'icon-shebeiguanli', 1, 0, 0);
|
||||
INSERT INTO `cms_admin_menu` VALUES (3, 0, '平台用户', '', 'icon-quanxianshenpi', 1, 0, 0);
|
||||
INSERT INTO `cms_admin_menu` VALUES (4, 0, '资讯中心', '', 'icon-daibanshixiang', 1, 0, 0);
|
||||
INSERT INTO `cms_admin_menu` VALUES (5, 1, '系统配置', 'admin/conf/index', '', 1, 0, 0);
|
||||
INSERT INTO `cms_admin_menu` VALUES (6, 1, '功能菜单', 'admin/menu/index', '', 1, 0, 0);
|
||||
INSERT INTO `cms_admin_menu` VALUES (7, 1, '功能节点', 'admin/rule/index', '', 1, 0, 0);
|
||||
INSERT INTO `cms_admin_menu` VALUES (8, 1, '权限角色', 'admin/role/index', '', 1, 0, 0);
|
||||
INSERT INTO `cms_admin_menu` VALUES (9, 1, '管 理 员', 'admin/admin/index', '', 1, 0, 0);
|
||||
INSERT INTO `cms_admin_menu` VALUES (10, 1, '操作日志', 'admin/admin/log', '', 1, 0, 0);
|
||||
INSERT INTO `cms_admin_menu` VALUES (11, 1, '数据备份', 'admin/admin/bak', '', 1, 0, 0);
|
||||
INSERT INTO `cms_admin_menu` VALUES (12, 2, '导航设置', 'admin/nav/index', '', 1, 0, 0);
|
||||
INSERT INTO `cms_admin_menu` VALUES (13, 2, '网站地图', 'admin/sitemap/index', '', 1, 0, 0);
|
||||
INSERT INTO `cms_admin_menu` VALUES (14, 2, '轮播广告', 'admin/slide/index', '', 1, 0, 0);
|
||||
INSERT INTO `cms_admin_menu` VALUES (15, 2, 'SEO关键字', 'admin/keywords/index', '', 1, 0, 0);
|
||||
INSERT INTO `cms_admin_menu` VALUES (16, 2, '搜索关键词', 'admin/search/index', '', 1, 0, 0);
|
||||
INSERT INTO `cms_admin_menu` VALUES (17, 3, '用户列表', 'admin/user/index', '',1, 0, 0);
|
||||
INSERT INTO `cms_admin_menu` VALUES (18, 3, '操作日志', 'admin/user/log', '', 1, 0, 0);
|
||||
INSERT INTO `cms_admin_menu` VALUES (19, 4, '文章分类', 'admin/article/cate', '', 1, 0, 0);
|
||||
INSERT INTO `cms_admin_menu` VALUES (20, 4, '文章列表', 'admin/article/index', '', 1, 0, 0);
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for `cms_admin_rule`
|
||||
@ -126,92 +124,92 @@ CREATE TABLE `cms_admin_rule` (
|
||||
-- ----------------------------
|
||||
-- Records of cms_admin_rule
|
||||
-- ----------------------------
|
||||
INSERT INTO `cms_admin_rule` VALUES (1, 0, '', '系统配置', 0, 0);
|
||||
INSERT INTO `cms_admin_rule` VALUES (2, 0, '', '系统管理', 0, 0);
|
||||
INSERT INTO `cms_admin_rule` VALUES (3, 0, '', '基础数据', 0, 0);
|
||||
INSERT INTO `cms_admin_rule` VALUES (4, 0, '', '平台用户', 0, 0);
|
||||
INSERT INTO `cms_admin_rule` VALUES (5, 0, '', '资讯中心', 0, 0);
|
||||
INSERT INTO `cms_admin_rule` VALUES (6, 1, 'admin/conf/web', '网站信息', 0, 0);
|
||||
INSERT INTO `cms_admin_rule` VALUES (7, 6, 'admin/conf/web_submit', '保存网站信息', 0, 0);
|
||||
INSERT INTO `cms_admin_rule` VALUES (8, 1, 'admin/conf/email', '邮箱配置', 0, 0);
|
||||
INSERT INTO `cms_admin_rule` VALUES (9, 8, 'admin/conf/email_submit', '保存邮箱配置', 0, 0);
|
||||
INSERT INTO `cms_admin_rule` VALUES (10, 1, 'admin/conf/wechat', '微信配置', 0, 0);
|
||||
INSERT INTO `cms_admin_rule` VALUES (11, 10, 'admin/conf/wechat_submit', '保存微信配置', 0, 0);
|
||||
INSERT INTO `cms_admin_rule` VALUES (12, 2, 'admin/menu/index', '功能菜单', 0, 0);
|
||||
INSERT INTO `cms_admin_rule` VALUES (1, 0, '', '系统管理', 0, 0);
|
||||
INSERT INTO `cms_admin_rule` VALUES (2, 0, '', '基础数据', 0, 0);
|
||||
INSERT INTO `cms_admin_rule` VALUES (3, 0, '', '平台用户', 0, 0);
|
||||
INSERT INTO `cms_admin_rule` VALUES (4, 0, '', '资讯中心', 0, 0);
|
||||
INSERT INTO `cms_admin_rule` VALUES (5, 1, 'admin/conf/index', '系统配置', 0, 0);
|
||||
INSERT INTO `cms_admin_rule` VALUES (6, 5, 'admin/conf/get_list', '获取配置信息', 0, 0);
|
||||
INSERT INTO `cms_admin_rule` VALUES (7, 5, 'admin/conf/add', '新增配置信息', 0, 0);
|
||||
INSERT INTO `cms_admin_rule` VALUES (8, 5, 'admin/conf/post_submit', '保存配置信息', 0, 0);
|
||||
INSERT INTO `cms_admin_rule` VALUES (9, 5, 'admin/conf/edit', '编辑配置详情', 0, 0);
|
||||
INSERT INTO `cms_admin_rule` VALUES (10, 5, 'admin/conf/conf_submit', '保存配置详情', 0, 0);
|
||||
INSERT INTO `cms_admin_rule` VALUES (11, 5, 'admin/conf/delete', '删除配置信息', 0, 0);
|
||||
INSERT INTO `cms_admin_rule` VALUES (12, 1, 'admin/menu/index', '功能菜单', 0, 0);
|
||||
INSERT INTO `cms_admin_rule` VALUES (13, 12, 'admin/menu/get_list', '菜单列表', 0, 0);
|
||||
INSERT INTO `cms_admin_rule` VALUES (14, 12, 'admin/menu/add', '添加菜单', 0, 0);
|
||||
INSERT INTO `cms_admin_rule` VALUES (15, 12, 'admin/menu/post_submit', '菜单保存', 0, 0);
|
||||
INSERT INTO `cms_admin_rule` VALUES (16, 12, 'admin/menu/delete', '菜单删除', 0, 0);
|
||||
INSERT INTO `cms_admin_rule` VALUES (17, 2, 'admin/rule/index', '功能节点', 0, 0);
|
||||
INSERT INTO `cms_admin_rule` VALUES (17, 1, 'admin/rule/index', '功能节点', 0, 0);
|
||||
INSERT INTO `cms_admin_rule` VALUES (18, 17, 'admin/rule/get_list', '节点列表', 0, 0);
|
||||
INSERT INTO `cms_admin_rule` VALUES (19, 17, 'admin/rule/add', '添加节点', 0, 0);
|
||||
INSERT INTO `cms_admin_rule` VALUES (20, 17, 'admin/rule/post_submit', '节点保存', 0, 0);
|
||||
INSERT INTO `cms_admin_rule` VALUES (21, 17, 'admin/rule/delete', '节点删除', 0, 0);
|
||||
INSERT INTO `cms_admin_rule` VALUES (22, 2, 'admin/role/index', '权限角色', 0, 0);
|
||||
INSERT INTO `cms_admin_rule` VALUES (22, 1, 'admin/role/index', '权限角色', 0, 0);
|
||||
INSERT INTO `cms_admin_rule` VALUES (23, 22, 'admin/role/get_list', '权限列表',0, 0);
|
||||
INSERT INTO `cms_admin_rule` VALUES (24, 22, 'admin/role/add', '权限添加',0, 0);
|
||||
INSERT INTO `cms_admin_rule` VALUES (25, 22, 'admin/role/post_submit', '权限保存',0, 0);
|
||||
INSERT INTO `cms_admin_rule` VALUES (26, 22, 'admin/role/delete', '权限删除', 0, 0);
|
||||
INSERT INTO `cms_admin_rule` VALUES (27, 2, 'admin/admin/index', '管理员', 0, 0);
|
||||
INSERT INTO `cms_admin_rule` VALUES (27, 1, 'admin/admin/index', '管理员', 0, 0);
|
||||
INSERT INTO `cms_admin_rule` VALUES (28, 27, 'admin/admin/get_list', '管理员列表', 0, 0);
|
||||
INSERT INTO `cms_admin_rule` VALUES (29, 27, 'admin/admin/add', '添加/修改管理员', 0, 0);
|
||||
INSERT INTO `cms_admin_rule` VALUES (30, 27, 'admin/admin/post_submit', '管理员保存', 0, 0);
|
||||
INSERT INTO `cms_admin_rule` VALUES (31, 27, 'admin/admin/view', '管理员查看', 0, 0);
|
||||
INSERT INTO `cms_admin_rule` VALUES (32, 27, 'admin/admin/delete', '管理员删除',0, 0);
|
||||
INSERT INTO `cms_admin_rule` VALUES (33, 2, 'admin/admin/log', '操作日志',0, 0);
|
||||
INSERT INTO `cms_admin_rule` VALUES (33, 1, 'admin/admin/log', '操作日志',0, 0);
|
||||
INSERT INTO `cms_admin_rule` VALUES (34, 33, 'admin/admin/get_log_list', '操作日志列表', 0, 0);
|
||||
INSERT INTO `cms_admin_rule` VALUES (35, 3, 'admin/nav/index', '导航组管理', 0, 0);
|
||||
INSERT INTO `cms_admin_rule` VALUES (36, 35, 'admin/nav/get_list', '导航组列表', 0, 0);
|
||||
INSERT INTO `cms_admin_rule` VALUES (37, 35, 'admin/nav/add', '添加/修改导航组', 0, 0);
|
||||
INSERT INTO `cms_admin_rule` VALUES (38, 35, 'admin/nav/post_submit', '导航组保存', 0, 0);
|
||||
INSERT INTO `cms_admin_rule` VALUES (39, 35, 'admin/nav/delete', '导航组删除', 0, 0);
|
||||
INSERT INTO `cms_admin_rule` VALUES (40, 3, 'admin/nav/nav_info', '导航管理', 0, 0);
|
||||
INSERT INTO `cms_admin_rule` VALUES (40, 2, 'admin/nav/nav_info', '导航管理', 0, 0);
|
||||
INSERT INTO `cms_admin_rule` VALUES (41, 40, 'admin/nav/nav_info_list', '导航列表', 0, 0);
|
||||
INSERT INTO `cms_admin_rule` VALUES (42, 40, 'admin/nav/nav_info_add', '添加/修改导航', 0, 0);
|
||||
INSERT INTO `cms_admin_rule` VALUES (43, 40, 'admin/nav/nav_info_submit', '导航保存',0, 0);
|
||||
INSERT INTO `cms_admin_rule` VALUES (44, 40, 'admin/nav/nav_info_delete', '导航删除',0, 0);
|
||||
INSERT INTO `cms_admin_rule` VALUES (45, 3, 'admin/sitemap/index', '网站地图分类', 0, 0);
|
||||
INSERT INTO `cms_admin_rule` VALUES (45, 2, 'admin/sitemap/index', '网站地图分类', 0, 0);
|
||||
INSERT INTO `cms_admin_rule` VALUES (46, 45, 'admin/sitemap/get_list', '网站地图分类列表', 0, 0);
|
||||
INSERT INTO `cms_admin_rule` VALUES (47, 45, 'admin/sitemap/add', '添加/编辑网站地图分类', 0, 0);
|
||||
INSERT INTO `cms_admin_rule` VALUES (48, 45, 'admin/sitemap/post_submit', '网站地图分类保存', 0, 0);
|
||||
INSERT INTO `cms_admin_rule` VALUES (49, 45, 'admin/sitemap/delete', '网站地图分类删除', 0, 0);
|
||||
INSERT INTO `cms_admin_rule` VALUES (50, 3, 'admin/sitemap/sitemap_info', '网站地图', 0, 0);
|
||||
INSERT INTO `cms_admin_rule` VALUES (50, 2, 'admin/sitemap/sitemap_info', '网站地图', 0, 0);
|
||||
INSERT INTO `cms_admin_rule` VALUES (51, 45, 'admin/sitemap/sitemap_info_list', '网站地图列表', 0, 0);
|
||||
INSERT INTO `cms_admin_rule` VALUES (52, 45, 'admin/sitemap/sitemap_info_add', '添加/编辑网站地图',0, 0);
|
||||
INSERT INTO `cms_admin_rule` VALUES (53, 45, 'admin/sitemap/sitemap_info_submit', '网站地图保存', 0, 0);
|
||||
INSERT INTO `cms_admin_rule` VALUES (54, 45, 'admin/sitemap/sitemap_info_delete', '删除网站地图', 0, 0);
|
||||
INSERT INTO `cms_admin_rule` VALUES (55, 3, 'admin/slide/index', '轮播组',0, 0);
|
||||
INSERT INTO `cms_admin_rule` VALUES (55, 2, 'admin/slide/index', '轮播组',0, 0);
|
||||
INSERT INTO `cms_admin_rule` VALUES (56, 55, 'admin/slide/get_list', '轮播组列表', 0, 0);
|
||||
INSERT INTO `cms_admin_rule` VALUES (57, 55, 'admin/slide/add', '添加轮播组', 0, 0);
|
||||
INSERT INTO `cms_admin_rule` VALUES (58, 55, 'admin/slide/post_submit', '轮播组添加', 0, 0);
|
||||
INSERT INTO `cms_admin_rule` VALUES (59, 55, 'admin/slide/delete', '删除轮播组', 0, 0);
|
||||
INSERT INTO `cms_admin_rule` VALUES (60, 3, 'admin/slide/slide_info', '轮播广告', 0, 0);
|
||||
INSERT INTO `cms_admin_rule` VALUES (60, 2, 'admin/slide/slide_info', '轮播广告', 0, 0);
|
||||
INSERT INTO `cms_admin_rule` VALUES (61, 60, 'admin/slide/slide_info_list', '轮播图列表', 0, 0);
|
||||
INSERT INTO `cms_admin_rule` VALUES (62, 60, 'admin/slide/slide_info_add', '添加轮播图', 0, 0);
|
||||
INSERT INTO `cms_admin_rule` VALUES (63, 60, 'admin/slide/slide_info_submit', '轮播图保存', 0, 0);
|
||||
INSERT INTO `cms_admin_rule` VALUES (64, 60, 'admin/slide/slide_info_delete', '轮播图删除', 0, 0);
|
||||
INSERT INTO `cms_admin_rule` VALUES (65, 3, 'admin/keywords/index', 'SEO关键字', 0, 0);
|
||||
INSERT INTO `cms_admin_rule` VALUES (65, 2, 'admin/keywords/index', 'SEO关键字', 0, 0);
|
||||
INSERT INTO `cms_admin_rule` VALUES (66, 65, 'admin/keywords/get_list', 'SEO关键字列表', 0, 0);
|
||||
INSERT INTO `cms_admin_rule` VALUES (67, 65, 'admin/keywords/add', 'SEO关键字添加', 0, 0);
|
||||
INSERT INTO `cms_admin_rule` VALUES (68, 65, 'admin/keywords/post_submit', 'SEO关键字保存', 0, 0);
|
||||
INSERT INTO `cms_admin_rule` VALUES (69, 65, 'admin/keywords/delete', 'SEO关键字删除', 0, 0);
|
||||
INSERT INTO `cms_admin_rule` VALUES (70, 3, 'admin/search/index', '搜索关键字', 0, 0);
|
||||
INSERT INTO `cms_admin_rule` VALUES (70, 2, 'admin/search/index', '搜索关键字', 0, 0);
|
||||
INSERT INTO `cms_admin_rule` VALUES (71, 70, 'admin/search/get_list', '关键字搜索列表', 0, 0);
|
||||
INSERT INTO `cms_admin_rule` VALUES (72, 70, 'admin/search/delete', '关键字搜索删除', 0, 0);
|
||||
INSERT INTO `cms_admin_rule` VALUES (73, 4, 'admin/user/index', '用户管理', 0, 0);
|
||||
INSERT INTO `cms_admin_rule` VALUES (73, 3, 'admin/user/index', '用户管理', 0, 0);
|
||||
INSERT INTO `cms_admin_rule` VALUES (74, 73, 'admin/user/get_list', '用户管理列表', 0, 0);
|
||||
INSERT INTO `cms_admin_rule` VALUES (75, 73, 'admin/user/add', '修改用户', 0, 0);
|
||||
INSERT INTO `cms_admin_rule` VALUES (76, 73, 'admin/user/post_submit', '用户保存', 0, 0);
|
||||
INSERT INTO `cms_admin_rule` VALUES (77, 73, 'admin/user/view', '用户查看', 0, 0);
|
||||
INSERT INTO `cms_admin_rule` VALUES (78, 73, 'admin/user/delete', '用户禁用',0, 0);
|
||||
INSERT INTO `cms_admin_rule` VALUES (79, 4, 'admin/user/log', '操作日志', 0, 0);
|
||||
INSERT INTO `cms_admin_rule` VALUES (79, 3, 'admin/user/log', '操作日志', 0, 0);
|
||||
INSERT INTO `cms_admin_rule` VALUES (80, 79, 'admin/user/get_log_list', '操作日志列表', 0, 0);
|
||||
INSERT INTO `cms_admin_rule` VALUES (81, 5, 'admin/article/cate', '文章分类', 0, 0);
|
||||
INSERT INTO `cms_admin_rule` VALUES (81, 4, 'admin/article/cate', '文章分类', 0, 0);
|
||||
INSERT INTO `cms_admin_rule` VALUES (82, 81, 'admin/article/cate_list', '文章分类列表', 0, 0);
|
||||
INSERT INTO `cms_admin_rule` VALUES (83, 81, 'admin/article/cate_add', '添加文章分类', 0, 0);
|
||||
INSERT INTO `cms_admin_rule` VALUES (84, 81, 'admin/article/cate_post_submit', '文章分类添加', 0, 0);
|
||||
INSERT INTO `cms_admin_rule` VALUES (85, 81, 'admin/article/cate_delete', '文章分类删除', 0, 0);
|
||||
INSERT INTO `cms_admin_rule` VALUES (86, 5, 'admin/article/index', '文章列表', 0, 0);
|
||||
INSERT INTO `cms_admin_rule` VALUES (86, 4, 'admin/article/index', '文章列表', 0, 0);
|
||||
INSERT INTO `cms_admin_rule` VALUES (87, 86, 'admin/article/get_list', '文章列表', 0, 0);
|
||||
INSERT INTO `cms_admin_rule` VALUES (88, 86, 'admin/article/add', '添加文章', 0, 0);
|
||||
INSERT INTO `cms_admin_rule` VALUES (89, 86, 'admin/article/post_submit', '文章添加', 0, 0);
|
||||
@ -236,20 +234,39 @@ CREATE TABLE `cms_admin_log` (
|
||||
`param_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '操作数据id',
|
||||
`param` text COMMENT '参数json格式',
|
||||
`status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '0删除 1正常',
|
||||
`create_time` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
|
||||
`create_time` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='后台操作日志表';
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for `cms_config`
|
||||
-- ----------------------------
|
||||
CREATE TABLE `cms_config` (
|
||||
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`title` varchar(100) NOT NULL DEFAULT '' COMMENT '配置名称',
|
||||
`name` varchar(100) NOT NULL DEFAULT '' COMMENT '配置标识',
|
||||
`content` text NULL COMMENT '配置内容',
|
||||
`status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '状态:-1删除 0禁用 1启用',
|
||||
`create_time` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
|
||||
`update_time` int(11) NOT NULL DEFAULT '0' COMMENT '更新时间',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='系统配置';
|
||||
-- ----------------------------
|
||||
-- Records of cms_config
|
||||
-- ----------------------------
|
||||
INSERT INTO `cms_config` VALUES (1, '网站配置', 0, 1, 1610183567, 1610184824);
|
||||
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for `cms_keywords`
|
||||
-- ----------------------------
|
||||
CREATE TABLE `cms_keywords` (
|
||||
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`title` varchar(100) NOT NULL DEFAULT '' COMMENT '关键字名称',
|
||||
`sort` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '排序',
|
||||
`sort` int(11) NOT NULL DEFAULT '0' COMMENT '排序',
|
||||
`status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '状态:-1删除 0禁用 1启用',
|
||||
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
|
||||
`update_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
|
||||
`create_time` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
|
||||
`update_time` int(11) NOT NULL DEFAULT '0' COMMENT '更新时间',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='关键字';
|
||||
-- ----------------------------
|
||||
@ -298,7 +315,7 @@ CREATE TABLE `cms_article` (
|
||||
`article_cate_id` int(11) NOT NULL DEFAULT '0',
|
||||
`create_time` int(11) NOT NULL DEFAULT '0',
|
||||
`update_time` int(11) NOT NULL DEFAULT '0',
|
||||
`delete_time` int(11) DEFAULT NULL,
|
||||
`delete_time` int(11) NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='文章';
|
||||
|
||||
@ -315,7 +332,7 @@ CREATE TABLE `cms_article_keywords` (
|
||||
`aid` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '文章ID',
|
||||
`keywords_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '关联关键字id',
|
||||
`status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '状态:-1删除 0禁用 1启用',
|
||||
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
|
||||
`create_time` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `aid` (`aid`),
|
||||
KEY `inid` (`keywords_id`)
|
||||
@ -389,7 +406,8 @@ CREATE TABLE `cms_nav_info` (
|
||||
`title` varchar(225) DEFAULT '',
|
||||
`src` varchar(100) DEFAULT NULL,
|
||||
`param` varchar(100) DEFAULT NULL,
|
||||
`status` int(1) NOT NULL DEFAULT '1' COMMENT '1可用-1禁用',
|
||||
`target` int(1) NOT NULL DEFAULT '0' COMMENT '是否新窗口打开,默认0,1新窗口打开',
|
||||
`status` int(1) NOT NULL DEFAULT '1' COMMENT '1可用,-1禁用',
|
||||
`sort` int(11) NOT NULL DEFAULT '0',
|
||||
`create_time` int(11) NOT NULL DEFAULT '0',
|
||||
`update_time` int(11) NOT NULL DEFAULT '0',
|
||||
@ -467,10 +485,10 @@ CREATE TABLE `cms_user` (
|
||||
`password` varchar(255) NOT NULL DEFAULT '' COMMENT '密码',
|
||||
`salt` varchar(20) NOT NULL DEFAULT '' COMMENT '密码盐',
|
||||
`mobile` varchar(20) NOT NULL DEFAULT '' COMMENT '手机(也可以作为登录账号)',
|
||||
`mobile_status` tinyint(1) unsigned NOT NULL DEFAULT 0 COMMENT '手机绑定状态: 0未绑定 1已绑定',
|
||||
`mobile_status` tinyint(1) NOT NULL DEFAULT 0 COMMENT '手机绑定状态: 0未绑定 1已绑定',
|
||||
`email` varchar(50) NOT NULL DEFAULT '' COMMENT '邮箱',
|
||||
`headimgurl` varchar(255) NOT NULL DEFAULT '' COMMENT '微信头像',
|
||||
`sex` tinyint(1) unsigned NOT NULL DEFAULT 0 COMMENT '性别 0:未知 1:女 2:男 ',
|
||||
`sex` tinyint(1) NOT NULL DEFAULT 0 COMMENT '性别 0:未知 1:女 2:男 ',
|
||||
`desc` varchar(255) NOT NULL DEFAULT '' COMMENT '个人简介',
|
||||
`birthday` int(11) NULL DEFAULT NULL COMMENT '生日',
|
||||
`country` varchar(20) NOT NULL DEFAULT '' COMMENT '国家',
|
||||
@ -483,12 +501,12 @@ CREATE TABLE `cms_user` (
|
||||
`puid` int(11) NOT NULL DEFAULT 0 COMMENT '推荐人ID,默认是0',
|
||||
`qrcode_invite` int(11) NOT NULL DEFAULT 0 COMMENT '邀请场景二维码id',
|
||||
`status` tinyint(1) NOT NULL DEFAULT 1 COMMENT '状态 -1删除 0禁用 1正常 ',
|
||||
`last_login_time` int(13) NOT NULL DEFAULT '' COMMENT '最后登录时间',
|
||||
`last_login_time` int(11) NOT NULL DEFAULT '0' COMMENT '最后登录时间',
|
||||
`last_login_ip` varchar(20) NOT NULL DEFAULT '' COMMENT '最后登录IP',
|
||||
`register_time` int(13) NOT NULL DEFAULT '' COMMENT '注册时间',
|
||||
`register_time` int(11) NOT NULL DEFAULT '0' COMMENT '注册时间',
|
||||
`register_ip` varchar(20) NOT NULL DEFAULT '' COMMENT '注册IP',
|
||||
`wx_platform` int(11) NOT NULL DEFAULT 0 COMMENT '首次注册来自于哪个微信平台',
|
||||
PRIMARY KEY (`uid`)
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 COMMENT = '用户表';
|
||||
|
||||
-- ----------------------------
|
||||
@ -508,7 +526,7 @@ CREATE TABLE `cms_user_log` (
|
||||
`param_id` int(11) unsigned NOT NULL COMMENT '操作ID',
|
||||
`param` text COMMENT '参数json格式',
|
||||
`status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '0删除 1正常',
|
||||
`create_time` int(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT '创建时间',
|
||||
`create_time` int(11) NOT NULL DEFAULT '0' '创建时间',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='用户操作日志表';
|
||||
|
||||
@ -518,20 +536,21 @@ CREATE TABLE `cms_user_log` (
|
||||
DROP TABLE IF EXISTS `cms_file`;
|
||||
CREATE TABLE `cms_file` (
|
||||
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`module` char(15) NOT NULL DEFAULT '' COMMENT '所属模块',
|
||||
`sha1` char(60) NOT NULL COMMENT 'sha1',
|
||||
`md5` char(60) NOT NULL COMMENT 'md5',
|
||||
`module` varchar(15) NOT NULL DEFAULT '' COMMENT '所属模块',
|
||||
`sha1` varchar(60) NOT NULL COMMENT 'sha1',
|
||||
`md5` varchar(60) NOT NULL COMMENT 'md5',
|
||||
`name` varchar(200) NOT NULL DEFAULT '' COMMENT '原始文件名',
|
||||
`filename` char(200) NOT NULL DEFAULT '' COMMENT '文件名',
|
||||
`filepath` char(200) NOT NULL DEFAULT '' COMMENT '文件路径+文件名',
|
||||
`filesize` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '文件大小',
|
||||
`fileext` char(10) NOT NULL DEFAULT '' COMMENT '文件后缀',
|
||||
`user_id` int(11) unsigned NOT NULL DEFAULT 0 COMMENT '会员ID',
|
||||
`uploadip` char(15) NOT NULL DEFAULT '' COMMENT '上传IP',
|
||||
`filename` varchar(200) NOT NULL DEFAULT '' COMMENT '文件名',
|
||||
`filepath` varchar(200) NOT NULL DEFAULT '' COMMENT '文件路径+文件名',
|
||||
`filesize` int(10) NOT NULL DEFAULT 0 COMMENT '文件大小',
|
||||
`fileext` varchar(10) NOT NULL DEFAULT '' COMMENT '文件后缀',
|
||||
`mimetype` varchar(100) NOT NULL DEFAULT '' COMMENT '文件类型',
|
||||
`uid` int(11) unsigned NOT NULL DEFAULT 0 COMMENT '会员ID',
|
||||
`uploadip` varchar(15) NOT NULL DEFAULT '' COMMENT '上传IP',
|
||||
`status` tinyint(1) NOT NULL DEFAULT 0 COMMENT '0未审核1已审核-1不通过',
|
||||
`create_time` int(11) unsigned NOT NULL DEFAULT 0,
|
||||
`create_time` int(11) NOT NULL DEFAULT '0',
|
||||
`admin_id` int(11) NOT NULL COMMENT '审核者id',
|
||||
`audit_time` int(11) NOT NULL COMMENT '审核时间',
|
||||
`audit_time` int(11) NOT NULL DEFAULT '0' COMMENT '审核时间',
|
||||
`action` varchar(50) NOT NULL DEFAULT '' COMMENT '来源模块功能',
|
||||
`use` varchar(200) NULL DEFAULT NULL COMMENT '用处',
|
||||
`download` int(11) NOT NULL DEFAULT 0 COMMENT '下载量',
|
||||
|
@ -35,7 +35,7 @@
|
||||
</ul>
|
||||
</div>
|
||||
<div style="padding:20px; background-color:#fff;line-height: 27px; border-radius:0 0 6px 6px">
|
||||
<p>勾股CMS基于ThinkPHP{:TP_VERSION}和Layui{:LAYUI_VERSION},是一套采用PHP+MYSQL环境下运行的轻量级、高性能快速建站的内容管理系统。后台管理模块,一目了然,操作简单,绝对不会让您眼花缭乱。<br><br>
|
||||
<p>勾股CMS是一套基于ThinkPHP{:TP_VERSION} + Layui{:LAYUI_VERSION} + MySql打造的轻量级、高性能快速建站的内容管理系统。后台管理模块,一目了然,操作简单,通用型后台权限管理框架,紧随潮流、开箱即用,让WEB开发更简单!<br><br>
|
||||
<strong>开源协议:</strong><br>
|
||||
本系统遵循Apache Lisense 2.0开源协议发布,并提供免费使用。<br>
|
||||
Apache Licence是著名的非盈利开源组织Apache采用的协议。该协议和BSD类似,鼓励代码共享和尊重原作者的著作权,允许代码修改,再作为开源或商业软件发布。需要满足的条件:<br>
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
@ -1 +0,0 @@
|
||||
<?php return ['smtp'=>'smtp.qq.com','username'=>'gougucms@qq.com','password'=>'123456','port'=>'465/587','email'=>'admin@gougucms.com','from'=>'勾股CMS系统管理员','template'=>'<p>勾股CMS系统系统发送模板。</p><p><br/></p><p><img src="/static/admin/images/login_logo.png"/></p>'];
|
@ -1 +0,0 @@
|
||||
<?php return ['admin_title'=>'勾股CMS','title'=>'勾股CMS','keywords'=>'勾股CMS','logo'=>'/static/admin/images/login_logo.png','desc'=>'勾股CMS是一个基于 ThinkPHP6 和 Layui 的轻量级的内容管理系统。','icp'=>'粤ICP备xxxxxxxxx号-01','code'=>'','domain'=>'http://dev6.ruxiba.com/','version'=>'1.0.1','port_cache_time'=>'3000'];
|
@ -1 +0,0 @@
|
||||
<?php return ['Token'=>'GOUGUCMS','LOGIN_BACK_URL' => 'http://www.ailesson.com/wechat/index/getChatInfo','appID'=>'wxdf967e6a7cd6f0c5','appsecret'=>'1dbf319a4f0dfed7974ffd1c7dbba488','MCHID' => '1512297331','SECRECT_KEY' => 'beiyue2018hunangdmabczhaojiaxing','CERT_URL' => '/extend/cert/','PAY_BACK_URL' => 'https://www.ailesson.com/wxappv1/wx/notify'];
|
@ -15,13 +15,13 @@ namespace think;
|
||||
require __DIR__ . '/../vendor/autoload.php';
|
||||
|
||||
// 定义当前版本号
|
||||
define('CMS_VERSION','1.1.0');
|
||||
define('CMS_VERSION','1.0.0');
|
||||
|
||||
// 定义Layui版本号
|
||||
define('TP_VERSION','6.0.5');
|
||||
|
||||
// 定义Layui版本号
|
||||
define('LAYUI_VERSION','2.4.7');
|
||||
define('LAYUI_VERSION','2.5.7');
|
||||
|
||||
// 定义项目目录
|
||||
define('CMS_ROOT', __DIR__ . '/../');
|
||||
|
@ -1,12 +1,15 @@
|
||||
.layui-table td,.layui-table th{padding:9px 10px;}
|
||||
/* 滚动条样式 */
|
||||
::-webkit-scrollbar {
|
||||
width: 8px;
|
||||
background-color: #f1f2f7;
|
||||
}
|
||||
::-webkit-scrollbar-thumb {
|
||||
background-color: #c1c1c1;
|
||||
border-radius: 8px;
|
||||
background-color:rgba(0,0,0,.15);background-clip:content-box;border:1px solid transparent;border-radius:8px
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-track{background-color:transparent}
|
||||
::-webkit-scrollbar-track:hover{background-color:rgba(0,0,0,.04)}
|
||||
::-webkit-scrollbar-thumb:hover{background-color:rgba(0,0,0,.4);border:1px solid transparent}
|
||||
::-webkit-scrollbar-thumb:active{background-color:rgba(0,0,0,.65)}
|
||||
|
||||
::-moz-scrollbar {
|
||||
width: 8px;
|
||||
@ -14,8 +17,15 @@
|
||||
}
|
||||
::-moz-scrollbar-thumb {
|
||||
background-color: #c1c1c1;
|
||||
border-radius: 6px;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
div.layui-table-main::-webkit-scrollbar{width:15px;height:15px}
|
||||
div.layui-table-main::-webkit-scrollbar-thumb{min-width:15px;min-height:15px;background-color:rgba(0,0,0,.15);background-clip:content-box;border:2px solid transparent;border-radius:15px}
|
||||
div.layui-table-main::-webkit-scrollbar-track{background-color:transparent}
|
||||
div.layui-table-main::-webkit-scrollbar-track:hover{background-color:rgba(0,0,0,.04)}
|
||||
div.layui-table-main::-webkit-scrollbar-thumb:hover{background-color:rgba(0,0,0,.4);border:2px solid transparent}
|
||||
div.layui-table-main::-webkit-scrollbar-thumb:active{background-color:rgba(0,0,0,.65)}
|
||||
/*placeholder*/
|
||||
::-webkit-input-placeholder { /* WebKit, Blink, Edge */
|
||||
color: #aaa;
|
||||
@ -30,6 +40,8 @@
|
||||
color: #aaa;
|
||||
}
|
||||
|
||||
.layui-table td,.layui-table th{padding:9px 10px;}
|
||||
|
||||
.auth-single .auth-icon{font-size:24px; float:left;}
|
||||
.auth-single .layui-form-radio,.auth-single .layui-form-checkbox{margin-left:0;}
|
||||
.auth-single .layui-form-radio{margin-top:0;}
|
||||
|
@ -151,5 +151,5 @@ layui.config({
|
||||
})
|
||||
})
|
||||
|
||||
exports('fanqiecms', {});
|
||||
exports('gougucms', {});
|
||||
});
|
@ -80,7 +80,7 @@ a:active {color:#4385F5;}
|
||||
|
||||
.nav-menu{font-size:16px;}
|
||||
.nav-menu li{height:60px; float:left; color:#fff;}
|
||||
.nav-menu li a.nav-a{height:60px; min-width:80px; text-align:center; line-height:60px; padding:0 22px; display:inline-block; color:#323232;}
|
||||
.nav-menu li a.nav-a{height:60px; min-width:50px; text-align:center; line-height:60px; padding:0 20px; display:inline-block; color:#323232;}
|
||||
.nav-menu li a.nav-a:hover{color:#4385F5}
|
||||
.nav-menu li.on a.nav-a{color:#4385F5}
|
||||
|
||||
@ -104,17 +104,6 @@ a:active {color:#4385F5;}
|
||||
.nav-img img{width:30px; height:30px; border-radius:50%; border:1px solid #fff; margin-right: 6px;}
|
||||
.nav-menu li.nav-logined:hover .nav-login-box{z-index:99;-webkit-transform:scale(1);transform:scale(1);opacity:1;}
|
||||
|
||||
.nav-menu li.nav-wechat{position:relative;}
|
||||
.nav-menu li.nav-wechat a{padding:0; font-size:14px;}
|
||||
.nav-wechat-box{width:300px; padding:6px 10px; height:175px; border-radius:2px; position:absolute; top:60px; right:0; background-color:#fff; z-index:-1; color:#333; font-size:14px;-webkit-transform:scale(0.5);transform:scale(0.5);-webkit-transition:.2s;transition:.2s;opacity:0;-webkit-transform-origin:center top;transform-origin:center top;-webkit-box-shadow:0 15px 30px rgba(0,0,0,.2);box-shadow:0 15px 30px rgba(0,0,0,.2);}
|
||||
.nav-wechat-box div{float:left; text-align:center; padding:6px;}
|
||||
.nav-wechat-box div img{width:136px; height:136px;}
|
||||
.nav-menu li.nav-wechat .nav-wechat-box:after {content: '';display: block;width: 20px; height: 20px;background-color: #fff; position: absolute; top: -5px;right: 20px;
|
||||
-webkit-transform: rotate(-45deg);
|
||||
transform: rotate(-45deg);
|
||||
}
|
||||
.nav-menu li.nav-wechat:hover .nav-wechat-box{z-index:99;-webkit-transform:scale(1);transform:scale(1);opacity:1;}
|
||||
|
||||
/*----------------页脚-----------------*/
|
||||
.footer{width:100%; background-color:#1c1a1d;}
|
||||
.footer-top{width:100%; background:url(../images/footer.jpg) no-repeat center bottom; background-size: 100% auto;}
|
||||
@ -124,14 +113,14 @@ a:active {color:#4385F5;}
|
||||
.footer-bottom-box .a{margin-left:10px; color:#bbb;}
|
||||
.footer-bottom-box .r{color:#bbb;}
|
||||
|
||||
.footer-link{padding:36px 0; padding-right:160px;}
|
||||
.footer-link{padding:50px 0; padding-right:160px;}
|
||||
.footer-link dt{font-size:18px; height:48px; line-height: 36px; color:#bbb;}
|
||||
.footer-link dt a{color:#bbb;}
|
||||
.footer-link dd{font-size:14px; line-height:32px;}
|
||||
.footer-link a{color:#888;}
|
||||
.footer-link a:hover{color:#36a0ff;}
|
||||
|
||||
.footer-about{padding:36px 0;}
|
||||
.footer-about{padding:50px 0;}
|
||||
.footer-about dt{font-size:18px; height:48px; line-height: 36px; color:#bbb;}
|
||||
.footer-about dd{line-height:32px; font-size:14px;}
|
||||
.footer-about a{line-height:27px;color:#909090; }
|
||||
@ -141,9 +130,6 @@ a:active {color:#4385F5;}
|
||||
.pagebox{width:100%; text-align:center; font-size:14px;}
|
||||
.pagebox a,.pagebox span{min-width:16px; height:33px; line-height:33px; margin:0 4px; padding:0 10px; color:#333; border-radius:1px; text-align:center; border:1px solid #ddd; background-color:#fff; display:inline-block;}
|
||||
.pagebox a:hover,.pagebox span{background-color:#d79c00; color:#fff; border:1px solid #d79c00;}
|
||||
|
||||
/*----------------分享----------------*/
|
||||
.share-div{width:720px; height:436px;}
|
||||
.data-none{padding:30px 0; text-align: center; color:#999;}
|
||||
/*----------------动画---------------*/
|
||||
.fadeIn {
|
||||
|
@ -1,87 +1,33 @@
|
||||
|
||||
.index{width:100%;margin-top: 60px;}
|
||||
.intro{font-size: 16px; color: rgba(102,102,102,1); width: 1200px; margin:0 auto; padding: 60px 0;}
|
||||
.intro-box{ width: 1220px;display: flex;
|
||||
display: -webkit-box;
|
||||
display: -webkit-flex;
|
||||
display: -ms-flexbox;
|
||||
}
|
||||
.intro-info{ line-height: 2;}
|
||||
.intro-title{font-size: 36px;color: rgba(26,26,26,1); margin: 20px 0 20px 0;}
|
||||
.intro{ width:100%; height:660px; position: relative; background: url(../images/banner_1.png) no-repeat center 0;}
|
||||
.intro-box{ width: 1226px; margin: 0 auto;padding: 60px 0; font-size: 18px; color: #fff; font-weight: 100;}
|
||||
.intro-img{width: 518px; position: absolute; bottom:0; left:0;}
|
||||
.intro-img img{width: 100%;}
|
||||
.intro-info{ line-height: 2.4;}
|
||||
.intro-title{font-size: 42px;color: #fff; margin: 20px 0;}
|
||||
.intro-ops{text-align: center;padding: 60px 0;}
|
||||
.cms-download a{width: 268px; line-height: 66px; font-size: 20px; display: inline-block; background-color: #EB4336; color: #fff; border-radius: 4px;}
|
||||
.cms-download a:hover{opacity: .9;}
|
||||
.cms-version{padding: 32px 0; font-size: 14px;}
|
||||
.cms-version a{color:#fff; margin: 0 10px;}
|
||||
.cms-other a{border: 1px solid #77a5e8; color:#b6d5ff; font-size: 14px; padding: 6px 20px; margin: 0 20px; border-radius: 3px;}
|
||||
.cms-other a:hover{color: #fff; border-color: #fff;}
|
||||
|
||||
.chart-item-wrap{width:1200px;height: 150px; background: rgba(255,255,255,1); box-shadow: 0px 2px 28px 0px rgba(33,7,1,0.17);
|
||||
border-radius: 6px; display: flex;
|
||||
-webkit-flex-wrap: wrap;
|
||||
-ms-flex-wrap: wrap;
|
||||
flex-wrap: wrap;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.chart-item-wrap >a{position: relative; width: 185px; height: 96px; border-right: 1px solid #F5F5F5;text-decoration: none; display: flex; padding:27px;
|
||||
align-items: center;
|
||||
-webkit-flex-direction: column;
|
||||
-ms-flex-direction: column;
|
||||
flex-direction: column;
|
||||
}
|
||||
.chart-item-wrap >a img{width: 60px; height:60px;}
|
||||
.chart-item-wrap >a .sub-title{padding:10px 0; font-size: 18px; display: inline-block;}
|
||||
.chart-item-wrap >a .sub-text { display: none;width: 100%;color: #fff; font-size: 14px; line-height: 1.6;}
|
||||
|
||||
.chart-item-wrap >a:hover {background: #4385F5;color: rgba(255,255,255,1);
|
||||
-webkit-flex-direction: column;
|
||||
-ms-flex-direction: column;
|
||||
flex-direction: column;
|
||||
-webkit-box-pack: start;
|
||||
-webkit-justify-content: flex-start;
|
||||
-ms-flex-pack: start;
|
||||
justify-content: flex-start;
|
||||
-webkit-align-items: flex-start;
|
||||
-webkit-box-align: flex-start;
|
||||
-ms-flex-align: flex-start;
|
||||
align-items: flex-start;
|
||||
}
|
||||
.chart-item-wrap >a:hover img {display: none;}
|
||||
.chart-item-wrap >a:hover span { color: #fff;}
|
||||
.chart-item-wrap >a:hover .sub-text {display: inline-block;}
|
||||
|
||||
.advantage {background:#F8FAFD url(../images/advantage.png) no-repeat center bottom; background-size: 100% auto; width: 100%; text-align: center; padding: 60px 0; font-family: 'Source Han Sans CN';}
|
||||
.advantage-title{font-size: 36px; font-weight: 500; text-align: center;}
|
||||
.advantage {background:#f2f2f2; width: 100%; text-align: center; padding: 100px 0; font-weight: 100;}
|
||||
.advantage-title{font-size: 42px; font-weight: 500; text-align: center;}
|
||||
.advantage-sub-title{font-size: 18px; padding: 20px 0; line-height:2; text-align:center;}
|
||||
.item-wrap{display: flex; padding-top: 50px; justify-content: center;align-items: center;
|
||||
-webkit-box-pack: center;
|
||||
-webkit-justify-content: center;
|
||||
-ms-flex-pack: center;
|
||||
}
|
||||
.advantage-item { width: 272px; font-size: 16px; line-height: 1.5; margin:0 15px; word-wrap: break-word;}
|
||||
.advantage-item { width: 282px; font-size: 16px; line-height: 1.5; margin:0 12px; word-wrap: break-word;}
|
||||
|
||||
.feature {display: block;background: #fff; padding: 36px 20px 20px; margin: 0 0 10px;border-radius: 8px;text-align: center;}
|
||||
.feature:hover { background-color: #4385F5; background: linear-gradient(to left, #4385F5, #00aaff); color: #fff; }
|
||||
.feature .part-icon {display: inline-block;border-radius: 100%;background: #f5f5f5; padding: 20px;width: 60px; height: 60px;}
|
||||
.feature .part-icon {display: inline-block;border-radius: 100%;background: #f5f5f5; padding: 25px;width: 60px; height: 60px;}
|
||||
.part-text h3 {color: #333;font-weight: normal; text-align: center;font-size:18px; padding: 10px 0;}
|
||||
.part-text {text-align: left; line-height: 1.6;font-size: 14px; color: #888; padding: 10px 0;}
|
||||
.feature:hover .part-text h3,.feature:hover .part-text {color: #fff;}
|
||||
.part-icon img { width: 60px;height: 60px;}
|
||||
|
||||
.scene{background:url(../images/tab_bg.jpg) no-repeat 50%;background-size:cover; font-family: 'Source Han Sans CN';}
|
||||
.scene .scene-box{padding:60px 0;}
|
||||
.scene .scene-title{color:#fff; font-size: 36px; font-weight: 500; text-align: center;}
|
||||
.scene .scene-sub-title{color:#fff; font-size: 18px; padding: 20px 0; line-height:2; text-align:center;}
|
||||
.scene .tabs-container{width:1200px;background-color:#fff;margin: 36px auto 10px;}
|
||||
.scene .tabs-header{height:60px; font-size: 18px; display:flex;border-bottom:1px solid #ddd;-webkit-box-pack:space-evenly;-webkit-justify-content:space-evenly;-ms-flex-pack:space-evenly;justify-content:space-evenly}
|
||||
.scene .tab-title{height:100%;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;cursor:pointer;}
|
||||
.scene .tab-title.active{color:#4385F5; border-bottom: 2px solid #4385F5; font-weight: 600;}
|
||||
.scene .tab-content{display:none;padding:36px;}
|
||||
.scene .tab-content.active{display:flex}
|
||||
|
||||
.scene .content-left .text-1{font-size:18px;line-height:2;padding: 50px 0;}
|
||||
.scene .content-left .text-2{font-size:14px;line-height:1.6}
|
||||
.scene .content-right{width:500px;margin-left:100px}
|
||||
|
||||
|
||||
.bottom-banner{width: 100%; padding: 60px 0; text-align: center; background:#F7F7F7 url(../images/bottom-banner.jpg) no-repeat center bottom; background-size: 100% auto; color: #666; font-family: 'Source Han Sans CN';}
|
||||
.bottom-title{font-size: 36px; font-weight: 500; text-align: center;}
|
||||
.bottom-title span{ font-size: 40px; color: #EB3F3B; margin-left:10px;}
|
||||
.bottom-sub-title{font-size: 18px; padding: 20px 0; line-height:2; text-align:center;}
|
||||
.bottom-banner-btn{padding: 20px 0 10px;}
|
||||
.bottom-banner-btn a{padding: 12px 36px 15px; font-size: 16px; background-color:#4385F5; color: #fff; display: inline-block; border-radius: 36px;}
|
||||
.bottom-banner-btn a:hover{opacity: 0.9;}
|
Before Width: | Height: | Size: 341 KiB |
BIN
public/static/home/images/auth.png
Normal file
After Width: | Height: | Size: 7.0 KiB |
BIN
public/static/home/images/bak.png
Normal file
After Width: | Height: | Size: 2.5 KiB |
BIN
public/static/home/images/banner_1.png
Normal file
After Width: | Height: | Size: 30 KiB |
BIN
public/static/home/images/banner_2.png
Normal file
After Width: | Height: | Size: 23 KiB |
BIN
public/static/home/images/banner_bg.png
Normal file
After Width: | Height: | Size: 421 KiB |
Before Width: | Height: | Size: 1.9 MiB |
Before Width: | Height: | Size: 3.7 KiB |
Before Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 37 KiB |
Before Width: | Height: | Size: 4.3 KiB |
BIN
public/static/home/images/code.png
Normal file
After Width: | Height: | Size: 2.9 KiB |
BIN
public/static/home/images/computer.png
Normal file
After Width: | Height: | Size: 109 KiB |
Before Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 606 KiB |
Before Width: | Height: | Size: 622 KiB |
Before Width: | Height: | Size: 193 KiB |
Before Width: | Height: | Size: 3.3 KiB |
BIN
public/static/home/images/log.png
Normal file
After Width: | Height: | Size: 3.4 KiB |
Before Width: | Height: | Size: 246 KiB After Width: | Height: | Size: 247 KiB |
BIN
public/static/home/images/login_logo.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
public/static/home/images/logo.png
Normal file
After Width: | Height: | Size: 8.6 KiB |
Before Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 558 KiB |
Before Width: | Height: | Size: 3.6 KiB |
Before Width: | Height: | Size: 4.2 KiB |
Before Width: | Height: | Size: 61 KiB |
Before Width: | Height: | Size: 278 KiB |
Before Width: | Height: | Size: 610 KiB |
Before Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 1.4 KiB |