|
@@ -27,10 +27,10 @@ class DecryptIframe {
|
|
|
}
|
|
|
|
|
|
get iframeUrl() {
|
|
|
- return `${this.iframeOrigin}${this.iframePath}`
|
|
|
+ return this.iframePath
|
|
|
}
|
|
|
get iframeUrlBackup() {
|
|
|
- return this.iframePath
|
|
|
+ return `${this.iframeOrigin}${this.iframePath}`
|
|
|
}
|
|
|
|
|
|
createIframe() {
|
|
@@ -118,8 +118,8 @@ class DecryptIframe {
|
|
|
})
|
|
|
iframe.addEventListener('error', (e) => {
|
|
|
console.log(e)
|
|
|
- if (iframe.src === this.iframeUrl) {
|
|
|
- iframe.src = this.iframePath
|
|
|
+ if (iframe.src.includes(this.iframeUrl)) {
|
|
|
+ iframe.src = this.iframeUrlBackup
|
|
|
} else {
|
|
|
throw new Error('解密iframe加载失败')
|
|
|
}
|