master
xy 3 years ago
parent 1cdb2e8c51
commit a858825737

@ -1,5 +1,5 @@
<template>
<div :class="classObj" class="app-wrapper">
<div class="top-head-bar">
<div class="top-head-bar__logo">
@ -149,43 +149,33 @@ export default {
"$route.path": {
handler: function (url) {
if (url === "/bookmanage") {
setTimeout(() => {
this.$refs["bookIframe"].contentWindow.postMessage(
{
key: "login",
data: {
id: this.$store.state.user.userId,
username: this.$store.state.user.username,
this.$nextTick(() => {
this.$refs['bookIframe'].onload = () => {
this.$refs["bookIframe"].contentWindow.postMessage(
{
key: "login",
data: {
id: this.$store.state.user.userId,
username: this.$store.state.user.username,
},
},
},
"*"
);
},800);
"*"
);
}
})
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,
},
},
beforeRouteEnter(to,from,next){
document.getElementsByTagName('iframe').forEach(dom => {
dom.onload = null;
})
next()
}
};
</script>

Loading…
Cancel
Save