增加配置信息下单图上传组件模板
This commit is contained in:
46
application/common/view/default/form/image_Config.html
Normal file
46
application/common/view/default/form/image_Config.html
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
<div class="picker-box">
|
||||||
|
<div id="picker_{$field}" class="picker_button">上传图片</div>
|
||||||
|
{if isset($value) && $value}
|
||||||
|
<input type="hidden" name="config[{$field}]" id="field_{$field}" value="{$value}">
|
||||||
|
{else/}
|
||||||
|
<input type="hidden" name="config[{$field}]" id="field_{$field}" value="">
|
||||||
|
{/if}
|
||||||
|
<div id="fileList_{$field}" class="upload-file-list-info" style="width:280px;">
|
||||||
|
{if $value}
|
||||||
|
{php}
|
||||||
|
$images = get_cover($value);
|
||||||
|
{/php}
|
||||||
|
<li class="affix-list-item" id="WU_FILE_0">
|
||||||
|
<div class="upload-file-info">
|
||||||
|
<span class="webuploader-pick-file-close" data-queued-id="WU_FILE_0" data-id="{$value}" data-fileurl="{$images['path']}"><i class="close"></i></span>
|
||||||
|
<span class="fname"></span>
|
||||||
|
<span class="fsize">上传时间:{$images['create_time']|date='Y-m-d H:i:s',###}</span>
|
||||||
|
<div class="clearfix"></div>
|
||||||
|
</div>
|
||||||
|
<div class="filebox image">
|
||||||
|
<img src="{:config('base_url')}{$images['path']}" class="img-responsive">
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
{/if}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<script type="text/javascript">
|
||||||
|
uploadsize = 2;
|
||||||
|
$(function(){
|
||||||
|
$("#picker_{$field}").SentUploader({
|
||||||
|
fileNumLimit:1,
|
||||||
|
uploadEvents: {
|
||||||
|
uploadComplete:function(file){}
|
||||||
|
},
|
||||||
|
listName : 'fileList_{$field}',
|
||||||
|
hiddenName: 'field_{$field}',
|
||||||
|
hiddenValType:1,
|
||||||
|
fileSingleSizeLimit:uploadsize*1024*1024,
|
||||||
|
closeX:true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
fileType: 'service',
|
||||||
|
filename : 'images',
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
Reference in New Issue
Block a user