main.js
router.afterEach( ( to, from, next ) => {setTimeout(()=>{var _hmt = _hmt || [];(function() {//每次执行前,先移除上次插入的代码document.getElementById('51_la') && document.getElementById('51_la').remove();var hm = document.createElement("script");hm.src = "https://js.users.51.la/xxxxxxxx.js";hm.id = "51_la";var s = document.getElementsByTagName("script")[0];s.parentNode.insertBefore(hm, s);})();},0); });