mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-04-06 03:58:04 +08:00
45 lines
1.7 KiB
HTML
45 lines
1.7 KiB
HTML
{extend name="main"}
|
|
|
|
{block name="content"}
|
|
|
|
<div style="max-width:1000px">
|
|
<form class="layui-card layui-form">
|
|
<div class="layui-card-body padding-bottom-5 think-box-shadow">
|
|
<div class="layui-form-item">
|
|
<label class="layui-form-label">Storage<br><span class="nowrap color-desc">存储类型</span></label>
|
|
<div class="layui-input-block">
|
|
{foreach ['local'=>'本地服务器存储','oss'=>'阿里云OSS存储','qiniu'=>'七牛云存储'] as $k=>$v}
|
|
<input type="radio" data-storagetype="{$k}" name="storage_type" value="{$k}" title="{$v}" lay-filter="storage_type">
|
|
{/foreach}
|
|
<p class="help-block">请选择文件存储类型,其它云储存需要配置正确的参数才可以上传文件哦!</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
<div class="padding-top-15 padding-bottom-10 think-box-shadow">
|
|
<div data-type="oss">{include file='config/file_oss'}</div>
|
|
<div data-type="local">{include file='config/file_local'}</div>
|
|
<div data-type="qiniu">{include file='config/file_qiniu'}</div>
|
|
</div>
|
|
</div>
|
|
|
|
{/block}
|
|
|
|
{block name="script"}
|
|
<script>
|
|
$(function () {
|
|
apply('{:sysconf("storage_type")}');
|
|
window.form.render();
|
|
|
|
window.form.on('radio(storage_type)', function (data) {
|
|
apply(data.value);
|
|
});
|
|
|
|
function apply(value) {
|
|
var $active = $("[data-storagetype='" + value + "']").trigger('click');
|
|
if ($active.size() < 1) $("[data-storagetype]:first").trigger('click');
|
|
$('[data-type="' + value + '"]').show().siblings('[data-type]').hide();
|
|
}
|
|
});
|
|
</script>
|
|
{/block} |