2.4发版前更新
前端分离出来 工具列表新增版本控制
This commit is contained in:
34
html/admin/magbox/tools.html
Normal file
34
html/admin/magbox/tools.html
Normal file
@@ -0,0 +1,34 @@
|
||||
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>Insert title here</title>
|
||||
</head>
|
||||
<link rel="stylesheet" href="/static/layui/css/layui.css">
|
||||
<script src="/static/layui/layui.all.js"></script>
|
||||
<script src="/static/layui/layui.js"></script>
|
||||
<script src="/static/js/jquery-3.2.1.js"></script>
|
||||
<script src="/static/js/user.js"></script>
|
||||
<body>
|
||||
<input type="button" value="上传" class="layui-btn image" id="file" lay-data="{url:'/utlis/upload.do',accept:'file'}"/>
|
||||
</body>
|
||||
<script>
|
||||
layui.use('upload', function(){
|
||||
var upload = layui.upload;
|
||||
|
||||
//执行实例
|
||||
var uploadInst = upload.render({
|
||||
elem: '#file' //绑定元素
|
||||
,url: '/utlis/upload.do' //上传接口
|
||||
,done: function(res){
|
||||
//上传完毕回调
|
||||
alert(res)
|
||||
}
|
||||
,error: function(){
|
||||
//请求异常回调
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</html>
|
||||
Reference in New Issue
Block a user