H-ui关闭弹出框刷新父页面
文章描述:
H-ui关闭弹出框后刷新父页面
$.ajax({
url: 'index.php',
type: 'POST',
data: formData,
dataType: 'json',
async: false,
cache: false,
contentType: false,
processData: false,
success: function(data) {
if (data.status == 1000) {
layer.msg(data.msg, {
icon: 1,
time: 1000
});
setTimeout(function() {
window.parent.location.reload();
var index = parent.layer.getFrameIndex(window.name);
parent.layer.close(index);
},
2000);
}
if (data.status == 1001) {
layer.msg(data.msg, {
icon: 1,
time: 1000
});
}
},
error: function(error) {
//console.log('网络错误');
}
});
发布时间:2022/10/10
发表评论