[更新]修改模板代码

This commit is contained in:
Anyon 2019-09-21 13:02:22 +08:00
parent 8b5cd005f9
commit 369b76a7ae
7 changed files with 101 additions and 93 deletions

View File

@ -1,72 +1,80 @@
{extend name="main"} {extend name="main"}
{block name="content"} {block name="content"}
<div class="relative">
<div class="think-box-shadow border-0 margin-bottom-15"> <div class="think-box-shadow margin-bottom-15">
<span class="color-green font-w7">文件存储引擎:</span> <span class="color-green font-w7">文件存储引擎:</span>
{foreach ['local'=>'本地服务器存储','qiniu'=>'七牛云对象存储','oss'=>'阿里云OSS存储'] as $k=>$v} {foreach ['local'=>'本地服务器存储','qiniu'=>'七牛云对象存储','oss'=>'阿里云OSS存储'] as $k=>$v}
{if sysconf('storage_type') eq $k} {if sysconf('storage_type') eq $k}
{if auth('file')}<a data-modal="{:url('file')}?type={$k}" class="layui-btn layui-btn-sm">{$v}</a>{else}<a class="layui-btn layui-btn-sm">{$v}</a>{/if} {if auth('file')}<a data-modal="{:url('file')}?type={$k}" class="layui-btn layui-btn-sm">{$v}</a>{else}<a class="layui-btn layui-btn-sm">{$v}</a>{/if}
{elseif auth('file')}<a data-modal="{:url('file')}?type={$k}" class="layui-btn layui-btn-sm layui-btn-primary">{$v}</a>{/if} {elseif auth('file')}<a data-modal="{:url('file')}?type={$k}" class="layui-btn layui-btn-sm layui-btn-primary">{$v}</a>{/if}
{/foreach} {/foreach}
</div>
<form onsubmit="return false" data-auto="true" action="{:url()}" method="post" class="think-box-shadow padding-40">
<div class="layui-form-item">
<label class="relative block">
<span class="color-green font-w7">程序名称</span>
<span class="color-desc margin-left-5">Name</span>
<input name="app_name" required placeholder="请输入程序名称" value="{:sysconf('app_name')}" class="layui-input">
</label>
<p class="help-block">程序名称,在后台主标题上显示 {:sysconf('app_name')}</p>
</div> </div>
<form onsubmit="return false;" data-auto="true" action="{:url()}" method="post" class="think-box-shadow padding-40"> <div class="layui-form-item">
<div class="layui-form-item"> <label class="relative block">
<label class="relative block"> <span class="color-green font-w7">程序版本</span>
<span class="color-green font-w7">程序名称</span> <span class="color-desc margin-left-5">Version</span>
<span class="color-desc margin-left-5">Name</span> <input name="app_version" placeholder="请输入程序版本" value="{:sysconf('app_version')}" class="layui-input">
<input name="app_name" required placeholder="请输入程序名称" value="{:sysconf('app_name')}" class="layui-input"> </label>
</label> <p class="help-block">程序版本,在后台主标题上标显示版本 {:sysconf('app_version')}</p>
<p class="help-block">当前程序名称,在后台主标题上显示 {:sysconf('app_name')}</p> </div>
<div class="layui-form-item">
<label class="relative block">
<span class="color-green font-w7">网站名称</span>
<span class="color-desc margin-left-5">Website</span>
<input name="site_name" required placeholder="请输入网站名称" value="{:sysconf('site_name')}" class="layui-input">
</label>
<p class="help-block">网站名称,将在浏览器的标签上显示 {:sysconf('site_name')}</p>
</div>
<div class="layui-form-item">
<span class="color-green font-w7">浏览器图标</span>
<span class="color-desc margin-left-5">Browser</span>
<div class="relative block">
<img alt="icon" data-tips-image style="height:auto;max-height:32px;min-width:32px" src="{:sysconf('site_icon')}"/>
<input type="hidden" name="site_icon" onchange="$(this).prev('img').attr('src', this.value)" value="{:sysconf('site_icon')}" class="layui-input">
<a class="margin-left-10" data-file="btn" data-type="ico,png" data-field="site_icon">上传图片</a>
<p class="help-block">建议上传 ICO 图标的尺寸为 128x128 <a href="http://www.favicon-icon-generator.com" target="_blank">ICON在线制作</a></p>
</div> </div>
<div class="layui-form-item"> </div>
<label class="relative block">
<span class="color-green font-w7">程序版本</span> <div class="layui-form-item">
<span class="color-desc margin-left-5">Version</span> <label class="relative block">
<input name="app_version" placeholder="请输入程序版本" value="{:sysconf('app_version')}" class="layui-input"> <span class="color-green font-w7">网站备案号</span>
</label> <span class="color-desc margin-left-5">Miitbeian</span>
<p class="help-block">当前程序版本号,在后台主标题上标显示版本 {:sysconf('app_version')}</p> <input name="miitbeian" placeholder="请输入网站备案号" value="{:sysconf('miitbeian')}" class="layui-input">
</div> </label>
<div class="layui-form-item"> <p class="help-block">网站备案号,可以在<a target="_blank" href="http://beian.miit.gov.cn">备案管理中心</a>查询获取,将在登录页面下面显示</p>
<label class="relative block"> </div>
<span class="color-green font-w7">网站名称</span>
<span class="color-desc margin-left-5">Website</span> <div class="layui-form-item">
<input name="site_name" required placeholder="请输入网站名称" value="{:sysconf('site_name')}" class="layui-input"> <label class="relative block">
</label> <span class="color-green font-w7">网站版权信息</span>
<p class="help-block">网站名称,将在浏览器的标签上显示 {:sysconf('site_name')}</p> <span class="color-desc margin-left-5">Copyright</span>
</div> <input name="site_copy" required placeholder="请输入版权信息" value="{:sysconf('site_copy')}" class="layui-input">
<div class="layui-form-item"> </label>
<span class="color-green font-w7">浏览器图标</span> <p class="help-block">网站版权信息,在后台登录页面显示版本信息并链接到备案到信息备案管理系统</p>
<span class="color-desc margin-left-5">Browser</span> </div>
<div class="relative block">
<img alt="icon" data-tips-image style="height:auto;max-height:32px;min-width:32px" src="{:sysconf('site_icon')}"/> <div class="hr-line-dashed"></div>
<input type="hidden" name="site_icon" onchange="$(this).prev('img').attr('src', this.value)" value="{:sysconf('site_icon')}" class="layui-input">
<a class="margin-left-10" data-file="btn" data-type="ico,png" data-field="site_icon">上传图片</a> <div class="layui-form-item text-center">
<p class="help-block">建议上传 ICO 图标的尺寸为 128x128<a href="http://www.favicon-icon-generator.com" target="_blank">ICON在线制作</a></p> <button class="layui-btn" type="submit">保存配置</button>
</div> </div>
</div>
<div class="layui-form-item"> </form>
<label class="relative block">
<span class="color-green font-w7">版权信息</span>
<span class="color-desc margin-left-5">Copyright</span>
<input name="site_copy" required placeholder="请输入版权信息" value="{:sysconf('site_copy')}" class="layui-input">
</label>
<p class="help-block">程序的版权信息设置,在后台登录页面显示版本信息</p>
</div>
<div class="layui-form-item">
<label class="relative block">
<span class="color-green font-w7">网站备案号</span>
<span class="color-desc margin-left-5">Miitbeian</span>
<input name="miitbeian" placeholder="请输入网站备案号" value="{:sysconf('miitbeian')}" class="layui-input">
</label>
<p class="help-block">网站备案号,可以在<a target="_blank" href="http://www.miitbeian.gov.cn">备案管理中心</a>查询获取,将在登录页面下面显示</p>
</div>
<div class="hr-line-dashed"></div>
<div class="layui-form-item text-center">
<button class="layui-btn" type="submit">保存配置</button>
</div>
</form>
</div>
{/block} {/block}

View File

@ -14,15 +14,15 @@
<div class="layui-form-item"> <div class="layui-form-item">
<label class="layui-form-label label-required">Protocol<br><span class="nowrap color-desc">访问协议</span></label> <label class="layui-form-label label-required">Protocol<br><span class="nowrap color-desc">访问协议</span></label>
<div class="layui-input-block"> <div class="layui-input-block">
<!--{foreach ['http','https','auto'] as $pro}--> {foreach ['http','https','auto'] as $pro}
<label class="think-radio"> <label class="think-radio">
<!--{if sysconf('storage_oss_is_https') eq $pro}--> {if sysconf('storage_oss_is_https') eq $pro}
<input checked type="radio" name="storage_oss_is_https" value="{$pro}" lay-ignore> {$pro} <input checked type="radio" name="storage_oss_is_https" value="{$pro}" lay-ignore> {$pro}
<!--{else}--> {else}
<input type="radio" name="storage_oss_is_https" value="{$pro}" lay-ignore> {$pro} <input type="radio" name="storage_oss_is_https" value="{$pro}" lay-ignore> {$pro}
<!--{/if}--> {/if}
</label> </label>
<!--{/foreach}--> {/foreach}
<p class="help-block">阿里云对象存储访问协议http、https、auto其中 https 需要配置证书才能使用auto 为相对协议自动根据域名切换http与https。</p> <p class="help-block">阿里云对象存储访问协议http、https、auto其中 https 需要配置证书才能使用auto 为相对协议自动根据域名切换http与https。</p>
</div> </div>
</div> </div>
@ -38,11 +38,11 @@
<div class="layui-input-block"> <div class="layui-input-block">
<select required name="storage_oss_endpoint" class="layui-select" lay-search> <select required name="storage_oss_endpoint" class="layui-select" lay-search>
{foreach $ossPoints as $k=>$p} {foreach $ossPoints as $k=>$p}
<!--{if sysconf('storage_oss_endpoint') eq $k}--> {if sysconf('storage_oss_endpoint') eq $k}
<option selected value="{$k}">{$p} <span class="font-s10 color-desc">({$k})</span></option> <option selected value="{$k}">{$p} <span class="font-s10 color-desc">({$k})</span></option>
<!--{else}--> {else}
<option value="{$k}">{$p} <span class="font-s10 color-desc">({$k})</span></option> <option value="{$k}">{$p} <span class="font-s10 color-desc">({$k})</span></option>
<!--{/if}--> {/if}
{/foreach} {/foreach}
</select> </select>
<p class="help-block">请选择OSS数据中心访问节点有效值如oss-cn-shenzhen.aliyuncs.com</p> <p class="help-block">请选择OSS数据中心访问节点有效值如oss-cn-shenzhen.aliyuncs.com</p>

View File

@ -14,15 +14,15 @@
<div class="layui-form-item" data-storage-type="qiniu"> <div class="layui-form-item" data-storage-type="qiniu">
<label class="layui-form-label label-required">Protocol<br><span class="nowrap color-desc">访问协议</span></label> <label class="layui-form-label label-required">Protocol<br><span class="nowrap color-desc">访问协议</span></label>
<div class="layui-input-block"> <div class="layui-input-block">
<!--{foreach ['http','https','auto'] as $pro}--> {foreach ['http','https','auto'] as $pro}
<label class="think-radio"> <label class="think-radio">
<!--{if sysconf('storage_qiniu_is_https') eq $pro}--> {if sysconf('storage_qiniu_is_https') eq $pro}
<input checked type="radio" name="storage_qiniu_is_https" value="{$pro}" lay-ignore> {$pro} <input checked type="radio" name="storage_qiniu_is_https" value="{$pro}" lay-ignore> {$pro}
<!--{else}--> {else}
<input type="radio" name="storage_qiniu_is_https" value="{$pro}" lay-ignore> {$pro} <input type="radio" name="storage_qiniu_is_https" value="{$pro}" lay-ignore> {$pro}
<!--{/if}--> {/if}
</label> </label>
<!--{/foreach}--> {/foreach}
<p class="help-block">七牛云存储访问协议http、https、auto其中 https 需要配置证书才能使用auto 为相对协议自动根据域名切换http与https。</p> <p class="help-block">七牛云存储访问协议http、https、auto其中 https 需要配置证书才能使用auto 为相对协议自动根据域名切换http与https。</p>
</div> </div>
</div> </div>
@ -31,11 +31,11 @@
<div class="layui-input-block"> <div class="layui-input-block">
{foreach ['华东','华北','华南','北美'] as $area} {foreach ['华东','华北','华南','北美'] as $area}
<label class="think-radio"> <label class="think-radio">
<!--{if sysconf('storage_qiniu_region') eq $area}--> {if sysconf('storage_qiniu_region') eq $area}
<input checked type="radio" name="storage_qiniu_region" value="{$area}" lay-ignore> <input checked type="radio" name="storage_qiniu_region" value="{$area}" lay-ignore>
<!--{else}--> {else}
<input type="radio" name="storage_qiniu_region" value="{$area}" lay-ignore> <input type="radio" name="storage_qiniu_region" value="{$area}" lay-ignore>
<!--{/if}--> {/if}
{$area} {$area}
</label> </label>
{/foreach} {/foreach}

View File

@ -34,7 +34,7 @@
<div class="footer notselect"> <div class="footer notselect">
<p class="layui-hide-xs"><a target="_blank" href="https://www.google.cn/chrome">推荐使用谷歌浏览器</a></p> <p class="layui-hide-xs"><a target="_blank" href="https://www.google.cn/chrome">推荐使用谷歌浏览器</a></p>
{:sysconf('site_copy')} {:sysconf('site_copy')}
{if sysconf('miitbeian')}<span class="padding-5">|</span><a target="_blank" href="http://www.miitbeian.gov.cn">{:sysconf('miitbeian')}</a>{/if} {if sysconf('miitbeian')}<span class="padding-5">|</span><a target="_blank" href="http://beian.miit.gov.cn">{:sysconf('miitbeian')}</a>{/if}
</div> </div>
</div> </div>
{/block} {/block}

2
vendor/autoload.php vendored
View File

@ -4,4 +4,4 @@
require_once __DIR__ . '/composer/autoload_real.php'; require_once __DIR__ . '/composer/autoload_real.php';
return ComposerAutoloaderInite8b00394fb5b04f0787a40b0726242d1::getLoader(); return ComposerAutoloaderInit415d1b9a7b2ee3822de734e6cbe4a804::getLoader();

View File

@ -2,7 +2,7 @@
// autoload_real.php @generated by Composer // autoload_real.php @generated by Composer
class ComposerAutoloaderInite8b00394fb5b04f0787a40b0726242d1 class ComposerAutoloaderInit415d1b9a7b2ee3822de734e6cbe4a804
{ {
private static $loader; private static $loader;
@ -19,15 +19,15 @@ class ComposerAutoloaderInite8b00394fb5b04f0787a40b0726242d1
return self::$loader; return self::$loader;
} }
spl_autoload_register(array('ComposerAutoloaderInite8b00394fb5b04f0787a40b0726242d1', 'loadClassLoader'), true, true); spl_autoload_register(array('ComposerAutoloaderInit415d1b9a7b2ee3822de734e6cbe4a804', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(); self::$loader = $loader = new \Composer\Autoload\ClassLoader();
spl_autoload_unregister(array('ComposerAutoloaderInite8b00394fb5b04f0787a40b0726242d1', 'loadClassLoader')); spl_autoload_unregister(array('ComposerAutoloaderInit415d1b9a7b2ee3822de734e6cbe4a804', 'loadClassLoader'));
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
if ($useStaticLoader) { if ($useStaticLoader) {
require_once __DIR__ . '/autoload_static.php'; require_once __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInite8b00394fb5b04f0787a40b0726242d1::getInitializer($loader)); call_user_func(\Composer\Autoload\ComposerStaticInit415d1b9a7b2ee3822de734e6cbe4a804::getInitializer($loader));
} else { } else {
$map = require __DIR__ . '/autoload_namespaces.php'; $map = require __DIR__ . '/autoload_namespaces.php';
foreach ($map as $namespace => $path) { foreach ($map as $namespace => $path) {
@ -48,19 +48,19 @@ class ComposerAutoloaderInite8b00394fb5b04f0787a40b0726242d1
$loader->register(true); $loader->register(true);
if ($useStaticLoader) { if ($useStaticLoader) {
$includeFiles = Composer\Autoload\ComposerStaticInite8b00394fb5b04f0787a40b0726242d1::$files; $includeFiles = Composer\Autoload\ComposerStaticInit415d1b9a7b2ee3822de734e6cbe4a804::$files;
} else { } else {
$includeFiles = require __DIR__ . '/autoload_files.php'; $includeFiles = require __DIR__ . '/autoload_files.php';
} }
foreach ($includeFiles as $fileIdentifier => $file) { foreach ($includeFiles as $fileIdentifier => $file) {
composerRequiree8b00394fb5b04f0787a40b0726242d1($fileIdentifier, $file); composerRequire415d1b9a7b2ee3822de734e6cbe4a804($fileIdentifier, $file);
} }
return $loader; return $loader;
} }
} }
function composerRequiree8b00394fb5b04f0787a40b0726242d1($fileIdentifier, $file) function composerRequire415d1b9a7b2ee3822de734e6cbe4a804($fileIdentifier, $file)
{ {
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
require $file; require $file;

View File

@ -4,7 +4,7 @@
namespace Composer\Autoload; namespace Composer\Autoload;
class ComposerStaticInite8b00394fb5b04f0787a40b0726242d1 class ComposerStaticInit415d1b9a7b2ee3822de734e6cbe4a804
{ {
public static $files = array ( public static $files = array (
'841780ea2e1d6545ea3a253239d59c05' => __DIR__ . '/..' . '/qiniu/php-sdk/src/Qiniu/functions.php', '841780ea2e1d6545ea3a253239d59c05' => __DIR__ . '/..' . '/qiniu/php-sdk/src/Qiniu/functions.php',
@ -321,9 +321,9 @@ class ComposerStaticInite8b00394fb5b04f0787a40b0726242d1
public static function getInitializer(ClassLoader $loader) public static function getInitializer(ClassLoader $loader)
{ {
return \Closure::bind(function () use ($loader) { return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInite8b00394fb5b04f0787a40b0726242d1::$prefixLengthsPsr4; $loader->prefixLengthsPsr4 = ComposerStaticInit415d1b9a7b2ee3822de734e6cbe4a804::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInite8b00394fb5b04f0787a40b0726242d1::$prefixDirsPsr4; $loader->prefixDirsPsr4 = ComposerStaticInit415d1b9a7b2ee3822de734e6cbe4a804::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInite8b00394fb5b04f0787a40b0726242d1::$classMap; $loader->classMap = ComposerStaticInit415d1b9a7b2ee3822de734e6cbe4a804::$classMap;
}, null, ClassLoader::class); }, null, ClassLoader::class);
} }