",'"].join("");PageProxy.showDialog({className:"cdkey",template:c,data:{text:a.box_message,cdkey:a.cdkey,showCopyBtn:t.JsBridge&&JsBridge.SCENE&JsBridge.SCENE_DOWNLOADER||!1},actionHandler:{"copy-cdkey":function(t){var e=t.querySelector("[data-cdkey]").getAttribute("data-cdkey");JsBridge.call("setClipboard",{content:e||""}),PageProxy.showToast("复制成功")}}})}})}else PageProxy.showToast(o.msg||"系统繁忙,请稍后再试");l._trigger("afterOnDataLoaded",{componentId:a,logicId:i,data:o})}(i.componentId,i.logicId,a),Util.isFunction(i.callback)&&i.callback(a)})}}))}function c(a){if(a&&a.data){var i,o=r[a.id],n=e.createElement("div"),c=null;if(n.innerHTML=Util.tmpl(o.htmlTemplate[o.templateType||"default"](),o.data),(c=n.children[0]).id=o.id,s.appendChild(c),o.el=c,t.reportConf[o.cid].num++,t.reportConf[o.cid].expose){var p=c.querySelectorAll("[data-column-id]");if(p)for(var u=0,g=p.length;u')}}})}(s,i[s])}t.pageComponents=r;var u={init:function(a){o=(i=a||{}).ui_conf&&i.ui_conf[pageIndex],n=o&&o.components,s=e.body.querySelector(".page"),i&&o&&n&&t.Components&&p()},appendComponents:p,sendRequest:d};t.CManager=u}(window,document),function(t,e,a){var i={},o=[],n=null;var r=0;function s(t){if(JsBridge.SCENE&JsBridge.SCENE_DOWNLOADER){var e=t.data;if(t.signature>0&&!e.tk&&!(e.t||e.sd||e.rs)){if(t.signature>1+r)return;var a="GET "+t.url,i="";return void f(function(o){for(var n in o)!e[n]&&(e[n]=o[n]);e.ua=navigator.userAgent||"",e.android_id=o.androidId||"",i=function(t){var e="?";for(var a in t)e+="?"==e?a+"="+encodeURIComponent(t[a]):"&"+a+"="+encodeURIComponent(t[a]);return e}(e),JsBridge.call("getEncryptData",{plainText:a+i},function(e){if(-3==e.code)return t.signature=0,console.log("client has no method getEncryptData","error"),void s(t);var a=JSON.parse(e.data);if(a.token)t.data.t=a.token,t.data.tk=a.ticket;else if(a.sd||a.rs){for(var i in a)t.data[i]=a[i];console.log("encryptData is: "+JSON.stringify(a))}t.signature++,s(t)})})}}Util.xhr(t)}var l={default:['
'},t.Components=t.Components||{},t.Components.Image=i}(window,document),function(t,e,a){var i={},o=t.BaymaxBridge,n={},r="downLoading",s="pause",l=function(t){return e.querySelectorAll(t)||[]},d=function(t){if(this.attributes={left:{alias:"坐标X",type:"input",unit:"px",defaultValue:"10"},top:{alias:"坐标Y",type:"input",unit:"px",defaultValue:"10"},height:{alias:"元素高度",type:"input",unit:"px",defaultValue:"40"},width:{alias:"元素宽度",type:"input",unit:"px",defaultValue:"150"},appname:{alias:"应用名称",type:"input"},packageName:{alias:"应用包名",type:"input"},fontColor:{alias:"按钮文字颜色",type:"colorpicker",unit:"px",defaultValue:"#000000"},fontSize:{alias:"按钮文字大小",type:"input",unit:"px",defaultValue:"14"},progress:{alias:"是否显示进度",type:"selector",options:[{name:"是",value:1},{name:"否",value:0,selected:!0}],defaultValue:0},startBtnText:{alias:"引导下载按钮文案",type:"input",required:!1,defaultValue:"下载"},openBtnText:{alias:"引导打开按钮文案",type:"input",required:!1,defaultValue:"打 开"},autoLogicId:{hidden:!0,alias:"自动拉取应用信息",type:"logicSelector",required:!1,defaultValue:"-1"},relatedLogicId:{alias:"按钮附加逻辑",type:"logicSelector",required:!1,defaultValue:"-1"},relatedBtnText:{alias:"逻辑按钮文案",type:"input",required:!1,defaultValue:"领取机会"},appLink:{alias:"applink(安装后打开的链接)",type:"input",required:!1,defaultValue:""},autoOpen:{alias:"安装后是否自动打开",type:"selector",options:[{name:"是",value:1},{name:"否",value:0,selected:!0}],defaultValue:0}},t){for(var e in t)this.attributes[e]&&(this.attributes[e].value=t.data[e]);this.data=t.data,this.id=t.id}};d.cid=d.prototype.cid="App",d.cname=d.prototype.cname="应用下载",d.prototype.getAttr=function(t){return"undefined"!=this.attributes[t].value?this.attributes[t].value:this.attributes[t].defaultValue},d.prototype.setAttr=function(t,e){return!!this.attributes[t]&&(this.attributes[t].value=e,!0)},d.prototype.simulateTemplate={default:'
'}},d.prototype.relatedLogicTemplateId=2,d.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;a0?m(p.data.relatedBtnText||"领取机会"):m(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){h(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||""},h),g&&g.addEventListener("click",function(){window.open("tmast://appdetails/?appid="+u.appid)},!1)),p.el.addEventListener("click",f,!1),c&&c.addEventListener("click",f,!1)}function m(e,a,i){var o=p.el.getAttribute("data-appid");[].slice.call(l(".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=l(".j_progress_holder")[0],n=l(".j_progress_bar")[0],d=l(".j_progress_text")[0];e===r&&(t="暂停"),o.getAttribute("data-appid")==i&&(o.innerHTML=d.innerHTML=t,e===r||e===s?(n.style.width=a+"%",d.style.width=(1e4/a).toFixed(2)+"%"):(n.style.width="100%",d.style.width="100%"))}(e,a,i)}function f(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,m(p.data.openBtnText||"打 开"))}})):p.downloadInstance.state==JsBridge.Download.STATE_INSTALLED&&p.data.appLink?(t.Util.report(a,201),/^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),y(),p.clickTag=!0)}}):(t.Util.report(a,900),y()):(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 y(){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=d}(window,document),function(t,e,a){var i=function(t){if(this.attributes={left:{alias:"坐标X",type:"input",unit:"px",defaultValue:"10"},top:{alias:"坐标Y",type:"input",unit:"px",defaultValue:"10"},height:{alias:"元素高度",type:"input",unit:"px",defaultValue:"50"},width:{alias:"元素宽度",type:"input",unit:"px",defaultValue:"130"},relatedLogicId:{alias:"按钮对应逻辑",type:"logicSelector",required:!0}},t){for(var e in t)this.attributes[e]&&(this.attributes[e].value=t.data[e]);this.data=t.data,this.id=t.id}};i.cid=i.prototype.cid="LogicButton",i.cname=i.prototype.cname="逻辑行为按钮",i.prototype.getAttr=function(t){return"undefined"!=this.attributes[t].value?this.attributes[t].value:this.attributes[t].defaultValue},i.prototype.setAttr=function(t,e){return!!this.attributes[t]&&(this.attributes[t].value=e,!0)},i.prototype.htmlTemplate={default:function(){return''}},i.prototype.simulateTemplate={default:''},i.prototype.onRendered=function(){var e=this,a=(['
提示
','
',"
<%=data.text%>
","
<%=data.cdkey%>
","
",'"].join(""),!1);this.el.addEventListener("click",function(){if(!a){if(a=!0,t.reportConf[i.cid].np&&t.Util.report(e.el,200),"4993"==t.DATA.root.id&&JsBridge&&!(JsBridge.SCENE&JsBridge.SCENE_DOWNLOADER))return JsBridge.iOS?PageProxy.showDialog({type:"default",data:{text:"该活动只支持安装应用宝的安卓用户哦"}}):location.href="http://qzs.qq.com/open/mobile/mid-jump/index.html?dest="+encodeURIComponent("tmast://webview?mode=0&url="+encodeURIComponent(location.href))+"&text="+encodeURIComponent("活动页面跳转中"),!1;e.data.relatedLogicId>0&&(setTimeout(function(){a&&(a=!1)},3e3),CManager.sendRequest({componentId:e.id,logicId:e.data.relatedLogicId,callback:function(t){switch(a=!1,t.action){case"ShowPartition":if(t.partition&&0===t.partition.type)PageProxy.showDialog({type:"default",data:{text:"系统繁忙"}});else new PageProxy.svrDialog(e.id,e.data.relatedLogicId,t.partition)}}}))}},!1)},t.Components=t.Components||{},t.Components.LogicButton=i}(window,document),function(t,e,a){var i=function(t){if(this.attributes={left:{alias:"坐标X",type:"input",unit:"px",defaultValue:"10"},top:{alias:"坐标Y",type:"input",unit:"px",defaultValue:"10"},height:{alias:"元素高度",type:"input",unit:"px",defaultValue:"25"},width:{alias:"元素宽度",type:"input",unit:"px",defaultValue:"70"},relatedLogicId:{hidden:!0,alias:"按钮附加逻辑",type:"logicSelector",required:!1,defaultValue:"-1"}},t){for(var e in t)this.attributes[e]&&(this.attributes[e].value=t.data[e]);this.data=t.data,this.id=t.id}};i.cid=i.prototype.cid="History",i.cname=i.prototype.cname="显示我的获奖记录",i.prototype.getAttr=function(t){return"undefined"!=this.attributes[t].value?this.attributes[t].value:this.attributes[t].defaultValue},i.prototype.setAttr=function(t,e){return!!this.attributes[t]&&(this.attributes[t].value=e,!0)},i.prototype.simulateTemplate={default:''},i.prototype.relatedLogicTemplateId=6,i.prototype.onDashboardSave=function(t,e){if(this.getAttr("relatedLogicId")>0)e.data.relatedLogicId=this.getAttr("relatedLogicId");else{for(var a=0,i=0,o=t.logic_conf.length||0;i
"}if(!i.data.submitParam.short_text||!i.data.submitParam.text)return PageProxy.showToast("请输入内容后再评论"),!1;c(i.data.submitParam)},i.data.bindVotebtn?t.voteCallback({id:i.data.bindVotebtn,callback:function(t){if(!t||t.id!=i.data.bindVotebtn)return PageProxy.showDialog({type:"default",data:{text:"无匹配的投票"}}),!1;o&&o(t)}}):o&&o())}function c(a){if(o)return!1;o=!0,function(t){var e=new XMLHttpRequest,a=t.url,i=(t.method||"GET").toUpperCase(),o=t.data||{},n=[];if(!a)return;if("GET"===i){for(var r in o)n.push(r+"="+encodeURIComponent(o[r]));a+=n.length?"?"+n.join("&"):""}if(e._startTime=new Date,e.open(i,a,!0),"POST"===i&&e.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),!t.notWithCredentials&&(e.withCredentials=!0),e.onload=function(e){var a,i=e.target.responseText||"";try{a=i&&JSON.parse(i)||{}}catch(t){a={code:-900,status:e.target.status}}"function"==typeof t.callback&&t.callback(a)},e.onerror=function(e){var a={code:-998,status:e.target.status};"function"==typeof t.callback&&t.callback(a)},e.ontimeout=function(e){var a={code:-999,status:e.target.status};"function"==typeof t.callback&&t.callback(a)},"GET"===i)e.send();else{var s=[];for(var l in o)s.push(l+"="+o[l]);s=s.join("&"),e.send(s)}}({url:"http://jiangyou.qq.com/cgi-bin/appstage/community_comment_add",method:"POST",data:a,callback:function(n){if(o=!1,0==n.code){t._SHARE_TASK_DONE_GET&&t._SHARE_TASK_DONE_GET("CommunityReplay"),PageProxy.showToast("评论发布成功");var s=e.getElementById("community-replay-txt-"+i.id);s&&(s.innerHTML="");var l=e.querySelector(".community-replay");l&&(l.style.display="none"),e.querySelector(".mod-mask").style.display="none",i.data.relatedLogicId>0&&CManager.sendRequest({componentId:i.id,logicId:i.data.relatedLogicId,callback:function(t){switch(t.action){case"ShowPartition":if(0===t.partition.type)PageProxy.showDialog({type:"default",data:{text:"系统繁忙"}});else new PageProxy.svrDialog(i.id,i.data.relatedLogicId,t.partition)}}}),function(e){var a={action:500,id:e.post_id,resv1:"BAYMAX."+t.actData.id,resv2:e.appid};a=t.Util.extend({action:"",via:"",id:"",retid:"",version:"",resv1:"",resv2:"",resv3:"",resv4:"",resv5:"yyb",resv6:"",resv7:"",resv8:"",resv9:""},a,!0);var i=[];if(a.resv6){var o=a.resv6,n=o.split("_");n[1]&&(n[1]=("00"+n[1]).substr(-3)),a.resv6=n.join("_")}i.push({file:"community_report",params:function(){var e=r||"";if(e)return e;var a=t.Util.getCookie("logintype");e="WX"==a?[t.Util.getCookie("openid")+"",a]:"MOBILEQ"==a?[function(){var e=t.Util.getCookie("uin");if(e&&(e=/^o(\d+)$/.exec(e))&&(e=new Number(e[1])+0)>1e4)return e}()+"",a]:/qqdownloader\/(\d+)/i.test(navigator.userAgent)?[t.Util.getCookie("guid"),"unlogin"]:["","unlogin"];return r=e,e}().concat(a.action+"",(a.via||"")+"",a.id+"",a.retid+"",a.version+"",a.resv1+"",a.resv2+"",a.resv3+"",a.resv4+"",a.resv5+"",a.resv6+"",a.resv7+"",a.resv8+"",a.resv9+"",t.Util.getCookie("guid")||"",t.Util.getCookie("imei")||"")}),t.Util.ping()("http://jiangyou.qq.com/cgi-bin/appstage/community_report?data="+encodeURIComponent(JSON.stringify(i)))}(a),i.data.userInputText="",i.data.submitParam.text="",i.data.submitParam.short_text="",e.getElementById(i.id).innerText=i.data.defaulttext,e.querySelector("#community-replay-txt-"+i.id)&&(e.querySelector("#community-replay-txt-"+i.id).value="")}else-1==n.code&&1e3==Math.abs(n.subcode)?PageProxy.showLogin():PageProxy.showToast(n.msg||"评论失败,请稍后再试");t.community_post_status&&t.community_post_status(i.id,n)}})}function p(){var t=i.id,a=e.getElementById("community-replay-txt-"+t).value,o=i.el;if(function(t){for(var e=0,a=0,i=0;i=0&&t.charCodeAt(i)<=255?e+=1:e+=2,a=e;return a}(a)>(parseInt(i.data.textlength)||140))return PageProxy.showToast("您输入的内容过长请删减"),!1;if(a.trim()&&(i.data.userInputText=a,i.data.submitParam.short_text=a,i.data.submitParam.text="
"+a+"
"),1==i.data.dialogpublic){var n=e.querySelector(".community-replay"),r=e.querySelector(".mod-mask");1==i.data.texttype?o.innerText="已输入内容":a.trim()?o.innerText=a:o.innerText=i.data.defaulttext,n&&(n.style.display="none",r.style.display="none")}else d()}String.prototype.trim||(String.prototype.trim=function(){return this.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")})},t.Components=t.Components||{},t.Components.CommunityReplay=i}(window,document),function(t,e,a){var i=function(t){if(this.attributes={left:{alias:"坐标X",type:"input",unit:"px",defaultValue:"10"},top:{alias:"坐标Y",type:"input",unit:"px",defaultValue:"10"},height:{alias:"元素高度",type:"input",unit:"px",defaultValue:"30"},width:{alias:"元素宽度",type:"input",unit:"px",defaultValue:"120"},isNewWindow:{alias:"是否新窗口打开",type:"selector",options:[{name:"是",value:"1"},{name:"否",value:"2"}],defaultValue:"1"},url:{alias:"链接地址",type:"input",defaultValue:""}},t){for(var e in t)this.attributes[e]&&(this.attributes[e].value=t.data[e]);this.data=t.data,this.id=t.id}};i.cid=i.prototype.cid="MapArea",i.cname=i.prototype.cname="跳转热区",i.prototype.getAttr=function(t){return void 0!==this.attributes[t].value?this.attributes[t].value:this.attributes[t].defaultValue},i.prototype.setAttr=function(t,e){return!!this.attributes[t]&&(this.attributes[t].value=e,!0)},i.prototype.simulateTemplate={default:'
'}},i.prototype.onRendered=function(){var e=this;e.el.addEventListener("click",function(){t.reportConf[i.cid].np&&t.Util.report(e.el,200),e.data.url&&(window.JsBridge&&JsBridge.SCENE&JsBridge.SCENE_DOWNLOADER?2==e.data.isNewWindow?location.href=e.data.url:t.Util.jumpOutside(e.data.url):location.href=e.data.url)},!1)},t.Components=t.Components||{},t.Components.MapArea=i}(window,document),function(t,e,a){var i=function(t){if(this.attributes={left:{alias:"坐标X",type:"input",unit:"px",defaultValue:"10"},top:{alias:"坐标Y",type:"input",unit:"px",defaultValue:"10"},height:{alias:"元素高度",type:"input",unit:"px",defaultValue:"30"},width:{alias:"元素宽度",type:"input",unit:"px",defaultValue:"120"},content:{alias:"文本框内容",type:"input",defaultValue:"这里是一行文字"},fontColor:{alias:"文字颜色",type:"colorpicker",unit:"px",defaultValue:"#000000"},fontSize:{alias:"文字大小",type:"input",unit:"px",defaultValue:"14"}},t){for(var e in t)this.attributes[e]&&(this.attributes[e].value=t.data[e]);this.data=t.data,this.id=t.id}};i.cid=i.prototype.cid="Textbox",i.cname=i.prototype.cname="文本框",i.prototype.getAttr=function(t){return"undefined"!=this.attributes[t].value?this.attributes[t].value:this.attributes[t].defaultValue},i.prototype.setAttr=function(t,e){return!!this.attributes[t]&&(this.attributes[t].value=e,!0)},i.prototype.htmlTemplate={default:function(){return'