<%=app_name%>
<%=appSize%>
<%=editorIntro%>
'}},l.prototype.relatedLogicTemplateId=2,l.prototype.onDashboardSave=function(t,e){if(this.getAttr("autoLogicId")>0){e.data.autoLogicId=this.getAttr("autoLogicId");for(var a=0,i=t.logic_conf.length||0;a
0?f(p.data.relatedBtnText||"领取机会"):f(p.data.openBtnText||"打 开")}};JsBridge.SCENE&JsBridge.SCENE_DOWNLOADER&&(i[u.apk_id]?(p.downloadInstance=i[u.apk_id],JsBridge.call("queryDownload",{apkid:u.apk_id},function(t,e,a,i,o,n,r,s){m(n,s)})):i[u.apk_id]=p.downloadInstance=new JsBridge.Download({apkid:u.apk_id,hnAppId:u.appid,packageName:u.pkg_name,url:u.apk_url,alias:u.app_name,versionCode:u.version_code,checkUpdate:!!u.version_code,scene:t.PageStatId,slotId:t.actData.id+"_002",sourceScene:t.statPageSourceId||"",via:"BAYMAX."+t.actData.id,applink:p.data.appLink||"",autoOpen:p.data.autoOpen||0,recommendId:t.Util.getParam("recommendId")||"",params:o.get("JsBridgeReportExtraData")||"",channelId:t.channelId||""},m),g&&g.addEventListener("click",function(){window.open("tmast://appdetails/?appid="+u.appid)},!1)),p.el.addEventListener("click",h,!1),c&&c.addEventListener("click",h,!1)}function f(e,a,i){var o=p.el.getAttribute("data-appid");[].slice.call(d(".j-download-btn")).forEach(function(t){t.getAttribute("data-appid")==o&&(t.innerHTML=e)}),1==t.DATA.root.is_down_bar_show&&function(t,e,a){var i=p.el.getAttribute("data-appid"),o=d(".j_progress_holder")[0],n=d(".j_progress_bar")[0],l=d(".j_progress_text")[0];e===r&&(t="暂停"),o.getAttribute("data-appid")==i&&(o.innerHTML=l.innerHTML=t,e===r||e===s?(n.style.width=a+"%",l.style.width=(1e4/a).toFixed(2)+"%"):(n.style.width="100%",l.style.width="100%"))}(e,a,i)}function h(e){var a=e.target||p.el;if(JsBridge.SCENE&JsBridge.SCENE_DOWNLOADER){if(e.stopPropagation(),!p.downloadInstance)return;p.downloadInstance.state==JsBridge.Download.STATE_INSTALLED&&p.data.relatedLogicId>0&&!p.clickTag?(t.Util.report(a,500),CManager.sendRequest({componentId:p.id,logicId:p.data.relatedLogicId,callback:function(t){0!=t.code&&104!=t.code||(p.clickTag=!0,f(p.data.openBtnText||"打 开"))}})):p.downloadInstance.state==JsBridge.Download.STATE_INSTALLED&&p.data.appLink?/^http:/.test(p.data.appLink)&&JsBridge.SCENE&JsBridge.SCENE_DOWNLOADER?JsBridge.call("openNewWindow",{url:p.data.appLink}):location.href=p.data.appLink:p.downloadInstance&&p.downloadInstance.doAction({onStart:function(){t.Util.report(a,900)},onStop:function(){t.Util.report(a,200,"05")},onInstall:function(){t.Util.report(a,305)},onOpen:function(){t.Util.report(a,500)}})}else"1"===p.data.outsideDownloadType?p.data.relatedLogicId>0&&!p.clickTag?CManager.sendRequest({componentId:p.id,logicId:p.data.relatedLogicId,callback:function(e){"ShowLogin"!==e.action&&u&&u.apk_url&&(t.Util.report(a,900),v(),p.clickTag=!0)}}):(t.Util.report(a,900),v()):(t.Util.report(a,900),location.href="http://a.app.qq.com/o/simple.jsp?pkgname="+encodeURIComponent(u.pkg_name)+"&channel="+encodeURIComponent(t.channelId))}function v(){t.getSpecialClient&&t.getSpecialClient()&&t.SpecialClient.canDownload()?t.SpecialClient.download({url:u.apk_url.replace(/\bfsname=[^&]+/,"fsname="+encodeURIComponent(u.app_name)+".apk"),packageName:u.pkg_name,appName:u.app_name}):u&&u.apk_url&&(location.href=u.apk_url.replace(/\bfsname=[^&]+/,"fsname="+encodeURIComponent(u.app_name)+".apk"))}},t.Components=t.Components||{},t.Components.App=l}(window,document),function(t){function e(i){if(a[i])return a[i].exports;var o=a[i]={exports:{},id:i,loaded:!1};return t[i].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var a={};e.m=t,e.c=a,e.p="",e(0)}([function(t,e,a){t.exports=a(1)},function(t,e,a){a(2).init()},function(t,e){var a={init:function(){BaymaxBridge.on("afterOnDataLoaded",function(t){if("CommunityReplay_1"==t.componentId&&2==t.logicId){var e=document.querySelector("#LogicButton_2"),a=document.querySelector("#LogicButton_3"),i=document.querySelector("#LogicButton_4");e&&e.click(),a&&a.click(),i&&i.click()}})}};t.exports=a}]);