d***@163.com
d***@163.com
  • 发布:2023-08-04 10:57
  • 更新:2023-08-04 15:47
  • 阅读:201

wap2app打包h5网站,开始链接点击正常,点击一会后就链接无法再点击

分类:wap2app

使用wap2app打包了一个h5网站,有首页,文章列表两个页面。
首页显示展馆分类,点击打开该分类展馆列表页面,点击展馆打开展馆的vr链接,vr链接时第三方链接。观看完vr后点击系统的返回按钮返回展馆列表。

我遇到的问题是:当来回点击很多次后,页面上所有A链接就都无法再点击,只有系统的返回按钮可用。关闭app再打开就没事了。
把网页a链接全部换成tap事件,然后用window.loaction.href跳转也会出现上述问题。运行到模拟器调试,开始window.loaction.href可以正常打开页面,当出点击多次以后,window.loaction.href就不执行了。

大神们有没有遇到过这种情况,问题出在那里,怎么解决?谢谢!

2023-08-04 10:57 负责人:无 分享
已邀请:
喜欢技术的前端

喜欢技术的前端 - QQ---445849201

要是有个demo能复现那就更好了

d***@163.com

d***@163.com (作者)

15:34:35.460 [W2A]:打开新webview[http://www.hbjqlsly.com/upload/zzjng/index.html]
15:34:35.466 [W2A]:未匹配到任何页面规则,使用随机数作为新webviewId
15:34:35.500 [W2A][__W2A_WEBVIEW_ID_0.6524555638086216]:webview.show
15:34:35.623 [WARNING] :The key "target-densitydpi" is not supported. at http://www.hbjqlsly.com/upload/zzjng/index.html:4
15:39:49.446 https://www.720yun.com/t/720judwuev6?scene_id=21976859 at http://webceshi8.hebinhe.net.cn/list.asp?sortid=6:199
15:39:49.451 页面跳转了 at http://webceshi8.hebinhe.net.cn/list.asp?sortid=6:202
15:39:49.458 [W2A]:打开新webview[https://www.720yun.com/t/720judwuev6?scene_id=21976859]
15:39:49.464 [W2A]:未匹配到任何页面规则,使用随机数作为新webviewId
15:39:49.469 [W2A][__W2A_WEBVIEW_ID_0.5694024754278415]:webview.show

15:39:50.726 bytedance://disable_swipe at https://ssl-static2.720static.com/js/panoPageV2.e7b60d02b48b5a4c6f42.js:7
15:39:51.225 停止音频热点 null at https://ssl-static2.720static.com/js/panoPageV2.e7b60d02b48b5a4c6f42.js:7
15:39:51.889 停止音频热点 null at https://ssl-static2.720static.com/js/panoPageV2.e7b60d02b48b5a4c6f42.js:7
15:39:54.892 https://www.slmmm.com/360/vtourshiwai/index.html at http://webceshi8.hebinhe.net.cn/list.asp?sortid=6:199
15:39:54.896 页面跳转了 at http://webceshi8.hebinhe.net.cn/list.asp?sortid=6:202
15:39:56.107 https://www.slmmm.com/360/vtourshiwai/index.html at http://webceshi8.hebinhe.net.cn/list.asp?sortid=6:199
15:39:56.116 页面跳转了 at http://webceshi8.hebinhe.net.cn/list.asp?sortid=6:202

15:39:56.107 https://www.slmmm.com/360/vtourshiwai/index.html at http://webceshi8.hebinhe.net.cn/list.asp?sortid=6:199
15:39:56.116 页面跳转了 at http://webceshi8.hebinhe.net.cn/list.asp?sortid=6:202
15:39:56.107 https://www.slmmm.com/360/vtourshiwai/index.html at http://webceshi8.hebinhe.net.cn/list.asp?sortid=6:199
15:39:56.116 页面跳转了 at http://webceshi8.hebinhe.net.cn/list.asp?sortid=6:202
15:39:56.107 https://www.slmmm.com/360/vtourshiwai/index.html at http://webceshi8.hebinhe.net.cn/list.asp?sortid=6:199
15:39:56.116 页面跳转了 at http://webceshi8.hebinhe.net.cn/list.asp?sortid=6:202

  • d***@163.com (作者)

    控制台输出的日志,我在window.location之前输出了一下url链接,之后输出了一下“页面跳转了”,加粗部分可以看出正常打开的时候打开了新的wevview并分配了webviewId,出问题以后再没有打开新的webview。打开新webview有没有数量限制?

    2023-08-04 15:51

  • d***@163.com (作者)

    有没有可能是webview占满了?

    2023-08-04 15:53

  • 喜欢技术的前端

    回复 d***@163.com: 小程序有数量限制,其他平台倒是没有,但是webview的打开过多可能会占用设备资源,导致性能下降或内存溢出等问题,如果要加载新的web-view 其实可以换web-view 的 url,在url后面拼上 时间戳。http://xxx?_123456789,你可以尝试一下

    2023-08-04 16:35

  • 喜欢技术的前端

    回复 d***@163.com: 加载这种3D的在移动端应该更耗性能

    2023-08-04 16:40

要回复问题请先登录注册