master
xy 3 years ago
parent 1cdb2e8c51
commit a858825737

@ -149,7 +149,8 @@ export default {
"$route.path": { "$route.path": {
handler: function (url) { handler: function (url) {
if (url === "/bookmanage") { if (url === "/bookmanage") {
setTimeout(() => { this.$nextTick(() => {
this.$refs['bookIframe'].onload = () => {
this.$refs["bookIframe"].contentWindow.postMessage( this.$refs["bookIframe"].contentWindow.postMessage(
{ {
key: "login", key: "login",
@ -160,32 +161,21 @@ export default {
}, },
"*" "*"
); );
},800); }
})
return; return;
} }
if (url === "/old") {
return false;
this.gdzcUrl = `${process.env.VUE_APP_OUT_OLD}/login/oss_login?id=`+this.$store.state.user.userId+`&username=`+this.$store.state.user.username;
//this.$refs['oldIframe'].src = this.oldUrl;
// axios
// .get('/old', {
// url:'/index.php',
// params: {
// s: "/login/oss_login",
// id: this.$store.state.user.userId,
// username: this.$store.state.user.username,
// },
// })
// .then((res) => {
// this.oldUrl = `${process.env.VUE_APP_OUT_OLD}${res.data.data}`
// this.$refs['oldIframe'].src = this.oldUrl
// });
}
}, },
immediate: true, immediate: true,
}, },
}, },
beforeRouteEnter(to,from,next){
document.getElementsByTagName('iframe').forEach(dom => {
dom.onload = null;
})
next()
}
}; };
</script> </script>

Loading…
Cancel
Save