Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mip-ad 组件,在自定义组件中无法通过普通加载或者异步的方式正常加载 #104

Open
regboy opened this issue Jul 2, 2018 · 1 comment

Comments

@regboy
Copy link

regboy commented Jul 2, 2018

<mip-ys137-ad id="1" from="mip"><div class="baidu-union-pics"><mip-ad type="baidu-wm-ext" domain="dm50.ys137.com" token="ezrvaobii"><div id="ezrvaobii"></div></mip-ad></div></mip-ys137-ad>

代码见如上,mip-ys137-ad主要实现,异步请求后端广告数据,如果后端无返回广告数据,则展现默认的百度联盟广告。

异常问题:访问自有域名下的mip页面(https://mip.xxx.com/xxx.html)时,可以正常加载mip-ad组件并展现广告。

当页面缓存到百度mip服务端时(https://m.baidu.com/paw/c/s/mip.xxx.com/xxx.html),无法正常加载mip-ad组件,无法展现广告。

问题链接如下:
mip缓存链接:https://m.baidu.com/paw/c/s/mip.ys137.com/tnb/422254.html

服务端链接:https://mip.ys137.com/tnb/422254.html

附图:
1

2

@regboy
Copy link
Author

regboy commented Jul 2, 2018

异步方式加载也无法正常显示:
`
var fetchJsonp = require('fetch-jsonp');

    fetchJsonp(apiUrl, {

        jsonpCallback: 'callback'

    }).then(function (res) {

        return res.json();

    }).then(function (data) {

       //此处加插入mip-ad的代码也是无法正常加载组件的。

    });

`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant