作者 Karson

修复弹出窗出现滚动条的BUG

优化插件安装时的错误提示
优化附件管理上传中的文字
优化fastadmin.sql的基础数据
优化后台添加规则的提示
优化Frontend.php的逻辑
优化前台首页第三方资源的加载
更新版本号
... ... @@ -40,7 +40,10 @@ class Addon extends Command
{
throw new Exception('Please input correct action name');
}
// 查询一次SQL,判断连接是否正常
Db::execute("SELECT 1");
$addonDir = ADDON_PATH . $name;
switch ($action)
{
... ...
... ... @@ -51,6 +51,7 @@ class Install extends Command
Db::getPdo()->exec($sql);
file_put_contents($installLockFile, 1);
$output->info("Install Successed!");
}
... ...
... ... @@ -179,13 +179,13 @@ CREATE TABLE `fa_category` (
PRIMARY KEY (`id`),
KEY `weigh` (`weigh`,`id`),
KEY `pid` (`pid`)
) ENGINE=InnoDB AUTO_INCREMENT=27 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='分类表';
) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='分类表';
-- ----------------------------
-- Records of `fa_category`
-- ----------------------------
BEGIN;
INSERT INTO `fa_category` VALUES ('1', '0', 'page', '官方新闻', 'news', 'recommend', '/assets/img/qrcode.png', '', '', 'news', '1495262190', '1495262190', '1', 'normal'), ('2', '0', 'page', '移动应用', 'mobileapp', 'hot', '/assets/img/qrcode.png', '', '', 'mobileapp', '1495262244', '1495262244', '2', 'normal'), ('3', '2', 'page', '微信公众号', 'wechatpublic', 'index', '/assets/img/qrcode.png', '', '', 'wechatpublic', '1495262288', '1495262288', '3', 'normal'), ('4', '2', 'page', 'Android开发', 'android', 'recommend', '/assets/img/qrcode.png', '', '', 'android', '1495262317', '1495262317', '4', 'normal'), ('5', '0', 'page', '软件产品', 'software', 'recommend', '/assets/img/qrcode.png', '', '', 'software', '1495262336', '1499681850', '5', 'normal'), ('6', '5', 'page', '网站建站', 'website', 'recommend', '/assets/img/qrcode.png', '', '', 'website', '1495262357', '1495262357', '6', 'normal'), ('7', '5', 'page', '企业管理软件', 'company', 'index', '/assets/img/qrcode.png', '', '', 'company', '1495262391', '1495262391', '7', 'normal'), ('8', '6', 'page', 'PC端', 'website-pc', 'recommend', '/assets/img/qrcode.png', '', '', 'website-pc', '1495262424', '1495262424', '8', 'normal'), ('9', '6', 'page', '移动端', 'website-mobile', 'recommend', '/assets/img/qrcode.png', '', '', 'website-mobile', '1495262456', '1495262456', '9', 'normal'), ('10', '7', 'page', 'CRM系统 ', 'company-crm', 'recommend', '/assets/img/qrcode.png', '', '', 'company-crm', '1495262487', '1495262487', '10', 'normal'), ('11', '7', 'page', 'SASS平台软件', 'company-sass', 'recommend', '/assets/img/qrcode.png', '', '', 'company-sass', '1495262515', '1495262515', '11', 'normal'), ('12', '0', 'test', '测试1', 'test1', 'recommend', '/assets/img/qrcode.png', '', '', 'test1', '1497015727', '1497015727', '12', 'normal'), ('13', '0', 'test', '测试2', 'test2', 'recommend', '/assets/img/qrcode.png', '', '', 'test2', '1497015738', '1497015738', '13', 'normal'), ('14', '0', 'page', '官方新闻', 'news', 'recommend', '/assets/img/qrcode.png', '', '', 'news', '1495262190', '1495262190', '1', 'normal'), ('15', '0', 'page', '移动应用', 'mobileapp', 'hot', '/assets/img/qrcode.png', '', '', 'mobileapp', '1495262244', '1495262244', '2', 'normal'), ('16', '2', 'page', '微信公众号', 'wechatpublic', 'index', '/assets/img/qrcode.png', '', '', 'wechatpublic', '1495262288', '1495262288', '3', 'normal'), ('17', '2', 'page', 'Android开发', 'android', 'recommend', '/assets/img/qrcode.png', '', '', 'android', '1495262317', '1495262317', '4', 'normal'), ('18', '0', 'page', '软件产品', 'software', 'recommend', '/assets/img/qrcode.png', '', '', 'software', '1495262336', '1499681850', '5', 'normal'), ('19', '5', 'page', '网站建站', 'website', 'recommend', '/assets/img/qrcode.png', '', '', 'website', '1495262357', '1495262357', '6', 'normal'), ('20', '5', 'page', '企业管理软件', 'company', 'index', '/assets/img/qrcode.png', '', '', 'company', '1495262391', '1495262391', '7', 'normal'), ('21', '6', 'page', 'PC端', 'website-pc', 'recommend', '/assets/img/qrcode.png', '', '', 'website-pc', '1495262424', '1495262424', '8', 'normal'), ('22', '6', 'page', '移动端', 'website-mobile', 'recommend', '/assets/img/qrcode.png', '', '', 'website-mobile', '1495262456', '1495262456', '9', 'normal'), ('23', '7', 'page', 'CRM系统 ', 'company-crm', 'recommend', '/assets/img/qrcode.png', '', '', 'company-crm', '1495262487', '1495262487', '10', 'normal'), ('24', '7', 'page', 'SASS平台软件', 'company-sass', 'recommend', '/assets/img/qrcode.png', '', '', 'company-sass', '1495262515', '1495262515', '11', 'normal'), ('25', '0', 'test', '测试1', 'test1', 'recommend', '/assets/img/qrcode.png', '', '', 'test1', '1497015727', '1497015727', '12', 'normal'), ('26', '0', 'test', '测试2', 'test2', 'recommend', '/assets/img/qrcode.png', '', '', 'test2', '1497015738', '1497015738', '13', 'normal');
INSERT INTO `fa_category` VALUES ('1', '0', 'page', '官方新闻', 'news', 'recommend', '/assets/img/qrcode.png', '', '', 'news', '1495262190', '1495262190', '1', 'normal'), ('2', '0', 'page', '移动应用', 'mobileapp', 'hot', '/assets/img/qrcode.png', '', '', 'mobileapp', '1495262244', '1495262244', '2', 'normal'), ('3', '2', 'page', '微信公众号', 'wechatpublic', 'index', '/assets/img/qrcode.png', '', '', 'wechatpublic', '1495262288', '1495262288', '3', 'normal'), ('4', '2', 'page', 'Android开发', 'android', 'recommend', '/assets/img/qrcode.png', '', '', 'android', '1495262317', '1495262317', '4', 'normal'), ('5', '0', 'page', '软件产品', 'software', 'recommend', '/assets/img/qrcode.png', '', '', 'software', '1495262336', '1499681850', '5', 'normal'), ('6', '5', 'page', '网站建站', 'website', 'recommend', '/assets/img/qrcode.png', '', '', 'website', '1495262357', '1495262357', '6', 'normal'), ('7', '5', 'page', '企业管理软件', 'company', 'index', '/assets/img/qrcode.png', '', '', 'company', '1495262391', '1495262391', '7', 'normal'), ('8', '6', 'page', 'PC端', 'website-pc', 'recommend', '/assets/img/qrcode.png', '', '', 'website-pc', '1495262424', '1495262424', '8', 'normal'), ('9', '6', 'page', '移动端', 'website-mobile', 'recommend', '/assets/img/qrcode.png', '', '', 'website-mobile', '1495262456', '1495262456', '9', 'normal'), ('10', '7', 'page', 'CRM系统 ', 'company-crm', 'recommend', '/assets/img/qrcode.png', '', '', 'company-crm', '1495262487', '1495262487', '10', 'normal'), ('11', '7', 'page', 'SASS平台软件', 'company-sass', 'recommend', '/assets/img/qrcode.png', '', '', 'company-sass', '1495262515', '1495262515', '11', 'normal'), ('12', '0', 'test', '测试1', 'test1', 'recommend', '/assets/img/qrcode.png', '', '', 'test1', '1497015727', '1497015727', '12', 'normal'), ('13', '0', 'test', '测试2', 'test2', 'recommend', '/assets/img/qrcode.png', '', '', 'test2', '1497015738', '1497015738', '13', 'normal');
COMMIT;
-- ----------------------------
... ...
... ... @@ -7,6 +7,7 @@ return [
'Icon' => '图标',
'Alert' => '警告',
'Name' => '规则URL',
'Controller/Action' => '控制器名/方法名',
'Ismenu' => '菜单',
'The non-menu rule must have parent' => '非菜单规则节点必须有父级',
'If not necessary, use the command line to build rule' => '非必要情况下请直接使用命令行php think menu来生成',
... ...
<?php
return [
'Url' => '物理路径',
'Imagewidth' => '宽度',
'Imageheight' => '宽度',
'Imagetype' => '图片类型',
'Imageframes' => '图片帧数',
'Preview' => '预览',
'Filesize' => '文件大小',
'Mimetype' => 'Mime类型',
'Extparam' => '透传数据',
'Createtime' => '创建日期',
'Uploadtime' => '上传时间',
'Storage' => '存储引擎',
'Upload by summernote' => '从编辑器上传'
'Url' => '物理路径',
'Imagewidth' => '宽度',
'Imageheight' => '宽度',
'Imagetype' => '图片类型',
'Imageframes' => '图片帧数',
'Preview' => '预览',
'Filesize' => '文件大小',
'Mimetype' => 'Mime类型',
'Extparam' => '透传数据',
'Createtime' => '创建日期',
'Uploadtime' => '上传时间',
'Storage' => '存储引擎',
'Upload to third' => '上传到第三方',
'Upload to local' => '上传到本地',
'Upload from editor' => '从编辑器上传'
];
... ...
... ... @@ -18,7 +18,7 @@
<div class="form-group">
<label for="name" class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label>
<div class="col-xs-12 col-sm-8">
<input type="text" class="form-control" id="name" name="row[name]" value="" data-rule="required" />
<input type="text" class="form-control" id="name" name="row[name]" placeholder="{:__('Controller/Action')}" value="" data-rule="required" />
</div>
</div>
<div class="form-group">
... ...
... ... @@ -14,7 +14,7 @@
<div class="form-group">
<label for="name" class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label>
<div class="col-xs-12 col-sm-8">
<input type="text" class="form-control" id="name" name="row[name]" value="{$row.name}" data-rule="required" />
<input type="text" class="form-control" id="name" name="row[name]" placeholder="{:__('Controller/Action')}" value="{$row.name}" data-rule="required" />
</div>
</div>
<div class="form-group">
... ...
<form id="add-form" class="form-horizontal form-ajax" role="form" data-toggle="validator" method="POST" action="">
{if $config.upload.cdnurl}
<div class="form-group">
<label for="c-upyun" class="control-label col-xs-12 col-sm-2">{:__('Upload')}:</label>
<label for="c-third" class="control-label col-xs-12 col-sm-2">{:__('Upload')}:</label>
<div class="col-xs-12 col-sm-8">
<input type="text" name="row[upyun]" id="c-upyun" class="form-control" />
<input type="text" name="row[third]" id="c-third" class="form-control" />
</div>
</div>
<div class="form-group">
<label for="c-upyun" class="control-label col-xs-12 col-sm-2"></label>
<label for="c-third" class="control-label col-xs-12 col-sm-2"></label>
<div class="col-xs-12 col-sm-8">
<button id="plupload-upyun" class="btn btn-danger plupload" data-input-id="c-upyun" ><i class="fa fa-upload"></i> {:__("Upload to upyun")}</button>
<button id="plupload-third" class="btn btn-danger plupload" data-input-id="c-third" ><i class="fa fa-upload"></i> {:__("Upload to third")}</button>
</div>
</div>
{/if}
<div class="form-group">
<label for="c-local" class="control-label col-xs-12 col-sm-2">{:__('Upload')}:</label>
... ... @@ -28,9 +30,9 @@
</div>
<div class="form-group">
<label for="c-local" class="control-label col-xs-12 col-sm-2">{:__('Upload by summernote')}:</label>
<label for="c-editor" class="control-label col-xs-12 col-sm-2">{:__('Upload from editor')}:</label>
<div class="col-xs-12 col-sm-8">
<textarea name="row[summernote]" id="c-summernote" cols="60" rows="5" class="summernote"></textarea>
<textarea name="row[editor]" id="c-editor" cols="60" rows="5" class="form-control editor"></textarea>
</div>
</div>
<div class="form-group hidden layer-footer">
... ...
... ... @@ -2,28 +2,14 @@
namespace app\common\controller;
use app\common\library\Auth;
use think\Config;
use think\Controller;
use think\Lang;
use think\Session;
class Frontend extends Controller
{
/**
*
* @var Auth
*/
protected $user = null;
/**
* 无需登录的方法,默认全部都无需登录
* @var array
*/
protected $noNeedLogin = ['*'];
/**
* 布局模板
* @var string
*/
... ... @@ -37,8 +23,6 @@ class Frontend extends Controller
$controllername = strtolower($this->request->controller());
$actionname = strtolower($this->request->action());
$path = '/' . $modulename . '/' . str_replace('.', '/', $controllername) . '/' . $actionname;
// 如果有使用模板布局
if ($this->layout)
{
... ... @@ -66,17 +50,6 @@ class Frontend extends Controller
$this->assign('config', $config);
}
protected function checkLogin()
{
//检测是否登录
if (!$this->user->isLogin())
{
$url = Session::get('referer');
$url = $url ? $url : $this->request->url();
$this->error(__('Please login first'), url('/user/login', ['url' => $url]));
}
}
/**
* 加载语言文件
* @param string $name
... ...
... ... @@ -4,6 +4,7 @@ namespace app\common\library;
use app\admin\model\AuthRule;
use fast\Tree;
use think\Exception;
use think\exception\PDOException;
class Menu
... ... @@ -46,7 +47,7 @@ class Menu
}
catch (PDOException $e)
{
print_r($e);
throw new Exception($e->getMessage());
}
}
}
... ...
... ... @@ -242,7 +242,7 @@ return [
],
//FastAdmin配置
'fastadmin' => [
'version' => '1.0.0.20170808_beta',
'version' => '1.0.0.20170816_beta',
'api_url' => 'http://api.fastadmin.net',
],
];
... ...
... ... @@ -15,11 +15,6 @@
<link href="//cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
<link href="/assets/css/index.css" rel="stylesheet">
<!-- Custom Fonts -->
<link href="https://fonts.lug.ustc.edu.cn/css?family=Lato" rel="stylesheet">
<link href="https://fonts.lug.ustc.edu.cn/css?family=Catamaran:100,200,300,400,500,600,700,800,900" rel="stylesheet">
<link href="https://fonts.lug.ustc.edu.cn/css?family=Muli" rel="stylesheet">
<!-- Plugin CSS -->
<link href="//cdn.bootcss.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
<link href="//cdn.bootcss.com/simple-line-icons/2.4.1/css/simple-line-icons.min.css" rel="stylesheet">
... ...
... ... @@ -595,6 +595,9 @@ table.table-template {
border: none!important;
box-shadow: 1px 1px 50px rgba(0, 0, 0, 0.3) !important;
}
.layui-layer-fast.layui-layer-iframe {
overflow: hidden!important;
}
.layui-layer-fast .layui-layer-moves {
-webkit-box-sizing: content-box;
-moz-box-sizing: content-box;
... ...
... ... @@ -620,6 +620,9 @@ table.table-template{
border:none!important;
box-shadow: 1px 1px 50px rgba(0,0,0,.3)!important;
}
&.layui-layer-iframe {
overflow:hidden!important;
}
.layui-layer-moves{
.box-sizing(content-box);
}
... ...