mirror of https://gitee.com/karson/fastadmin.git
parent
e4dfd7082d
commit
c247d4d108
|
|
@ -2,8 +2,6 @@
|
||||||
|
|
||||||
namespace app\admin\behavior;
|
namespace app\admin\behavior;
|
||||||
|
|
||||||
use think\Config;
|
|
||||||
|
|
||||||
class AdminLog
|
class AdminLog
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@
|
||||||
<ul class="nav navbar-nav">
|
<ul class="nav navbar-nav">
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
<a href="{:url('index/index/index')}" target="_blank"><i class="fa fa-home" style="font-size:14px;"></i></a>
|
<a href="__PUBLIC__" target="_blank"><i class="fa fa-home" style="font-size:14px;"></i></a>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="dropdown notifications-menu">
|
<li class="dropdown notifications-menu">
|
||||||
|
|
|
||||||
|
|
@ -13,21 +13,31 @@ class Common
|
||||||
mb_internal_encoding("UTF-8");
|
mb_internal_encoding("UTF-8");
|
||||||
|
|
||||||
// 如果修改了index.php入口地址,则需要手动修改cdnurl的值
|
// 如果修改了index.php入口地址,则需要手动修改cdnurl的值
|
||||||
$cdnurl = preg_replace("/\/(\w+)\.php$/i", '', $request->root());
|
$url = preg_replace("/\/(\w+)\.php$/i", '', $request->root());
|
||||||
// 如果未设置__CDN__则自动匹配得出
|
// 如果未设置__CDN__则自动匹配得出
|
||||||
if (!Config::get('view_replace_str.__CDN__'))
|
if (!Config::get('view_replace_str.__CDN__'))
|
||||||
{
|
{
|
||||||
Config::set('view_replace_str.__CDN__', $cdnurl);
|
Config::set('view_replace_str.__CDN__', $url);
|
||||||
|
}
|
||||||
|
// 如果未设置__PUBLIC__则自动匹配得出
|
||||||
|
if (!Config::get('view_replace_str.__PUBLIC__'))
|
||||||
|
{
|
||||||
|
Config::set('view_replace_str.__PUBLIC__', $url . '/');
|
||||||
|
}
|
||||||
|
// 如果未设置__ROOT__则自动匹配得出
|
||||||
|
if (!Config::get('view_replace_str.__ROOT__'))
|
||||||
|
{
|
||||||
|
Config::set('view_replace_str.__ROOT__', preg_replace("/\/public\/$/", '', $url . '/'));
|
||||||
}
|
}
|
||||||
// 如果未设置cdnurl则自动匹配得出
|
// 如果未设置cdnurl则自动匹配得出
|
||||||
if (!Config::get('site.cdnurl'))
|
if (!Config::get('site.cdnurl'))
|
||||||
{
|
{
|
||||||
Config::set('site.cdnurl', $cdnurl);
|
Config::set('site.cdnurl', $url);
|
||||||
}
|
}
|
||||||
// 如果未设置cdnurl则自动匹配得出
|
// 如果未设置cdnurl则自动匹配得出
|
||||||
if (!Config::get('upload.cdnurl'))
|
if (!Config::get('upload.cdnurl'))
|
||||||
{
|
{
|
||||||
Config::set('upload.cdnurl', $cdnurl);
|
Config::set('upload.cdnurl', $url);
|
||||||
}
|
}
|
||||||
if (Config::get('app_debug'))
|
if (Config::get('app_debug'))
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,11 @@ class Category Extends Model
|
||||||
'flag_text',
|
'flag_text',
|
||||||
];
|
];
|
||||||
|
|
||||||
|
public function setFlagAttr($value, $data)
|
||||||
|
{
|
||||||
|
return is_array($value) ? implode(',', $value) : $value;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 读取分类类型
|
* 读取分类类型
|
||||||
* @return array
|
* @return array
|
||||||
|
|
|
||||||
|
|
@ -132,10 +132,10 @@ return [
|
||||||
'taglib_end' => '}',
|
'taglib_end' => '}',
|
||||||
'tpl_cache' => true,
|
'tpl_cache' => true,
|
||||||
],
|
],
|
||||||
// 视图输出字符串内容替换
|
// 视图输出字符串内容替换,留空则会自动进行计算
|
||||||
'view_replace_str' => [
|
'view_replace_str' => [
|
||||||
'__PUBLIC__' => '/public/',
|
'__PUBLIC__' => '',
|
||||||
'__ROOT__' => '/',
|
'__ROOT__' => '',
|
||||||
'__CDN__' => '',
|
'__CDN__' => '',
|
||||||
],
|
],
|
||||||
// 默认跳转页面对应的模板文件
|
// 默认跳转页面对应的模板文件
|
||||||
|
|
|
||||||
|
|
@ -9585,7 +9585,6 @@ define('table',['jquery', 'bootstrap', 'moment', 'moment/locale/zh-cn', 'bootstr
|
||||||
// 导入按钮事件
|
// 导入按钮事件
|
||||||
if ($(Table.config.importbtn, toolbar).size() > 0) {
|
if ($(Table.config.importbtn, toolbar).size() > 0) {
|
||||||
require(['upload'], function (Upload) {
|
require(['upload'], function (Upload) {
|
||||||
console.log($(Table.config.importbtn, toolbar));
|
|
||||||
Upload.api.plupload($(Table.config.importbtn, toolbar), function (data, ret) {
|
Upload.api.plupload($(Table.config.importbtn, toolbar), function (data, ret) {
|
||||||
Fast.api.ajax({
|
Fast.api.ajax({
|
||||||
url: options.extend.import_url,
|
url: options.extend.import_url,
|
||||||
|
|
@ -12557,7 +12556,7 @@ define('form',['jquery', 'bootstrap', 'upload', 'validator'], function ($, undef
|
||||||
that.holdSubmit(false);
|
that.holdSubmit(false);
|
||||||
submitBtn.removeClass("disabled");
|
submitBtn.removeClass("disabled");
|
||||||
if (typeof success === 'function') {
|
if (typeof success === 'function') {
|
||||||
if (!success.call($(this), data, ret)) {
|
if (false === success.call($(this), data, ret)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -12571,7 +12570,7 @@ define('form',['jquery', 'bootstrap', 'upload', 'validator'], function ($, undef
|
||||||
that.holdSubmit(false);
|
that.holdSubmit(false);
|
||||||
submitBtn.removeClass("disabled");
|
submitBtn.removeClass("disabled");
|
||||||
if (typeof error === 'function') {
|
if (typeof error === 'function') {
|
||||||
if (!error.call($(this), data, ret)) {
|
if (false === error.call($(this), data, ret)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -12728,7 +12727,7 @@ define('form',['jquery', 'bootstrap', 'upload', 'validator'], function ($, undef
|
||||||
if (form.size() === 0)
|
if (form.size() === 0)
|
||||||
return Toastr.error("表单未初始化完成,无法提交");
|
return Toastr.error("表单未初始化完成,无法提交");
|
||||||
if (typeof submit === 'function') {
|
if (typeof submit === 'function') {
|
||||||
if (!submit.call(form)) {
|
if (false === submit.call(form)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -12774,7 +12773,7 @@ define('form',['jquery', 'bootstrap', 'upload', 'validator'], function ($, undef
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (typeof success === 'function') {
|
if (typeof success === 'function') {
|
||||||
if (!success.call(form, data, ret)) {
|
if (false === success.call(form, data, ret)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -12783,7 +12782,7 @@ define('form',['jquery', 'bootstrap', 'upload', 'validator'], function ($, undef
|
||||||
$("input[name='__token__']", form).val(data.token);
|
$("input[name='__token__']", form).val(data.token);
|
||||||
}
|
}
|
||||||
if (typeof error === 'function') {
|
if (typeof error === 'function') {
|
||||||
if (!error.call(form, data, ret)) {
|
if (false === error.call(form, data, ret)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@ define(['jquery', 'bootstrap', 'upload', 'validator'], function ($, undefined, U
|
||||||
that.holdSubmit(false);
|
that.holdSubmit(false);
|
||||||
submitBtn.removeClass("disabled");
|
submitBtn.removeClass("disabled");
|
||||||
if (typeof success === 'function') {
|
if (typeof success === 'function') {
|
||||||
if (!success.call($(this), data, ret)) {
|
if (false === success.call($(this), data, ret)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -48,7 +48,7 @@ define(['jquery', 'bootstrap', 'upload', 'validator'], function ($, undefined, U
|
||||||
that.holdSubmit(false);
|
that.holdSubmit(false);
|
||||||
submitBtn.removeClass("disabled");
|
submitBtn.removeClass("disabled");
|
||||||
if (typeof error === 'function') {
|
if (typeof error === 'function') {
|
||||||
if (!error.call($(this), data, ret)) {
|
if (false === error.call($(this), data, ret)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -205,7 +205,7 @@ define(['jquery', 'bootstrap', 'upload', 'validator'], function ($, undefined, U
|
||||||
if (form.size() === 0)
|
if (form.size() === 0)
|
||||||
return Toastr.error("表单未初始化完成,无法提交");
|
return Toastr.error("表单未初始化完成,无法提交");
|
||||||
if (typeof submit === 'function') {
|
if (typeof submit === 'function') {
|
||||||
if (!submit.call(form)) {
|
if (false === submit.call(form)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -251,7 +251,7 @@ define(['jquery', 'bootstrap', 'upload', 'validator'], function ($, undefined, U
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (typeof success === 'function') {
|
if (typeof success === 'function') {
|
||||||
if (!success.call(form, data, ret)) {
|
if (false === success.call(form, data, ret)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -260,7 +260,7 @@ define(['jquery', 'bootstrap', 'upload', 'validator'], function ($, undefined, U
|
||||||
$("input[name='__token__']", form).val(data.token);
|
$("input[name='__token__']", form).val(data.token);
|
||||||
}
|
}
|
||||||
if (typeof error === 'function') {
|
if (typeof error === 'function') {
|
||||||
if (!error.call(form, data, ret)) {
|
if (false === error.call(form, data, ret)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -161,7 +161,6 @@ define(['jquery', 'bootstrap', 'moment', 'moment/locale/zh-cn', 'bootstrap-table
|
||||||
// 导入按钮事件
|
// 导入按钮事件
|
||||||
if ($(Table.config.importbtn, toolbar).size() > 0) {
|
if ($(Table.config.importbtn, toolbar).size() > 0) {
|
||||||
require(['upload'], function (Upload) {
|
require(['upload'], function (Upload) {
|
||||||
console.log($(Table.config.importbtn, toolbar));
|
|
||||||
Upload.api.plupload($(Table.config.importbtn, toolbar), function (data, ret) {
|
Upload.api.plupload($(Table.config.importbtn, toolbar), function (data, ret) {
|
||||||
Fast.api.ajax({
|
Fast.api.ajax({
|
||||||
url: options.extend.import_url,
|
url: options.extend.import_url,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue