52,797
社区成员
发帖
与我相关
我的任务
分享
function GetView(paymentCode){
GetPaymentView(paymentCode);//调用了一个ajax方法
$("#signedDiv").show();
$("#paymentView").height('auto');
$("#paymentView").parents('.layui-layer').css({
position:'absolute',
top:($(window).height()-$("#paymentView").parents('.layui-layer').outerHeight())/2
});
}
function GetPaymentView(paymentCode, page){
$.post("/DLR008/GetPaymentSignedView?key="+key+"&paymentCode="+paymentCode+"&page="+page,
function(data){
layer.open({
type: 1,
async:false, //在这里加async:false,没效果
title:'費用規則詳情',
skin: 'layui-layer-rim',
area: ['660px', 'auto'],
content: data,
id : "paymentView"
});
})
};
top:($(window).height()-$("#paymentView").parents('.layui-layer').outerHeight())/2
function GetPaymentView(paymentCode, callback) {
$.ajax({
url: "......",
success: function (data) {
..............
callback();
}
});
}
function GetView(paymentCode){
GetPaymentView(paymentCode, function () {
$("#signedDiv").show();
$("#paymentView").height('auto');
$("#paymentView").parents('.layui-layer').css({
position:'absolute',
top:($(window).height()-$("#paymentView").parents('.layui-layer').outerHeight())/2
});
});
}