//在微信浏览器中打开小程序 (function(){ //not in wechat if ( navigator.userAgent.indexOf('MicroMessenger') == -1){ return; } function ISC(a){for(var b in a){var c=document.createElement("script");c.type="text/javascript",c.async=!0,c.src=a[b];var d=document.getElementsByTagName("script")[0];d.parentNode.insertBefore(c,d)}}; var Worker = { parseMiniUrl : function (){ //content/news if ( location.href.indexOf('content/news') > -1){ return "/pages/news/news?id=" + window.server.id; } if ( location.href.indexOf('content/video/play.htm') > -1){ return "/pages/video/video?id=" + window.server.id; } return "/pages/index/index";//not matched }, run : function (){ var weappUrl = this.parseMiniUrl(); window.aykJsonP = function(data){ wx.config(data); //replace html var tpl = `

用小程序获取更好的观看体验

新用户半价抢购VIP

`; document.querySelector(".bottomBar").innerHTML = tpl; }; ISC(['//xcx.aiyuke.com/wechat-page/jsApiAll?url='+encodeURIComponent(location.href), '//res.wx.qq.com/open/js/jweixin-1.6.0.js' ]); } }; Worker.run(); })();