master
xy 3 years ago
parent 1cdb2e8c51
commit a858825737

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