var __SINA_SURVEY_DATA={"survey":{"id":"1084","creator":"zhangyao1","title":"\u4e2d\u56fd\u7ecf\u6d4e\uff0c\u653e\u6c34\u662f\u4e0d\u662f\u4e07\u80fd\u7684\uff0c\u60a8\u600e\u4e48\u770b\uff1f","description":"\u201c\u4e2d\u56fd\u7ecf\u6d4e\uff0c\u653e\u6c34\u662f\u4e07\u80fd\u7684\u3002\u653e\u6c34\uff0c\u662f\u89e3\u51b3\u4e2d\u56fd\u7ecf\u6d4e\u4e00\u5207\u96be\u9898\u7684\u6700\u4f73\u836f\u65b9\u3002\u201d\u8fd1\u65e5\uff0c\u5085\u6d77\u68e0\u9488\u5bf9\u7ecf\u6d4e\u4e0b\u884c\u7684\u95ee\u9898\u63d0\u51fa\u4e86\u770b\u6cd5\u3002\u4e00\u65f6\u8bae\u8bba\u7eb7\u7eb7\uff0c\u6709\u4eba\u8ba4\u4e3a\u653e\u6c34\u76f8\u5f53\u4e8e\u996e\u9e29\u6b62\u6e34\uff0c\u4f46\u4e5f\u6709\u4eba\u6307\u51fa\uff0c\u653e\u6c34\u662f\u4e07\u80fd\u7684\uff0c\u901f\u5ea6\u6162\u53cd\u800c\u4f1a\u51fa\u95ee\u9898\u3002","keyword":"\u653e\u6c34,\u7ecf\u6d4e,\u671f\u8d27","start_time":"1546843800","end_time":"4102416000","type":"1","channel":"8","status":"1","anti_cheat_strategy":"0","qr_code":"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKIAAACiAQMAAAD4PIRYAAAABlBMVEX\/\/\/8AAABVwtN+AAAA\/klEQVRIic2W0Q0DIQxDLTEAI7E6IzFApDRxQL1W\/TZFnATv7iPCNhfgD0bzHOgz12vkZslpPBjNp\/s0DBRR0+FroHugWEehtygrc5Z4jdYB3aNUiOfC17hA6dSknB\/+VdHHGPYrvAJah8LQuvWZU05jk\/7omdiWoYWeNoYkaMhjPSqcWzclXTljv12yjn\/VdJQ24Du\/QHk0mZLJEss7amrMyY7uUUhL066GrZOlXfSUlZU85wIV031T0Rxp0wyPmh5hvELbPu51FeWfDDux8dFbNyFlV8HmpobhEt2JzbWva5RNHtjn6Smqs+HFMf2pm4wep3p2ePAv\/0roH4wXcPHgEnLnU5EAAAAASUVORK5CYII=","others":{"result_show":"1","result_save":"1","result_order":"0","true_result":"1","vote_show":"1","vote_submit":null,"vote_login":"0","share_img":"https:\/\/n.sinaimg.cn\/default\/46b60762\/20171013\/sinavotepic.png","comment":"1","survey_summary":"\u6295\u7968\u6210\u529f\uff0c\u611f\u8c22\u60a8\u7684\u53c2\u4e0e\uff01","redirect_url":"http:\/\/www.sina.com.cn","display_type":"3","text_detail":"","text_detail_url":"","repetition_attr":"0","repetition_user_cookie_device":"2","repetition_interval":"1","result_interval_show":"0","repetition_interval_did":"0","repetition_freq_did":"0","final_result_show":1},"created_time":"1546844032","modified_time":"1546846293"},"content":{"question":[{"id":"19881","survey_id":"1084","type":"1","parent_id":"1084","sort_id":"1","status":"1","description":"\u4e2d\u56fd\u7ecf\u6d4e\uff0c\u653e\u6c34\u662f\u4e0d\u662f\u4e07\u80fd\u7684\uff0c\u60a8\u600e\u4e48\u770b\uff1f","others":{"question_selection":"1","question_type":"1","question_img":"","checkbox_num_least":0,"checkbox_num_most":0,"score_display_type":0,"score_num_least":0,"score_num_most":0,"standard_point":0},"created_time":"1546844806","modified_time":"1546844857","r_aids":[],"answers":[19882,19883,19884]},{"id":"19885","survey_id":"1084","type":"1","parent_id":"1084","sort_id":"2","status":"1","description":"\u4f60\u89c9\u5f972018\u5e74\u901a\u80c0\u5389\u5bb3\u5417\uff1f","others":{"question_selection":"1","question_type":"1","question_img":"","checkbox_num_least":0,"checkbox_num_most":0,"score_display_type":0,"score_num_least":0,"score_num_most":0,"standard_point":0},"created_time":"1546844806","modified_time":"1546844857","r_aids":[],"answers":[19886,19887,19888,19889]},{"id":"19890","survey_id":"1084","type":"1","parent_id":"1084","sort_id":"3","status":"1","description":"\u4f60\u57282018\u5e74\u6536\u5165\u589e\u957f\u4e86\u591a\u5c11\uff1f","others":{"question_selection":"1","question_type":"1","question_img":"","checkbox_num_least":0,"checkbox_num_most":0,"score_display_type":0,"score_num_least":0,"score_num_most":0,"standard_point":0},"created_time":"1546844806","modified_time":"1546844857","r_aids":[],"answers":[19891,19892,19893,19894,19895]},{"id":"19896","survey_id":"1084","type":"1","parent_id":"1084","sort_id":"4","status":"1","description":"\u4f60\u9884\u8ba12019\u5e74\u6536\u5165\u4f1a\u589e\u52a0\u591a\u5c11\uff1f","others":{"question_selection":"1","question_type":"1","question_img":"","checkbox_num_least":0,"checkbox_num_most":0,"score_display_type":0,"score_num_least":0,"score_num_most":0,"standard_point":0},"created_time":"1546844806","modified_time":"1546844857","r_aids":[],"answers":[19897,19898,19899,19900,19901]}],"answer":{"19881":[{"id":"19882","survey_id":"1084","type":"2","parent_id":"19881","sort_id":"1","status":"1","description":"\u662f\u4e07\u80fd\u7684\uff0c\u653e\u6c34\u53ef\u4ee5\u4fc3\u8fdb\u7ecf\u6d4e\u53d1\u5c55","others":{"next_question":0,"answer_img":"","answer_img_width":"undefined","answer_img_height":"undefined","answer_type_blank":0,"standard_point":0,"next_question_id":19885},"created_time":"1546844806","modified_time":"1546844857"},{"id":"19883","survey_id":"1084","type":"2","parent_id":"19881","sort_id":"2","status":"1","description":"\u4e0d\u662f\u4e07\u80fd\u7684\uff0c\u5426\u5b9a\u4e86\u8d27\u5e01\u5b58\u91cf\u7684\u610f\u4e49","others":{"next_question":0,"answer_img":"","answer_img_width":"undefined","answer_img_height":"undefined","answer_type_blank":0,"standard_point":0,"next_question_id":19885},"created_time":"1546844806","modified_time":"1546844857"},{"id":"19884","survey_id":"1084","type":"2","parent_id":"19881","sort_id":"3","status":"1","description":"\u4e0d\u6e05\u695a","others":{"next_question":0,"answer_img":"","answer_img_width":"undefined","answer_img_height":"undefined","answer_type_blank":0,"standard_point":0,"next_question_id":19885},"created_time":"1546844806","modified_time":"1546844857"}],"19885":[{"id":"19886","survey_id":"1084","type":"2","parent_id":"19885","sort_id":"1","status":"1","description":"\u6bd4\u8f83\u5389\u5bb3","others":{"next_question":0,"answer_img":"","answer_img_width":"undefined","answer_img_height":"undefined","answer_type_blank":0,"standard_point":0,"next_question_id":19890},"created_time":"1546844806","modified_time":"1546844857"},{"id":"19887","survey_id":"1084","type":"2","parent_id":"19885","sort_id":"2","status":"1","description":"\u8fd8\u884c\uff0c\u6b63\u5e38\u8303\u56f4","others":{"next_question":0,"answer_img":"","answer_img_width":"undefined","answer_img_height":"undefined","answer_type_blank":0,"standard_point":0,"next_question_id":19890},"created_time":"1546844806","modified_time":"1546844857"},{"id":"19888","survey_id":"1084","type":"2","parent_id":"19885","sort_id":"3","status":"1","description":"\u4e00\u70b9\u90fd\u4e0d\u5389\u5bb3","others":{"next_question":0,"answer_img":"","answer_img_width":"undefined","answer_img_height":"undefined","answer_type_blank":0,"standard_point":0,"next_question_id":19890},"created_time":"1546844806","modified_time":"1546844857"},{"id":"19889","survey_id":"1084","type":"2","parent_id":"19885","sort_id":"4","status":"1","description":"\u4e0d\u6e05\u695a","others":{"next_question":0,"answer_img":"","answer_img_width":"undefined","answer_img_height":"undefined","answer_type_blank":0,"standard_point":0,"next_question_id":19890},"created_time":"1546844806","modified_time":"1546844857"}],"19890":[{"id":"19891","survey_id":"1084","type":"2","parent_id":"19890","sort_id":"1","status":"1","description":"50%\u4ee5\u4e0a","others":{"next_question":0,"answer_img":"","answer_img_width":"undefined","answer_img_height":"undefined","answer_type_blank":0,"standard_point":0,"next_question_id":19896},"created_time":"1546844806","modified_time":"1546844857"},{"id":"19892","survey_id":"1084","type":"2","parent_id":"19890","sort_id":"2","status":"1","description":"20~50%","others":{"next_question":0,"answer_img":"","answer_img_width":"undefined","answer_img_height":"undefined","answer_type_blank":0,"standard_point":0,"next_question_id":19896},"created_time":"1546844806","modified_time":"1546844857"},{"id":"19893","survey_id":"1084","type":"2","parent_id":"19890","sort_id":"3","status":"1","description":"10%~20%","others":{"next_question":0,"answer_img":"","answer_img_width":"undefined","answer_img_height":"undefined","answer_type_blank":0,"standard_point":0,"next_question_id":19896},"created_time":"1546844806","modified_time":"1546844857"},{"id":"19894","survey_id":"1084","type":"2","parent_id":"19890","sort_id":"4","status":"1","description":"\u4e0d\u8db310%","others":{"next_question":0,"answer_img":"","answer_img_width":"undefined","answer_img_height":"undefined","answer_type_blank":0,"standard_point":0,"next_question_id":19896},"created_time":"1546844806","modified_time":"1546844857"},{"id":"19895","survey_id":"1084","type":"2","parent_id":"19890","sort_id":"5","status":"1","description":"\u8d1f\u589e\u957f","others":{"next_question":0,"answer_img":"","answer_img_width":"undefined","answer_img_height":"undefined","answer_type_blank":0,"standard_point":0,"next_question_id":19896},"created_time":"1546844806","modified_time":"1546844857"}],"19896":[{"id":"19897","survey_id":"1084","type":"2","parent_id":"19896","sort_id":"1","status":"1","description":"50%\u4ee5\u4e0a","others":{"next_question":0,"answer_img":"","answer_img_width":"undefined","answer_img_height":"undefined","answer_type_blank":0,"standard_point":0,"next_question_id":null},"created_time":"1546844806","modified_time":"1546844857"},{"id":"19898","survey_id":"1084","type":"2","parent_id":"19896","sort_id":"2","status":"1","description":"20~50%","others":{"next_question":0,"answer_img":"","answer_img_width":"undefined","answer_img_height":"undefined","answer_type_blank":0,"standard_point":0,"next_question_id":null},"created_time":"1546844806","modified_time":"1546844857"},{"id":"19899","survey_id":"1084","type":"2","parent_id":"19896","sort_id":"3","status":"1","description":"10%~20%","others":{"next_question":0,"answer_img":"","answer_img_width":"undefined","answer_img_height":"undefined","answer_type_blank":0,"standard_point":0,"next_question_id":null},"created_time":"1546844806","modified_time":"1546844857"},{"id":"19900","survey_id":"1084","type":"2","parent_id":"19896","sort_id":"4","status":"1","description":"\u4e0d\u8db310%","others":{"next_question":0,"answer_img":"","answer_img_width":"undefined","answer_img_height":"undefined","answer_type_blank":0,"standard_point":0,"next_question_id":null},"created_time":"1546844806","modified_time":"1546844857"},{"id":"19901","survey_id":"1084","type":"2","parent_id":"19896","sort_id":"5","status":"1","description":"\u8d1f\u589e\u957f","others":{"next_question":0,"answer_img":"","answer_img_width":"undefined","answer_img_height":"undefined","answer_type_blank":0,"standard_point":0,"next_question_id":null},"created_time":"1546844806","modified_time":"1546844857"}]},"point":[],"group":[],"a_q":{"19882":19881,"19883":19881,"19884":19881,"19886":19885,"19887":19885,"19888":19885,"19889":19885,"19891":19890,"19892":19890,"19893":19890,"19894":19890,"19895":19890,"19897":19896,"19898":19896,"19899":19896,"19900":19896,"19901":19896}},"total":{"true":{"survey":"443","modified_time":"1663743182","question":{"19881":"443","19885":"443","19890":"443","19896":"443"},"answer":{"19882":{"number":"95","score":0,"percent":21.44},"19883":{"number":"331","score":0,"percent":74.72},"19884":{"number":"17","score":0,"percent":3.84},"19886":{"number":"216","score":0,"percent":48.76},"19887":{"number":"162","score":0,"percent":36.57},"19888":{"number":"52","score":0,"percent":11.74},"19889":{"number":"13","score":0,"percent":2.93},"19891":{"number":"12","score":0,"percent":2.71},"19892":{"number":"11","score":0,"percent":2.48},"19893":{"number":"42","score":0,"percent":9.48},"19894":{"number":"153","score":0,"percent":34.54},"19895":{"number":"225","score":0,"percent":50.79},"19897":{"number":"39","score":0,"percent":8.8},"19898":{"number":"13","score":0,"percent":2.93},"19899":{"number":"54","score":0,"percent":12.19},"19900":{"number":"151","score":0,"percent":34.09},"19901":{"number":"186","score":0,"percent":41.99}}},"fake":{"survey":"443","modified_time":"1663743182","question":{"19881":"443","19885":"443","19890":"443","19896":"443"},"answer":{"19882":{"number":"95","score":0,"percent":21.44},"19883":{"number":"331","score":0,"percent":74.72},"19884":{"number":"17","score":0,"percent":3.84},"19886":{"number":"216","score":0,"percent":48.76},"19887":{"number":"162","score":0,"percent":36.57},"19888":{"number":"52","score":0,"percent":11.74},"19889":{"number":"13","score":0,"percent":2.93},"19891":{"number":"12","score":0,"percent":2.71},"19892":{"number":"11","score":0,"percent":2.48},"19893":{"number":"42","score":0,"percent":9.48},"19894":{"number":"153","score":0,"percent":34.54},"19895":{"number":"225","score":0,"percent":50.79},"19897":{"number":"39","score":0,"percent":8.8},"19898":{"number":"13","score":0,"percent":2.93},"19899":{"number":"54","score":0,"percent":12.19},"19900":{"number":"151","score":0,"percent":34.09},"19901":{"number":"186","score":0,"percent":41.99}}}},"records":null}; !function(){var t=window.__SINA_SURVEY_DATA||null,e=t&&t.survey.id,s={},n=window.location.href,a=".com";-1!=n.indexOf("sina.cn")&&(a="");var i="";window.sina_survey_config&&(i=window.sina_survey_config.host||"");var o="//"+i+"vote.sina"+a+".cn/api/survey/cast_vote",r="//"+i+"vote.sina"+a+".cn/api/survey/get_captcha/",c="//"+i+"vote.sina"+a+".cn/result/component/",u="//"+i+"vote.sina"+a+".cn/api/survey/vote_status/",d="//"+i+"vote.sina"+a+".cn/api/survey/info/",l={},_=null,h=document.getElementById("sina_survey_js_"+e),v={},p={},y={},g=null;e&&(s[e]=t,window.sina_survey_config&&window.sina_survey_config.callback&&(y[e]=window.sina_survey_config.callback));var m={addClass:function(t,e){new RegExp("\\b"+e+"\\b").test(t.className)||(t.className=(t.className+" "+e).match(/\S+/g).join(" "))},removeClass:function(t,e){var s=new RegExp("\\b"+e+"\\b","g");t.className=t.className.replace(s,"").replace(/^\s+|\s+$/g,"").replace(/\s+/g," ")},getByClass:function(t,e){for(var s=t.getElementsByTagName("*"),n=new RegExp("\\b"+e+"\\b","i"),a=[],i=0;i320&&d<=480?Math.round(.3*(d-25)):Math.round(.23*(d-25)),o=Math.round(a/n*i);else if("sina"==r){h?u=h.parentNode:p[s]&&(u=p[s]);d=Math.round(m.getWidth(u));var l=m.getStyle(document.getElementsByTagName("html")[0],"fontSize").split("px")[0];i=Math.round((d-.8*l-.6*l-.1*l)/2),o=Math.round(a/n*i)}return{width:i,height:o}},addEvent:function(t,e,s){t.attachEvent?t.attachEvent("on"+e,s):t.addEventListener(e,s,!1)},removeEvent:function(t,e,s){t.detachEvent?t.detachEvent("on"+e,s):t.removeEventListener(e,s,!1)},browserRedirect:function(){var t=navigator.userAgent.toLowerCase(),e=window.location.href,s=window.location.host,n=t.match(/(sinanews|sinafinance)/i),a=t.match(/MicroMessenger/i);return n?-1!=e.indexOf("file://")?"client":"client_m":a?"wechat":-1!=s.indexOf("sina.cn")?"m":"pc"},getUrlKey:function(t){return t.substring(t.indexOf("code=")).split("&")[0].split("=")[1]},getCookie:function(t){var e=document.cookie.split("; "),s=0;for(s=0;s"),e.push(s+"="+n)}return e.join("&")},ajax:function(t,e){if((e=e||{}).data=e.data||{},e.data.t=e.data.t||(new Date).getTime(),e.method=e.method||"get","wechat"==f&&(e.data.code=m.getUrlKey(window.location.href)),"client"==f)g&&g.fetch({url:t,type:e.method,data:e.data},function(t){e.success&&e.success(t)});else{var s=window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP");if("post"==e.method){s.open("POST",t,!0),s.withCredentials=!0,s.setRequestHeader("Content-Type","application/x-www-form-urlencoded");try{s.send(e.data?this.json2url(e.data):null)}catch(t){}}else{t+="?"+this.json2url(e.data),s.open("GET",t,!0);try{s.send()}catch(t){}}s.onreadystatechange=function(){4==s.readyState&&(200==s.status?e.success&&e.success(s.responseText):e.error&&e.error(s.status))}}}},f=m.browserRedirect(),w="";n=n.replace(/([?|&])code=[^&]*/gi,"$1");var b="https://vote.sina.cn/weixin/router?final_redirect_url="+encodeURIComponent(n);if("wechat"==f&&t.survey.others.vote_login>0&&!window.sessionStorage.getItem("vote_wxCode")){window.sessionStorage.setItem("vote_wxCode",1);var x=encodeURIComponent(b);window.location.href="https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx7ae02ffb0ec715d6&redirect_uri="+x+"&response_type=code&scope=snsapi_base#wechat_redirect"}"client"==f&&(w="https:"),window.sinaSurveyEvent={init:function(n){window.sina_survey_config=n,p[n.id]=m.getDom(n.parent),v[n.id]=n.parent,y[n.id]=n.callback,g=n.class,m.jsonp({url:w+d+n.id,success:function(n){0==n.result.status.code&&(t=n.result.data,e=t.survey.id,s[e]=t,T(e))}})},imgError:function(t){var e=t.parentNode,s=w+"//n.sinaimg.cn/survey/images/sina_logo.png";e.style.background="url("+s+") center center no-repeat #eee",e.style.backgroundSize="102px 44px",e.onclick=function(){var s=t.getAttribute("data-src");t.src=s+"?"+(new Date).getTime(),e.onclick=null}}};var T=function(t){t&&m.ajax(w+u+t,{method:"post",success:function(e){var n=null;if(n="string"==typeof e?JSON.parse(e):e,window["sina_survey_status_"+t]=n.result.status.code,l[t]=n.result.status.code,window.sina_survey_config&&"_blank"==window.sina_survey_config.resultType)k.init(t);else if(0==n.result.status.code||102==n.result.status.code)k.init(t);else{var a=C.getStatus(t);1==s[t].survey.type&&1==s[t].survey.others.result_show&&a?C.init(t):k.init(t)}}})},k={init:function(t){if(h||p[t]){var e=this;this.addCss(t),setTimeout(function(){e.cHtml(t),setTimeout(function(){e.setImgInfo()},100)},100)}},addCss:function(t){var e=document.getElementsByTagName("head")[0],s=document.getElementById("sina_survey_css"),n=document.createElement("link"),a=null,i="";window.sina_survey_config&&(a=window.sina_survey_config.surveyCss),a&&!s&&(i=-1!=a.toString().indexOf("http")?a:"pc"!=f?w+"//n.sinaimg.cn/survey/css/sina_survey_m_js.css":w+"//n.sinaimg.cn/survey/css/sina_survey_js.css",n.id="sina_survey_css",n.rel="stylesheet",n.type="text/css",n.href=i,e.appendChild(n))},setImgInfo:function(){var t="";window.sina_survey_config&&(window.sina_survey_config.source,t=window.sina_survey_config.imgWidth);for(var e=m.getByClass(document,"survey_img_box"),s=0;s'+d+""):(d="已结束",c.innerHTML=''+d+""),1==a&&2!=i&&(c.innerHTML+=''+_.survey+"人参与"),u.className="survey_content_item_wrap survey_content_item_wrap_"+e.id,r.innerHTML=e.title;for(var h=0;h提交';else switch(l[t]){case 0:case 102:p='提交';break;case 101:p='已结束';break;default:p='已提交'}var y="",g=C.getStatus(t);return 1==e.others.result_show&&2!=e.type&&g&&window.sina_survey_config&&"_blank"==window.sina_survey_config.resultType&&(y="查看结果'),2==e.status&&(p='已结束'),o.innerHTML+='
'+p+y+"
",o},cItem:function(t,e,n){var a=s[n].content.answer[t];switch(e.others.question_type){case"1":return this.radio(e,a,n);case"2":return this.checkBox(e,a,n);case"3":return this.text(e,a,n);case"4":return this.score(e,a,n);case"5":return this.radio(e,a,n);case"6":return this.checkBox(e,a,n)}},radio:function(t,e,s){var n="",a="";1==t.others.question_selection&&(n='*');for(var i=0;i',l=""):i%2==1&&(d="",l="")):this.parentWidth>320&&this.parentWidth<=480?(c="survey_img_box_min",i%3==0?(d='
',l=""):i%3==2&&(d="",l="
")):i%4==0?(d='
',l=""):i%4==3&&(d="",l="
"):i%2==0?(d='
',l=""):i%2==1&&(d="",l="
"),i==e.length-1&&(l=""),-1==g.indexOf("http")&&(g=w+g),o='
',r="survey_img_box",c&&"pc"==f&&(u=c)}a+=d+'
  • '+l}return'

    '+t.sort_id+'、'+t.description+""+n+'

      '+a+"
    "},checkBox:function(t,e,s){var n="",a="";1==t.others.question_selection&&(n='*('+(t.others.checkbox_num_least>0?" 最少"+t.others.checkbox_num_least+"项 ":"")+(t.others.checkbox_num_most>0?" 最多"+t.others.checkbox_num_most+"项":"")+')');for(var i=0;i',l=""):i%2==1&&(d="",l="")):this.parentWidth>320&&this.parentWidth<=480?(c="survey_img_box_min",i%3==0?(d='
    ',l=""):i%3==2&&(d="",l="
    ")):i%4==0?(d='
    ',l=""):i%4==3&&(d="",l="
    "):i%2==0?(d='
    ',l=""):i%2==1&&(d="",l="
    "),i==e.length-1&&(l=""),-1==g.indexOf("http")&&(g=w+g),o='
    ',r="survey_img_box",c&&"pc"==f&&(u=c)}a+=d+'
  • "+e[i].description+'

  • '+l}return'

    '+t.sort_id+'、'+t.description+""+n+'

      '+a+"
    "},text:function(t,e){var s="",n="";return 1==t.others.question_selection&&(s='*'),n+='
  • ','

    '+t.sort_id+'、'+t.description+""+s+'

      '+n+"
    "},score:function(t,e){var s="",n="";1==t.others.question_selection&&(s='*');for(var a=0;a"+o+""}return n='
  • ','

    '+t.sort_id+'、'+t.description+""+s+'

      '+n+"
    "},show:function(t){m.getByClass(document,"survey_content_body_"+t)[0].style.display="block"},hide:function(t){m.getByClass(document,"survey_content_body_"+t)[0].style.display="none"},getData:function(t){var e="true";return 0==s[t].survey.others.true_result&&(e="fake"),s[t].total[e]}},E={init:function(t){this.addDomEvent(t),this.scoreBoxEvent(t)},addDomEvent:function(t){var e=s[t].survey,n=m.getByClass(document.body,"survey_content_body_"+e.id)[0],a=(m.getByClass(n,"survey_score_box"),this);m.addEvent(n,"click",function(s){var n=s.target;if("I"===n.tagName){2==e.others.vote_show?a.nextEvent(n,t):a.scoreEvent(n);var i=m.getParentTagName(n,"UL");m.addClass(i,"active"),m.removeClass(i,"tip"),i.style.background=""}}),m.addEvent(n,"change",function(s){var n=s.target;if(2!=e.others.vote_show||"TEXTAREA"!==n.tagName&&"INPUT"!==n.tagName)switch(n.tagName){case"INPUT":a.inputEvent(n);break;case"I":a.scoreEvent(n)}else a.nextEvent(n,t);var i=m.getParentTagName(n,"UL");m.removeClass(i,"tip"),i.style.background=""}),m.addEvent(n,"mouseover",function(t){var e=t.target;if("I"===e.tagName)for(var s=e.parentNode.getElementsByTagName("i"),n=s.length,a=0;a=s?m.removeClass(n[a],"active"):m.addClass(n[a],"active")}},inputEvent:function(t){var e=m.getParent(t,"survey_content_item"),s=e.getElementsByTagName("input");if("radio"==t.type&&e.setAttribute("data-answer",t.value),"checkbox"==t.type){e.getAttribute("data-min");for(var n=e.getAttribute("data-max"),a=[],i=0,o=0;on)return t.checked=!1,void B.show("最多选择"+n+"项");e.setAttribute("data-answer",a.join("-"))}},scoreEvent:function(t){for(var e=t.parentNode.getElementsByTagName("i"),s=!0,n=0;n0){for(var r=0,c=0;c0){var i=null;if("wechat"!=f){if("client"==f)return void(g&&g.login({},function(t){1==s[n].survey.anti_cheat_strategy?S.init(n):e.postForm(n)}));if(!(window.userInfo||e.getCookie()))return void(window.WapLogin?(i="function"==typeof WapLogin?new WapLogin:this).login(!1,function(t){S.init(n)}):(i=window.SINA_OUTLOGIN_LAYER)&&i.set("plugin",{parentNode:document.body,position:"center"}).register("login_success",function(){S.init(n)}).show())}}1==s[n].survey.anti_cheat_strategy?S.init(n):e.postForm(n)}else"scoreNoPass"!=a.code?B.show("请完善各必填项!",function(){B.highLight()}):B.show("多选题"+a.index+"最少选择"+a.min+"项!",function(){B.highLight()})})},getPostData:function(t){for(var e={survey_id:t,user_info:{user_id:"",user_type:1},vote:[],captcha:{captcha_token:S.captchaToken||"",value:S.value||""}},s=m.getByClass(document.body,"survey_content_item_wrap_"+t)[0],n=m.getByClass(s,"survey_content_item"),a=0;a0){var i=null;"wechat"!=f&&"client"!=f&&(i=window.userInfo||this.getCookie(),a.user_info.user_id=i.uid)}m.ajax(w+o,{method:"post",data:a,success:function(s){if(s){var n=null;switch((n="string"==typeof s?JSON.parse(s):s).result.status.code){case 0:N.changeBtn(t),S.showStatus=!1,S.captchaHide();var a="";return window.sina_survey_config&&"toast"==window.sina_survey_config.tipType&&(a="toast"),void B.show(n.result.status.msg,function(){window.sina_survey_records={},window.sina_survey_records[n.result.data.survey.id]=n.result.data.records,window.sina_survey_config?("_blank"==window.sina_survey_config.resultType?function(e){if(!C.getStatus(t))return;if("wechat"==f||"m"==f||"client_m"==f)window.location.href=w+e.result.data.url+"?time="+(new Date).getTime();else{var s=window.open("about:blank");s.location.href=w+e.result.data.url+"?time="+(new Date).getTime()}}(n):C.show(t,function(){k.hide(t)}),y[e]&&y[e](n)):C.show(t,function(){k.hide(t)})},a);case 106:case 107:S.showStatus=!1,C.show(t,function(){k.hide(t)});break;case 108:case 109:case 110:S.showStatus=!1;break;case 113:return S.status=!0,void B.show(n.result.status.msg,function(){S.getData(t)});case 112:case 114:S.showStatus=!0;break;default:S.showStatus=!1}S.captchaHide(),B.show(n.result.status.msg)}},error:function(t){}})}},C={getStatus:function(t){for(var e=!1,n=s[t].content.question,a=0;a已提交':1==s[t].survey.others.result_show&&n&&(this.init(t),e&&e())},init:function(t){if(!document.querySelector("#sina_survey_result_js_"+t)){var e=document.getElementById("sina_survey_result_css"),s=document.createElement("script"),n=null;t&&(window.sina_survey_config&&(n=window.sina_survey_config.resultCss),n&&!e&&s.setAttribute("data-css",n.toString()),s.setAttribute("data-parent",v[t]),s.id="sina_survey_result_js_"+t,s.type="text/javascript",s.src=w+c+t+".js?v="+(new Date).getTime(),p[t]?p[t].appendChild(s):h.parentNode.insertBefore(s,h),s.onload=s.onreadystatechange=function(){this.readyState&&"loaded"!=this.readyState&&"complete"!=this.readyState||window.sina_survey_config&&window.sina_survey_config.setPercent&&window.sina_survey_config.setPercent(t)})}}},S={init:function(t){this.surveyId=t,this.captchaToken="",this.captchaImg="",this.value="",this.height=this.height||"",this.status=!0,this.showStatus=!1,this.timer=null,this.getData(t)},getData:function(t){var e=this;m.jsonp({url:w+r+t,success:function(s){0==s.result.status.code&&(e.captchaImg=s.result.data.img,e.captchaToken=s.result.data.captcha_token,e.captchaTokenValue=s.result.data.value,e.cBody(t))}})},captchaShow:function(){var t=this;if(this.box){function e(){window.sina_survey_box_mask.style.display="block",t.box.style.display="block"}"pc"!=f?this.setStyle("",function(){e()}):e()}},captchaHide:function(){this.box&&(window.sina_survey_box_mask.style.display="none",this.box.style.display="none")},cBody:function(t){var e=document.createElement("div");e.className="survey_captcha_box clearfix",e.style.display="block",e.innerHTML='

    验证码

    取消确定
    ',this.box?this.box.innerHTML=e.innerHTML:(this.box=e,document.body.appendChild(e)),this.addEvent(e,t),this.captchaShow()},addEvent:function(t,e){var s=this;if("pc"!=f){var n=this.box.getElementsByTagName("input")[0];n.onfocus=function(){s.setStyle("focus")},n.onblur=function(){s.setStyle("blur")}}this.box.ontouchmove=function(t){t.preventDefault()},t.onclick=function(t){if("survey_captcha_cancel"==t.target.className&&s.captchaHide(),"survey_captcha_ok"==t.target.className){if(!s.status)return;s.status=!1;var n=setTimeout(function(){s.status=!0,clearTimeout(n)},1500),a=m.getByClass(document,"survey_captcha_code_"+s.surveyId)[0].value;""!=m.removeSpace(a)?(s.value=a,N.postForm(s.surveyId)):(B.show("请输入验证码!"),s.status=!0)}"survey_captcha_img"==t.target.className&&s.getData(e)}},setStyle:function(t,e){if("m"==f||"pc"==f){var s=this.height||this.box.clientHeight;return s&&(this.height=s),this.box.style.position="fixed",this.box.style.top="50%",this.box.style.marginTop="-"+s/2+"px",void(e&&e())}var n=this,a=navigator.userAgent.toLowerCase(),i="ios";t&&"blur"==t?(clearTimeout(this.timer),this.timer=setTimeout(function(){n.setTop(e),clearTimeout(n.timer)},500)):(-1!=a.indexOf("android")&&(i="android"),"ios"==i?n.setTop(e):"android"==i&&(clearTimeout(this.timer),this.timer=setTimeout(function(){n.setTop(e),clearTimeout(n.timer)},500)))},setTop:function(t){if(window.sina_survey_config&&window.sina_survey_config.setTop)window.sina_survey_config.setTop(this.box,e);else{var s=this.height||this.box.clientHeight;s&&(this.height=s),I(this.box,s)}t&&t()}},B={init:function(){this.height=this.height||"",this.timer=null,this.cBody()},cBody:function(){if(!document.getElementById("survey_tip_box")){var t=document.createElement("div"),e=document.createElement("div");t.id="survey_captcha_box_mask",t.className="survey_captcha_box_mask",e.id="survey_tip_box",e.className="survey_tip_box",e.innerHTML='

    提示

    确定
    ',window.sina_survey_box_mask=t,document.body.appendChild(t),document.body.appendChild(e),m.addEvent(e,"touchmove",function(t){t.preventDefault()}),m.addEvent(t,"touchmove",function(t){t.preventDefault()}),m.addEvent(t,"click",function(t){t.preventDefault()})}},show:function(t,e,s){if(s&&"toast"==s){var n=document.querySelector(".survey_toast_box");return n||((n=document.createElement("div")).className="survey_toast_box",n.innerHTML=t,document.body.appendChild(n)),n.style.display="block",window.sina_survey_config.setTop&&window.sina_survey_config.setTop(n),void setTimeout(function(){n.style.opacity=0,setTimeout(function(){n.style.display="none",n.style.opacity=1},1e3)},1e3)}var a=document.getElementById("survey_captcha_box_mask"),i=document.getElementById("survey_tip_box");i.getElementsByTagName("p")[0].innerHTML=t,a.style.display="block","pc"!=f?this.height?this.setStyle(function(){i.style.display="block"}):(i.style.display="block",this.setStyle()):i.style.display="block",m.getByClass(i,"survey_tip_btn")[0].onclick=function(){S.showStatus&&S.captchaShow(),S.box&&"block"==S.box.style.display||S.showStatus||(a.style.display="none"),i.style.display="none",e&&e()}},highLight:function(){if(3==_.getAttribute("data-type")?_.getElementsByTagName("textarea")[0].focus():m.addClass(_.getElementsByTagName("ul")[0],"tip"),"m"==f){var t=m.getPos(_).top;window.scrollTo(0,t)}},setStyle:function(t){if("m"==f||"pc"==f){var e=document.getElementById("survey_tip_box"),s=this.height||e.clientHeight;return s&&(this.height=s),e.style.position="fixed",e.style.top="50%",e.style.marginTop="-"+s/2+"px",void(t&&t())}var n=this,a="ios",i=0;-1!=navigator.userAgent.toLowerCase().indexOf("android")&&(a="android"),"ios"==a?i=300:"android"==a&&(i=500),clearTimeout(this.timer),this.timer=setTimeout(function(){n.setTop(t),clearTimeout(n.timer)},i)},setTop:function(t){var s=document.getElementById("survey_tip_box");if(window.sina_survey_config&&window.sina_survey_config.setTop)window.sina_survey_config.setTop(s,e);else{var n=this.height||s.clientHeight;n&&(this.height=n),I(s,n)}t&&t()}},I=function(t,e){var s=document.documentElement.scrollTop||document.body.scrollTop,n=document.documentElement.clientHeight||document.body.clientHeight,a=Math.floor((n-e)/2)+s;t.style.position="absolute",t.style.marginTop=0,t.style.top=a+"px"};T(e)}();