Vue页面中接参数
mounted() { //由于this指向的是请求参数中的内容,所以要再外层定义一个别名this let thar = this; window.addEventListener("message", function (event) { console.log(event.data); thar.backVue(event.data); }); }
methods: { backVue(data) { this.show = false; this.$router.push({'name': "itimDocDayList", params: {"parma": data}}); }//我的后面是跳转参数 }
Jsp传参数 window.parent.postMessage(WebOfficeObj.FiletypeName,//这是我要传的单个参数http://localhost:8080/bos/itimDocDayFormtype='+WebOfficeObj.FiletypeName//这个是路径地址 向父页面请求的地址);