解决方案:
1. 此问题在V3.4.4935后的版本会解决;
2. V3.4.4935之前的版本(包括V3.4.4935),需要执行以下操作:
第一步:修改/UI2/system/lib/route/router.js文件Router.prototype.publishState方法的以下点
1 2 | _history.replaceState( null , null ,hashbang); 改成 try {_history.replaceState( null , null ,hashbang);} catch (e){console.log(e);} |
1 2 | _history.pushState( null , null ,hashbang); 改成 try {_history.pushState( null , null ,hashbang);} catch (e){console.log(e);} |
第二步:执行%JUSTEP_HOME%/tools/dist/dist.bat批处理合并资源;
第三步:重新启动WeX5开发工具即Studio;
第四步:重新打包App;
评一波