",'"].join("");PageProxy.showDialog({className:"cdkey",template:c,data:{text:a.box_message,cdkey:a.cdkey,showCopyBtn:e.JsBridge&&JsBridge.SCENE&JsBridge.SCENE_DOWNLOADER||!1},actionHandler:{"copy-cdkey":function(e){var t=e.querySelector("[data-cdkey]").getAttribute("data-cdkey");JsBridge.call("setClipboard",{content:t||""}),PageProxy.showToast("复制成功")}}})}})}else PageProxy.showToast(o.msg||"系统繁忙,请稍后再试");d._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=t.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,e.reportConf[o.cid].num++,e.reportConf[o.cid].expose){var p=c.querySelectorAll("[data-column-id]");if(p)for(var u=0,g=p.length;u')}}})}(s,i[s])}e.pageComponents=r;var u={init:function(a){o=(i=a||{}).ui_conf&&i.ui_conf[pageIndex],n=o&&o.components,s=t.body.querySelector(".page"),i&&o&&n&&e.Components&&p()},appendComponents:p,sendRequest:l};e.CManager=u}(window,document),function(e,t,a){var i={},o=[],n=null;var r=0;function s(e){if(JsBridge.SCENE&JsBridge.SCENE_DOWNLOADER){var t=e.data;if(e.signature>0&&!t.tk&&!(t.t||t.sd||t.rs)){if(e.signature>1+r)return;var a="GET "+e.url,i="";return void h(function(o){for(var n in o)!t[n]&&(t[n]=o[n]);t.ua=navigator.userAgent||"",t.android_id=o.androidId||"",i=function(e){var t="?";for(var a in e)t+="?"==t?a+"="+encodeURIComponent(e[a]):"&"+a+"="+encodeURIComponent(e[a]);return t}(t),JsBridge.call("getEncryptData",{plainText:a+i},function(t){if(-3==t.code)return e.signature=0,console.log("client has no method getEncryptData","error"),void s(e);var a=JSON.parse(t.data);if(a.token)e.data.t=a.token,e.data.tk=a.ticket;else if(a.sd||a.rs){for(var i in a)e.data[i]=a[i];console.log("encryptData is: "+JSON.stringify(a))}e.signature++,s(e)})})}}Util.xhr(e)}var d={default:['
'}},l.prototype.relatedLogicTemplateId=2,l.prototype.onDashboardSave=function(e,t){if(this.getAttr("autoLogicId")>0){t.data.autoLogicId=this.getAttr("autoLogicId");for(var a=0,i=e.logic_conf.length||0;a0?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(e,t,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:e.PageStatId,slotId:e.actData.id+"_002",sourceScene:e.statPageSourceId||"",via:"BAYMAX."+e.actData.id,applink:p.data.appLink||"",autoOpen:p.data.autoOpen||0,recommendId:e.Util.getParam("recommendId")||"",params:o.get("JsBridgeReportExtraData")||"",channelId:e.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(t,a,i){var o=p.el.getAttribute("data-appid");[].slice.call(d(".j-download-btn")).forEach(function(e){e.getAttribute("data-appid")==o&&(e.innerHTML=t)}),1==e.DATA.root.is_down_bar_show&&function(e,t,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];t===r&&(e="暂停"),o.getAttribute("data-appid")==i&&(o.innerHTML=l.innerHTML=e,t===r||t===s?(n.style.width=a+"%",l.style.width=(1e4/a).toFixed(2)+"%"):(n.style.width="100%",l.style.width="100%"))}(t,a,i)}function h(t){var a=t.target||p.el;if(JsBridge.SCENE&JsBridge.SCENE_DOWNLOADER){if(t.stopPropagation(),!p.downloadInstance)return;p.downloadInstance.state==JsBridge.Download.STATE_INSTALLED&&p.data.relatedLogicId>0&&!p.clickTag?(e.Util.report(a,500),CManager.sendRequest({componentId:p.id,logicId:p.data.relatedLogicId,callback:function(e){0!=e.code&&104!=e.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(){e.Util.report(a,900)},onStop:function(){e.Util.report(a,200,"05")},onInstall:function(){e.Util.report(a,305)},onOpen:function(){e.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(t){"ShowLogin"!==t.action&&u&&u.apk_url&&(e.Util.report(a,900),v(),p.clickTag=!0)}}):(e.Util.report(a,900),v()):(e.Util.report(a,900),location.href="http://a.app.qq.com/o/simple.jsp?pkgname="+encodeURIComponent(u.pkg_name)+"&channel="+encodeURIComponent(e.channelId))}function v(){e.getSpecialClient&&e.getSpecialClient()&&e.SpecialClient.canDownload()?e.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"))}},e.Components=e.Components||{},e.Components.App=l}(window,document),function(e,t,a){var i=function(e){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}},e){for(var t in e)this.attributes[t]&&(this.attributes[t].value=e.data[t]);this.data=e.data,this.id=e.id}};i.cid=i.prototype.cid="LogicButton",i.cname=i.prototype.cname="逻辑行为按钮",i.prototype.getAttr=function(e){return"undefined"!=this.attributes[e].value?this.attributes[e].value:this.attributes[e].defaultValue},i.prototype.setAttr=function(e,t){return!!this.attributes[e]&&(this.attributes[e].value=t,!0)},i.prototype.htmlTemplate={default:function(){return''}},i.prototype.simulateTemplate={default:''},i.prototype.onRendered=function(){var t=this,a=(['
提示
','
',"
<%=data.text%>
","
<%=data.cdkey%>
","
",'"].join(""),!1);this.el.addEventListener("click",function(){if(!a){if(a=!0,e.reportConf[i.cid].np&&e.Util.report(t.el,200),"4993"==e.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;t.data.relatedLogicId>0&&(setTimeout(function(){a&&(a=!1)},3e3),CManager.sendRequest({componentId:t.id,logicId:t.data.relatedLogicId,callback:function(e){switch(a=!1,e.action){case"ShowPartition":if(e.partition&&0===e.partition.type)PageProxy.showDialog({type:"default",data:{text:"系统繁忙"}});else new PageProxy.svrDialog(t.id,t.data.relatedLogicId,e.partition)}}}))}},!1)},e.Components=e.Components||{},e.Components.LogicButton=i}(window,document),function(e,t,a){var i=function(e){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"},relatedLogicId:{alias:"按钮附加逻辑",type:"logicSelector",required:!1,defaultValue:"-1"}},e){for(var t in e)this.attributes[t]&&(this.attributes[t].value=e.data[t]);this.data=e.data,this.id=e.id}};i.cid=i.prototype.cid="ShareButton",i.cname=i.prototype.cname="分享按钮",i.prototype.getAttr=function(e){return"undefined"!=this.attributes[e].value?this.attributes[e].value:this.attributes[e].defaultValue},i.prototype.setAttr=function(e,t){return!!this.attributes[e]&&(this.attributes[e].value=t,!0)},i.prototype.simulateTemplate={default:''},i.prototype.htmlTemplate={default:function(){return''}},i.prototype.onRendered=function(){var t=this,a=t.data.relatedLogicId>0,o=!1;e.JsBridge&&JsBridge.SCENE&JsBridge.SCENE_DOWNLOADER&&(o=!0),e.shareCallback=function(a){e.BaymaxBridge&&e.BaymaxBridge._trigger("ShareCallback",a),0==a.result&&(t.data.relatedLogicId>0&&CManager.sendRequest({componentId:t.id,logicId:t.data.relatedLogicId}),e.Util.doReport({scene:e.PageStatId,action:200,slotId:"22",via:"BAYMAX."+e.actData.id,contentId:"1_"+e.actData.id}))},t.el.addEventListener("click",function(){e.JsBridge&&e.PageProxy&&(JsBridge.iOS||JsBridge.SCENE==JsBridge.SCENE_NONE?PageProxy.showToast("请点击右上角的分享按钮"):(e.reportConf[i.cid].np&&e.Util.report(t.el,200),!a||PageProxy.checkLogin()?(JsBridge.setShareInfo({allowShare:!0,iconUrl:e.actData.shareIcon,jumpUrl:e.actData.shareUrl||location.href,title:e.actData.shareTitle,summary:e.actData.shareContent}),JsBridge.SCENE==JsBridge.SCENE_WECHAT?PageProxy.showToast("请点击右上角的分享按钮"):JsBridge.share(),!o&&t.data.relatedLogicId>0&&CManager.sendRequest({componentId:t.id,logicId:t.data.relatedLogicId})):PageProxy.showLogin()))},!1)},e.Components=e.Components||{},e.Components.ShareButton=i}(window,document),function(e,t,a){var i=function(e){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"},dgTitle:{alias:"弹框标题",type:"input",defaultValue:"收货地址"},items:{alias:"输入项",type:"checkbox",options:[{name:"收件人",key:"user_name"},{name:"手机号",key:"phone"},{name:"收件地址",key:"address"},{name:"QQ号",key:"qq"},{name:"电子邮件",key:"email"}],defaultValue:["user_name","phone","address"]},relatedLogicId:{hidden:!0,alias:"按钮附加逻辑",type:"logicSelector",required:!1,defaultValue:"-1"}},e){for(var t in e)this.attributes[t]&&(this.attributes[t].value=e.data[t]);this.data=e.data,this.id=e.id}};i.cid=i.prototype.cid="Address",i.cname=i.prototype.cname="填写收货地址",i.prototype.getAttr=function(e){var t,a=this.attributes[e];if("checkbox"==a.type){t=[];for(var i,o=0;i=this.attributes[e].options[o];o++)i.checked&&t.push(i.key)}else t=void 0!==a.value?a.value:a.defaultValue;return t},i.prototype.setAttr=function(e,t){return!!this.attributes[e]&&(this.attributes[e].value=t,!0)},i.prototype.simulateTemplate={default:''},i.prototype.relatedLogicTemplateId=8,i.prototype.onDashboardSave=function(e,t){if(this.getAttr("relatedLogicId")>0)t.data.relatedLogicId=this.getAttr("relatedLogicId");else{for(var a=0,i=0,o=e.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?e.voteCallback({id:i.data.bindVotebtn,callback:function(e){if(!e||e.id!=i.data.bindVotebtn)return PageProxy.showDialog({type:"default",data:{text:"无匹配的投票"}}),!1;o&&o(e)}}):o&&o())}function c(a){if(o)return!1;o=!0,function(e){var t=new XMLHttpRequest,a=e.url,i=(e.method||"GET").toUpperCase(),o=e.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(t._startTime=new Date,t.open(i,a,!0),"POST"===i&&t.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),!e.notWithCredentials&&(t.withCredentials=!0),t.onload=function(t){var a,i=t.target.responseText||"";try{a=i&&JSON.parse(i)||{}}catch(e){a={code:-900,status:t.target.status}}"function"==typeof e.callback&&e.callback(a)},t.onerror=function(t){var a={code:-998,status:t.target.status};"function"==typeof e.callback&&e.callback(a)},t.ontimeout=function(t){var a={code:-999,status:t.target.status};"function"==typeof e.callback&&e.callback(a)},"GET"===i)t.send();else{var s=[];for(var d in o)s.push(d+"="+o[d]);s=s.join("&"),t.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){e._SHARE_TASK_DONE_GET&&e._SHARE_TASK_DONE_GET("CommunityReplay"),PageProxy.showToast("评论发布成功");var s=t.getElementById("community-replay-txt-"+i.id);s&&(s.innerHTML="");var d=t.querySelector(".community-replay");d&&(d.style.display="none"),t.querySelector(".mod-mask").style.display="none",i.data.relatedLogicId>0&&CManager.sendRequest({componentId:i.id,logicId:i.data.relatedLogicId,callback:function(e){switch(e.action){case"ShowPartition":if(0===e.partition.type)PageProxy.showDialog({type:"default",data:{text:"系统繁忙"}});else new PageProxy.svrDialog(i.id,i.data.relatedLogicId,e.partition)}}}),function(t){var a={action:500,id:t.post_id,resv1:"BAYMAX."+e.actData.id,resv2:t.appid};a=e.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 t=r||"";if(t)return t;var a=e.Util.getCookie("logintype");t="WX"==a?[e.Util.getCookie("openid")+"",a]:"MOBILEQ"==a?[function(){var t=e.Util.getCookie("uin");if(t&&(t=/^o(\d+)$/.exec(t))&&(t=new Number(t[1])+0)>1e4)return t}()+"",a]:/qqdownloader\/(\d+)/i.test(navigator.userAgent)?[e.Util.getCookie("guid"),"unlogin"]:["","unlogin"];return r=t,t}().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+"",e.Util.getCookie("guid")||"",e.Util.getCookie("imei")||"")}),e.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="",t.getElementById(i.id).innerText=i.data.defaulttext,t.querySelector("#community-replay-txt-"+i.id)&&(t.querySelector("#community-replay-txt-"+i.id).value="")}else-1==n.code&&1e3==Math.abs(n.subcode)?PageProxy.showLogin():PageProxy.showToast(n.msg||"评论失败,请稍后再试");e.community_post_status&&e.community_post_status(i.id,n)}})}function p(){var e=i.id,a=t.getElementById("community-replay-txt-"+e).value,o=i.el;if(function(e){for(var t=0,a=0,i=0;i=0&&e.charCodeAt(i)<=255?t+=1:t+=2,a=t;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=t.querySelector(".community-replay"),r=t.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 l()}String.prototype.trim||(String.prototype.trim=function(){return this.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")})},e.Components=e.Components||{},e.Components.CommunityReplay=i}(window,document),function(e,t,a){var i=function(e){if(this.attributes={left:{alias:"坐标X",type:"input",unit:"px",defaultValue:"30"},top:{alias:"坐标Y",type:"input",unit:"px",defaultValue:"10"},height:{alias:"元素高度",type:"input",unit:"px",defaultValue:"150"},width:{alias:"元素宽度",type:"input",unit:"px",defaultValue:"260"},vtype:{alias:"视频类型",type:"selector",options:[{name:"点播",value:"1"},{name:"直播",value:"2"}],defaultValue:"1"},vid:{alias:"视频id",type:"input",defaultValue:""},previewImg:{alias:"预览图",type:"uploader"},autoplay:{hidden:!0,alias:"是否自动播放",type:"selector",options:[{name:"是",value:"1"},{name:"否",value:"0"}],defaultValue:"0"}},e){for(var t in e)this.attributes[t]&&(this.attributes[t].value=data[t]);this.data=e.data,this.id=e.id}};i.cid=i.prototype.cid="Video",i.cname=i.prototype.cname="视频组件",i.prototype.getAttr=function(e){return this.attributes[e].value||this.attributes[e].defaultValue},i.prototype.setAttr=function(e,t){return!!this.attributes[e]&&(this.attributes[e].value=t,!0)},i.prototype.simulateTemplate={default:['