1 |
- var e=!1,n=0,t=0,a=0,d=0,s=0,y=0,l=0,o=0;const u={idx:0,nextId:null,title:"南京世茂项目",backurl:"",descript:"",is_yuyue:!1,yy_step:0,src:[{id:0,name:"Kanfang",title:"",thumb:"nanimages/yykf_sel.png"},{id:1,name:"01frontGate",title:"A1户型 建面约165m2",thumb:"nanimages/sc_1.jpg"},{id:2,name:"02masterBedroom",title:"B1户型 建面约187m2",thumb:"nanimages/sc_2.jpg"},{id:3,name:"03masterBedroom",title:"C1户型 建面约210m2",thumb:"nanimages/sc_3.jpg"},{id:4,name:"04masterBedroom",title:"D1户型 建面约215m2",thumb:"nanimages/sc_4.jpg"}]};function c(){const e=window.location.search,n=new URLSearchParams(e);let t=n.get("backurl")?n.get("backurl"):"../";u.backurl=t;for(var a=document.getElementById("listContent_ybf");a.firstChild;)a.removeChild(a.firstChild);let d=0;for(let e of u.src){const n=document.createElement("div");n.className="pano",d=e.id,1==d&&(n.style.marginLeft=0),n.setAttribute("data-id",d);const t=document.createElement("div");t.className="title",t.innerHTML=e.title;const s=document.createElement("div");s.className=0===e.id?"kanfang":"thumb";const y=document.createElement("img");0==e.id&&(y.id="kanfang_image"),y.src=e.thumb,s.appendChild(y),n.appendChild(t),n.appendChild(s),a.appendChild(n)}}function m(e){1==u.yy_step&&(e?(document.getElementById("yuyue_ok").src="./nanimages/qd_sel.png",document.getElementById("yuyue_ok").setAttribute("data-sel",!0),document.getElementById("yd_phone").blur()):(document.getElementById("yuyue_ok").src="./nanimages/qd_non.png",document.getElementById("yuyue_ok").setAttribute("data-sel",!1),document.getElementById("yd_phone").focus()))}function i(e){var n=e;return n.length>180&&(n=n.substr(0,180)+"..."),n}function g(e){const n=document.getElementById("listContent_ybf").childNodes;for(let e=0;e<n.length;e++)n[e].className="pano";pano_select=e?u.idx===n.length-1?0:u.idx+1:0===u.idx?n.length-1:u.idx-1,0===pano_select?document.getElementById("kanfang_image").src="./nanimages/yykf_sel.png":(document.getElementById("kanfang_image").src="./nanimages/yykf_non.png",n[pano_select].className="panoSelect"),u.idx=pano_select}function r(){const e="ybf.html?&backurl="+u.backurl;window.location.href=e}function _(){const e=document.getElementById("yuyue_ok").getAttribute("data-sel");switch(u.yy_step){case 0:u.yy_step++,u.is_yuyue=!0,document.getElementById("kanfang_yuding").style.display="flex",document.getElementById("yd_phone").style.display="flex",document.getElementById("yd_phone").focus();break;case 1:if("true"==e){0==document.getElementById("yd_phone").value.length?(u.yy_step=0,document.getElementById("kanfang_yuding").style.backgroundImage="url(./nanimages/tc_yuyue.png)",document.getElementById("kanfang_yuding").style.display="none",document.getElementById("yd_phone").style.display="flex",document.getElementById("yuyue_ok").src="./nanimages/qd_non.png",document.getElementById("yuyue_ok").setAttribute("data-sel",!1),u.is_yuyue=!1):(u.yy_step++,document.getElementById("kanfang_yuding").style.backgroundImage="url(./nanimages/tc_yy_success.png)",document.getElementById("yd_phone").style.display="none")}break;case 2:"true"==e&&(u.yy_step=0,document.getElementById("kanfang_yuding").style.backgroundImage="url(./nanimages/tc_yuyue.png)",document.getElementById("kanfang_yuding").style.display="none",document.getElementById("yd_phone").style.display="flex",document.getElementById("yuyue_ok").src="./nanimages/qd_non.png",document.getElementById("yuyue_ok").setAttribute("data-sel",!1),u.is_yuyue=!1)}}c();var p=new tvSysBtnBind({id:"Jdoc",className:"ctrlBtn",currentClass:"current",keyRemoveDefault:!1,effect:"base",currentIndex:0,onLoad:function(e){},onPress:function(){switch(this.event.keyCode){case 37:g(!1);break;case 39:g(!0);break;case 38:m(!1);break;case 40:m(!0)}},onEnterPress:function(){0==u.idx?_():r()},onBack:function(){if(console.log(u.is_yuyue),u.is_yuyue){if(1==u.yy_step){const e=document.getElementById("yd_phone").value,n=e.length>1?e.substring(0,e.length-1):"";document.getElementById("yd_phone").value=n}}else{const e=u.backurl;console.log("backurl"),window.location.href=e}}});window.onBackEvent=function(){if(u.is_yuyue)u.yy_step=0,document.getElementById("kanfang_yuding").style.backgroundImage="url(./nanimages/tc_yuyue.png)",document.getElementById("kanfang_yuding").style.display="none",document.getElementById("yd_phone").style.display="flex",document.getElementById("yuyue_ok").src="./nanimages/qd_non.png",document.getElementById("yuyue_ok").setAttribute("data-sel",!1),u.is_yuyue=!1;else{const e=u.backurl;console.log("backurl"),window.location.href=e}};
|