rel() {
var url = document.location.href;
if (url.indexOf("yes=") == -1) {
var t = new Date();
window.location.href = url + "?yes=" + t.getTime();
}
},
写入方法,然后在mounted(){
this.rel();
}
然后进行调用,其原理就是利用地址栏参数,传入一个参数,和当前获取当前时间轴进行对比,如果相同就刷新一下