页面接口加载过慢,添加加载样式让用户友好等待
<!--加载中-->
<div class="modal fade" id="loadingModal">
<div style="width: 200px;height:20px; z-index: 20000; position: absolute; text-align: center; left: 50%; top: 50%;margin-left:-100px;margin-top:-10px">
<div class="progress progress-striped active" style="margin-bottom: 0;">
<div class="progress-bar" style="width: 100%;"></div>
</div>
<h5 style="color:red"> <strong th:text="#{systemeod.dealeoding}"></strong> </h5><!--结账中,请稍候...-->
</div>
</div>
调用方式
function loadEodResult(currentdate){
$("#loadingModal").modal({backdrop:'static',keyboard:false});
dkyw.request.post("business/saveDealEod",{"eoddate":currentdate},function (response) {
$("#loadingModal").modal('hide');
if (response.success) {
dkyw.dialog.success(queryI18n(response.message));/*结账成功*/
} else {
dkyw.dialog.error(queryI18n("systemeod.eodfail")+","+queryI18n(response.message));/*结账失败,*/
}
$('#mytab').bootstrapTable('refresh',{url:dkyw.tool.wrapperUrl({url:url})});
});
}