diff --git a/src/views/iframe/MallIframe.vue b/src/views/iframe/MallIframe.vue index 7b212416..bc6422da 100644 --- a/src/views/iframe/MallIframe.vue +++ b/src/views/iframe/MallIframe.vue @@ -14,9 +14,10 @@ export default { }, mounted() { // 构造 iframe 地址,使用相对路径自动携带Cookie + const hash = process.env.VUE_APP_BASE_API == '/iws/jiju-api' ? '#/' : '' this.iframeSrc = process.env.NODE_ENV === 'production' - ? '/iws/mall-view/#/home?redirect=equipList' + ? `/iws/mall-view/${hash}home?redirect=equipList` : 'http://localhost:8102/iws/mall-view/home?redirect=equipList' // 等 iframe 加载完成再传 token diff --git a/src/views/iframe/rentManage.vue b/src/views/iframe/rentManage.vue index d120b5ab..6f83ea7d 100644 --- a/src/views/iframe/rentManage.vue +++ b/src/views/iframe/rentManage.vue @@ -14,9 +14,10 @@ export default { }, mounted() { console.log('🚀 ~ mounted:', window.location) + const hash = process.env.VUE_APP_BASE_API == '/iws/jiju-api' ? '#/' : '' this.iframeSrc = process.env.NODE_ENV === 'production' - ? '/iws/mall-view/#/home?redirect=rent-manage' + ? `/iws/mall-view/${hash}home?redirect=rent-manage` : 'http://localhost:8102/iws/mall-view/home?redirect=rent-manage' console.log('🚀 ~ this.iframeSrc:', this.iframeSrc) diff --git a/src/views/iframe/requirementIframe.vue b/src/views/iframe/requirementIframe.vue index 18a440de..e8702531 100644 --- a/src/views/iframe/requirementIframe.vue +++ b/src/views/iframe/requirementIframe.vue @@ -14,9 +14,10 @@ export default { }, mounted() { console.log('🚀 ~ mounted:', window.location) + const hash = process.env.VUE_APP_BASE_API == '/iws/jiju-api' ? '#/' : '' this.iframeSrc = process.env.NODE_ENV === 'production' - ? '/iws/mall-view/#/home?redirect=parity' + ? `/iws/mall-view/${hash}home?redirect=parity` : 'http://localhost:8102/iws/mall-view/home?redirect=parity' console.log('🚀 ~ this.iframeSrc:', this.iframeSrc) diff --git a/src/views/iframe/requirementListIframe.vue b/src/views/iframe/requirementListIframe.vue index 4d9e1ee7..0a23146b 100644 --- a/src/views/iframe/requirementListIframe.vue +++ b/src/views/iframe/requirementListIframe.vue @@ -14,9 +14,10 @@ export default { }, mounted() { console.log('🚀 ~ mounted:', window.location) + const hash = process.env.VUE_APP_BASE_API == '/iws/jiju-api' ? '#/' : '' this.iframeSrc = process.env.NODE_ENV === 'production' - ? '/iws/mall-view/#/home?redirect=sourcingNeed' + ? `/iws/mall-view/${hash}home?redirect=sourcingNeed` : 'http://localhost:8102/iws/mall-view/home?redirect=sourcingNeed' console.log('🚀 ~ this.iframeSrc:', this.iframeSrc)