layer 弹出层无法刷新父窗口

图片说明

调用窗口

 <a href="javascript:;" onclick="layer_show('添加用户','/User/Add','800','500')" class="btn btn-primary radius"><i class="Hui-iconfont">&#xe600;</i> 添加用户</a>

返回json

  success: function (res) {
                    if (res.status == "ok") {
                        parent.location.reload();//刷新父页面【这个代码不起作用】

                    }
                    else {
                        alert("error");
                    }
                }

图片说明
图片说明

你的弹窗生成子页面了吗? 试试 location.reload();

你的弹窗应该没有生成子页面,可以试试reload

可能是同级页面,看看parent页面下有哪些页面,找到弹窗的页面然后reload

在子页面中 parent.location.reload()

试试这个,我用这个是没有问题的
window.parent.location.reload(true);

function cancel(){
window.parent.location.reload();
var index = parent.layer.getFrameIndex(window.name);
parent.layer.close(index);
}