增加上传预览
This commit is contained in:
1 parent
b683923c67
commit
5f601407b2
4 files changed
+21
-8
No files matched your search
@@ -29,11 +29,14 @@
|
||||
<div class="layui-form-item" align="center">
|
||||
{eq name="$list.set.formpost" value="PUT" }
|
||||
{if strlen($list.data.lxpic)>0}
|
||||
<img style="max-height: 300px;max-width: 500px" src="__UPLOAD__/{$list.data.lxpic}" onclick="imgMax(this,true)">
|
||||
<img id="img" style="max-height: 300px;max-width: 500px" src="__UPLOAD__/{$list.data.lxpic}" onclick="imgMax(this,true)">
|
||||
{else /}
|
||||
<img style="max-height: 300px;max-width: 500px" src="__UPLOAD__/rongyu_teacher/404.png" onclick="imgMax(this,true)">
|
||||
<img id="img" style="max-height: 300px;max-width: 500px" src="__UPLOAD__/rongyu_teacher/404.png" onclick="imgMax(this,true)">
|
||||
{/if}
|
||||
{/eq}
|
||||
{eq name="$list.set.formpost" value="POST" }
|
||||
<img id="img" style="max-height: 300px;max-width: 500px" src="" onclick="imgMax(this,true)">
|
||||
{/eq}
|
||||
</div>
|
||||
<form class="layui-form layui-form-pane" lay-filter="myform">
|
||||
<div class="layui-form-item">
|
||||
@@ -184,6 +187,7 @@
|
||||
,done: function(res){
|
||||
if(res.val == 1){
|
||||
$('#lxpic').val(res.url);
|
||||
document.getElementById("img").src="__UPLOAD__/"+res.url;
|
||||
}
|
||||
layer.msg(res.msg);
|
||||
}
|
||||
|
||||
@@ -29,9 +29,9 @@
|
||||
<div class="layui-form-item" align="center">
|
||||
{eq name="$list.set.formpost" value="PUT" }
|
||||
{if strlen($list.data.jtpic)>0}
|
||||
<img style="max-height: 300px;max-width: 500px" src="__UPLOAD__/{$list.data.jtpic}" onclick="imgMax(this,true)">
|
||||
<img id="img" style="max-height: 300px;max-width: 500px" src="__UPLOAD__/{$list.data.jtpic}" onclick="imgMax(this,true)">
|
||||
{else /}
|
||||
<img style="max-height: 300px;max-width: 500px" src="__UPLOAD__/rongyu_teacher/404.png" onclick="imgMax(this,true)">
|
||||
<img id="img" style="max-height: 300px;max-width: 500px" src="__UPLOAD__/rongyu_teacher/404.png" onclick="imgMax(this,true)">
|
||||
{/if}
|
||||
{/eq}
|
||||
</div>
|
||||
@@ -127,6 +127,7 @@
|
||||
,done: function(res){
|
||||
if(res.val == 1){
|
||||
$('#jtpic').val(res.url);
|
||||
document.getElementById("img").src="__UPLOAD__/"+res.url;
|
||||
}
|
||||
layer.msg(res.msg);
|
||||
}
|
||||
|
||||
@@ -29,11 +29,14 @@
|
||||
<div class="layui-form-item" align="center">
|
||||
{eq name="$list.set.formpost" value="PUT" }
|
||||
{if strlen($list.data.url)>0}
|
||||
<img style="max-height: 300px;max-width: 500px" src="__UPLOAD__/{$list.data.url}" onclick="imgMax(this,true)">
|
||||
<img id="img" style="max-height: 300px;max-width: 500px" src="__UPLOAD__/{$list.data.url}" onclick="imgMax(this,true)">
|
||||
{else /}
|
||||
<img style="max-height: 300px;max-width: 500px" src="__UPLOAD__/rongyu_teacher/404.png" onclick="imgMax(this,true)">
|
||||
<img id="img" style="max-height: 300px;max-width: 500px" src="__UPLOAD__/rongyu_teacher/404.png" onclick="imgMax(this,true)">
|
||||
{/if}
|
||||
{/eq}
|
||||
{eq name="$list.set.formpost" value="POST" }
|
||||
<img id="img" style="max-height: 300px;max-width: 500px" src="" onclick="imgMax(this,true)">
|
||||
{/eq}
|
||||
</div>
|
||||
<form class="layui-form layui-form-pane" lay-filter="myform">
|
||||
<div class="layui-form-item">
|
||||
@@ -206,6 +209,7 @@
|
||||
,done: function(res){
|
||||
if(res.val == true){
|
||||
$('#url').val(res.url);
|
||||
document.getElementById("img").src="__UPLOAD__/"+res.url;
|
||||
}
|
||||
layer.msg(res.msg);
|
||||
}
|
||||
|
||||
Loaded 3 of 4 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user