摘要: 1.Promise的立即执行性 var p = new Promise(function(resolve, reject){ console.log("create a promise"); resolve("success"); }); console.log("after new Promise 阅读全文
posted @ 2020-07-01 16:55 rachelch 阅读(324) 评论(0) 推荐(0)
摘要: window.location.href(当前URL) 结果如下: http://www.link.com:8080/test?id=123&username=xxx window.location.protocol(协议) 结果如下: http: window.location.host(域名 + 阅读全文
posted @ 2020-07-01 10:01 rachelch 阅读(280) 评论(0) 推荐(0)
摘要: 解决的核心思想就是:不允许用户访问到带 from 参数的地址,如果收到 from 参数,就去掉 from 重新拼接 url ,重定向到不带 from 的 url router.beforeEach((to, from, next) => { if (window.location.href.incl 阅读全文
posted @ 2020-07-01 09:53 rachelch 阅读(686) 评论(0) 推荐(0)