1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586 |
- /*
- 广告使用区域
- */
- Namespace.register("U.D.AD"); //桌面广告命名空间
- //#region 百度广告
- /*
- * 百度异步加载
- *
- * @param {string} 广告位置id
- * @param {string} 广告id
- */
- U.D.AD.baidu = function (UGID, UIE) {
- if (UGID) { //异步加载
- U.MD.DynamicLoad("http://cbjs.baidu.com/=js/m.js", "js", U.M.apply(this, [[U.D.AD.AsynBDGG, [UGID, UIE]]]), { type: "text/javascript", src: "http://cbjs.baidu.com/js/m.js" }); //异步加载
- }
- //<script>
- // /ar _hmt = _hmt || [];
- //(function() {
- // var hm = document.createElement("script");
- // hm.src = "https://hm.baidu.com/hm.js?f0ececeb4f687bc4d4ffb7719f4cf6a7";
- // var s = document.getElementsByTagName("script")[0];
- // s.parentNode.insertBefore(hm, s);
- //})();
- //</script>
- }
- /*
- * 百度异步加载
- *
- * @param {string} 广告id
- */
- U.D.AD.BDSCB = function (UDID) {
- U.MD.DynamicLoad("//hm.baidu.com/hm.js?" + UDID, "js"); //加载广告
- }
- /*
- * 异步广告
- *
- * @param {string} 广告位置id
- * @param {string} 广告id
- */
- U.D.AD.AsynBDGG = function (UGID, UIE) {
- BAIDU_CLB_fillSlotAsync(UIE, UGID);
- }
- //#endregion
- //#region
- /*
- * 异步阿里妈妈广告
- *
- * @param {string} 广告位置id
- */
- U.D.AD.alimama = function (UDE) {
- //阿里巴巴官网实例
- var i, _UKE = window.alimamatk_onload = window.alimamatk_onload || [];
- if (U.Ut.isArray(UDE)) {
- for (i = 0; i < UDE.length; i++) {
- U.D.AD.alimama(UDE[i]);
- }
- }
- else {
- _UKE.push(U.Ut.isObject(UDE) ? UDE : (UDE = { pid: UDE, appkey: "", unid: "", type: "click" }));
- } //加载广告
- if (!window.alimamatk_show) {
- U.MD.DynamicLoad("http://a.alimama.cn/tkapi.js", "js", null,
- { type: "text/javascript", id: UDE.pid, charset: "gbk", async: true, src: "http://a.alimama.cn/tkapi.js" });
- }
- }
- //阿里妈妈广告异步
- U.D.AD.alimamao = function (UDOD, UDID) {
- $$("a", { style: { "display": "none!important" }, id: "tanx-a-" + UDID }, UDOD); //显示元素
- U.MD.DynamicLoad("http://p.tanx.com/ex?i=" + UDID, //加载广告
- "js", null, { type: "text/javascript", id: "tanx-s-" + UDID, async: true,
- charset: "gbk", async: true, src: "http://p.tanx.com/ex?i=" + UDID
- });
- }
- //#endregion
|