no message

deploy
zcy 2021-09-29 00:37:25 +08:00
parent 1d49b423e5
commit 33f6980d16
1 changed files with 41 additions and 0 deletions

View File

@ -147,6 +147,7 @@ function on_click_ddl(){
<li> <a href="#gincurd" data-toggle="tab">gin接口代码生成工具</a></li>
<li> <a href="#ddl2sql" data-toggle="tab">sql ddl转代码和文档</a></li>
<li> <a href="#ui2css" data-toggle="tab">qt ui文件自动生成css</a></li>
<li> <a href="#duilib" data-toggle="tab">duilib自动生成代码</a></li>
</ul>
</div>
@ -280,6 +281,46 @@ function on_click_ddl(){
</iframe>
</div>
</div>
<div class="tab-pane fade in active" id="duilib">
<p style="display: block;font-size: 20px ; text-align: center;">
duilib xml 自动生成绑定控件代码
</p>
<form id="form2" class="form-horizontal" action="{{openapi}}openapi/duilib_xml2cpp" target="frame1" method="post"
enctype="multipart/form-data">
<div class="form-group">
<label for="interface" class="col-sm-3 control-label">ui布局文件</label>
<div class="col-sm-3">
<p><input type="file" name="xml"></p>
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<button type="button" class="btn btn-default" onclick="upload()">生成</button>
</div>
</div>
</form>
<!-- 其实我们可以把iframe标签隐藏掉 -->
<script type="text/javascript">
function upload() {
$("#form2").submit();
var t = setInterval(function () {
//获取iframe标签里body元素里的文字。即服务器响应过来的"上传成功"或"上传失败"
var word = $("iframe[name='frame1']").contents().find("body").text();
if (word != "") {
clearInterval(t); //清除定时器
}
console.log(word)
}, 1000);
}
</script>
<div class="row" style="width: 100%; margin-top: 10px;">
<div class="col-md-2">
</div>
<iframe name="frame1" frameborder="0" class="col-md-10" style="background: #bbbbbb;height: 600px;">
</iframe>
</div>
</div>
</div>
</div>
</div>