TomVision
TomVision
  • 发布:2017-11-10 09:35
  • 更新:2017-12-01 09:23
  • 阅读:1527

预加载的页面获取不到webviewId显示null

分类:MUI
                       gotoTopicList: function(i) {  
                var detailPage = null;  
                //获得主题页面  
                if(!detailPage) {  
                    detailPage = plus.webview.getWebviewById('topicList');  
                }  
                console.log(detailPage)  
                //触发详情页面的newsId事件  
                mui.fire(detailPage, 'topicId', {  
                    id: i.id,  
                    title: i.name  
                });  

                openWindow('views/topic-list.html', 'topicList');  
            },

预加载了topic-list页面,其他页面的预加载是正常的,这个页面就是获取不到显示null

2017-11-10 09:35 负责人:无 分享
已邀请:
chender

chender - 与人为善

你是说detailPage = plus.webview.getWebviewById('topicList');这句话返回的是null是吧?

5***@qq.com

5***@qq.com

同样的问题 求解 困扰我几天了

回梦無痕

回梦無痕 - 暂停服务

单单看这段代码看不出问题,上传重现问题的dome才好分析

该问题目前已经被锁定, 无法添加新回复