164043360@qq.com
164043360@qq.com
  • 发布:2017-05-01 05:26
  • 更新:2017-05-02 14:20
  • 阅读:1105

【报Bug】openWindowWithTitle 跨域页面.....返回无效.....报错mui为定义

分类:MUI
mui

详细问题描述
[内容]
mui.plusReady(function() {
mui(".right1").on('tap', 'a', function() {
//获取id
mui.openWindowWithTitle({
url: 'http://www.baidu.com',
id: 'detail',
waiting: {
autoShow: false //自动显示等待框,默认为true
}
}, {
title: { //标题配置
text: "商品详情", //标题文字
},
back: { //左上角返回箭头
image: {
base64Data: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAb1BMVEUAAAAAev8Aev8Aev8Aev8Aev8Aev8Aev8Aev8Aev8Aev8Aev8Aev8Aev8Aev8Aev8Aev8Aev8Aev8Aev8Aev8Aev8Aev8Aev8Aev8Aev8Aev8Aev8Aev8Aev8Aev8Aev8Aev8Aev8Aev8Aev8AAACubimgAAAAI3RSTlMAGfUTGfQTGPMSGPIYGhgaGBsXGxcbFxwXHBccFhwWHRYdHWufDPQAAAABYktHRACIBR1IAAAAB3RJTUUH4QETEBwooeTlkQAAAJVJREFUSMft1EkSgkAQRNFGUXFWHBDBibr/HTUwD5B/48Ig1y+io7u6MqUhf5hsNEY+j5hMgZ/FJ8Xc9ovos3T96utjbfqN/Nb0O/m96Uv5g+mP8ifTn+Ur01/ka9Nf5RvTt/I309/lH6Z/yr9Mn+Q71/MT8B34K/E58Enzv8R/K98HvnF8p3lr8F7izce7lbf3kJ/lDQp9HdBhgg3PAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDE3LTAxLTE5VDE2OjI4OjQwKzA4OjAwpTDFwQAAACV0RVh0ZGF0ZTptb2RpZnkAMjAxNy0wMS0xOVQxNjoyODo0MCswODowMNRtfX0AAAAASUVORK5CYII='
}
},

                });  
            });  
        });  

重现步骤
[步骤]
[结果]
[期望]

运行环境
[系统版本]
[浏览器版本]
[IDE版本]
[mui版本]

附件
[代码片段]
[安装包]

联系方式
[QQ]
[电话]

2017-05-01 05:26 负责人:无 分享
已邀请:
Neil_HL

Neil_HL

bug已修改,请于https://github.com/dcloudio/mui下载最新的mui,由于新页面没有引入mui,所以要重写返回事件,下面是我写的部分代码:

mui(".right1").on('tap', 'a', function() {  
    //获取id  
    mui.openWindowWithTitle({  
        url: 'http://www.baidu.com',  
        id: 'detail',  
        waiting: {  
            autoShow: false //自动显示等待框,默认为true  
        }  
    }, {  
        title: { //标题配置  
            text: "商品详情", //标题文字  
        },  
        back: { //左上角返回箭头  
            image: {  
                base64Data: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAb1BMVEUAAAAAev8Aev8Aev8Aev8Aev8Aev8Aev8Aev8Aev8Aev8Aev8Aev8Aev8Aev8Aev8Aev8Aev8Aev8Aev8Aev8Aev8Aev8Aev8Aev8Aev8Aev8Aev8Aev8Aev8Aev8Aev8Aev8Aev8Aev8Aev8AAACubimgAAAAI3RSTlMAGfUTGfQTGPMSGPIYGhgaGBsXGxcbFxwXHBccFhwWHRYdHWufDPQAAAABYktHRACIBR1IAAAAB3RJTUUH4QETEBwooeTlkQAAAJVJREFUSMft1EkSgkAQRNFGUXFWHBDBibr/HTUwD5B/48Ig1y+io7u6MqUhf5hsNEY+j5hMgZ/FJ8Xc9ovos3T96utjbfqN/Nb0O/m96Uv5g+mP8ifTn+Ur01/ka9Nf5RvTt/I309/lH6Z/yr9Mn+Q71/MT8B34K/E58Enzv8R/K98HvnF8p3lr8F7izce7lbf3kJ/lDQp9HdBhgg3PAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDE3LTAxLTE5VDE2OjI4OjQwKzA4OjAwpTDFwQAAACV0RVh0ZGF0ZTptb2RpZnkAMjAxNy0wMS0xOVQxNjoyODo0MCswODowMNRtfX0AAAAASUVORK5CYII='  
            },  
            click:function(){//重写返回事件  
                var wev = plus.webview.getWebviewById('detail');  
                console.log('guanbi');  
                wev.close();  
            }  
        },  
    });  
    plus.webview.getWebviewById('detail').evalJS("plus.key.addEventListener('backbutton',function(){plus.webview.getWebviewById('detail').close();})");//重写返回事件  
});

要回复问题请先登录注册