layui 关闭当前弹窗打开新弹窗

$('#show').click(function() {
    //关闭当前弹窗
    var index = parent.layer.getFrameIndex(window.name);
    parent.layer.close(index);
    //打开新弹窗
    parent.layer.open({
        type: 2,
        title: '文章详情',
        shade: 0.1,
        area: ['80%', '600px'],
        content: '/show'
    });
});