Commit fb03e418 authored by 武广's avatar 武广

fix: 修改IframeBridge方法

parent efb70eeb
/* eslint-disable class-methods-use-this */
class IframeBridge {
constructor() {
console.info('use iframeBridge');
this.mountEventBus();
}
static run(data, callbackName) {
run(data, callbackName) {
return new Promise(resolve => {
if (!data.event) {
resolve(false);
......@@ -16,7 +17,7 @@ class IframeBridge {
});
}
static mountEventBus() {
mountEventBus() {
window.addEventListener('message', info => {
// 来源页面地址
console.log('addEventListenerCallBack', info);
......
......@@ -74,7 +74,7 @@ const refreshRequest = async (url, options) => {
};
// 判断是否从tob进入
const iframeBridgeModel = IframeBridge();
const iframeBridgeModel = new IframeBridge();
const searchPrams = getUrlSearchParams();
const isTob = searchPrams.source === 'tob';
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment