123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719 |
- $(function () {
- $(".lst_box").on({
- mouseover: function () {
- $(this).children("i").addClass('cur')
- $(this).children(".lst_cun").show();
- },
- mouseout: function () {
- $(this).children("i").removeClass('cur')
- $(this).children(".lst_cun").hide();
- }
- });
- })
- $(document).ready(function(){
- var index=0;
- var length=$(".js_yv2_banner_image ul li").length;
- var i=1;
-
-
- function showImg(i){
- $(".js_yv2_banner_image ul li").eq(i).stop(true,true).fadeIn(800).siblings("li").hide();
- $(".js_small_list ul li").eq(i).addClass("on").siblings().removeClass("on");
-
- $('body .video_puic').find('video').trigger("pause");
- $('body .video_puic').find('video').removeClass('play');
- $('body .video_puic').find('video').addClass('pause');
- }
-
- function slideNext(){
- if(index >= 0 && index < length-1) {
- ++index;
- showImg(index);
- }else{
- showImg(0);
- index=0;
- aniPx=(length-5)*132+'px';
- $(".js_small_list ul li").animate({ "left": "+="+aniPx },200);
- i=1;
- return false;
- }
- if(i<0 || i>length-5) {return false;}
- $(".js_small_list ul li").animate({ "left": "-=132px" },200)
- i++;
- }
-
- function slideFront(){
- if(index >= 1 ) {
- --index;
- showImg(index);
- }
- if(i<2 || i>length+5) {return false;}
- $(".js_small_list ul li").animate({ "left": "+=132px" },200)
- i--;
- }
- $(".js_yv2_banner_image ul li").eq(0).show();
- $(".js_small_list ul li").eq(0).addClass("on");
- $(".js_small_list ul").width((length*132)+'px')
- $(".js_left_btn").click(function(){
- slideFront();
- })
- $(".js_right_btn").click(function(){
- slideNext();
- })
- $(".js_small_list ul li").click(function(){
- index = $(".js_small_list ul li").index(this);
- showImg(index);
- });
- var randomX = 0;
- var randomY = 14;
- var randvalue = parseInt(Math.random() * (randomX - randomY + 1) + randomY);
- $('.yv2Home_zx_r em img').attr('src','/overseas/img/v2image/tx_ico'+randvalue+'.png');
-
- })
- $(function () {
- var typeId=$('.js_yv2_Homehx_nav a').eq(0).attr('data-type')
- var typeHid=$('.js_yv2_Homehx_nav a').eq(0).attr('data-hid')
- $('.js_yv2_Homehx_nav a').eq(0).addClass('on').siblings().removeAttr('on')
- typeList(typeId,typeHid)
- $('.js_yv2_Homehx_nav a').on('click',function(){
- typeId=$(this).attr('data-type')
- typeHid=$(this).attr('data-hid')
- $(this).addClass('on').siblings().removeClass('on');
- typeList(typeId,typeHid)
- })
- })
- function typeList(typeid,hid){
- $.post('/json/housetypeall', {hid: hid, type_id: typeid, csrf_token_f: csrfToken}, function (data) {
- var echodataUl = $('.js_yv2_Homehx_list ul');
- echodataUl.html('');
- var data = data.data;
- var html = '';
- $.each(data, function (key, val) {
- if(key<3){
- var randomX = 0;
- var randomY = 14;
- var randvalue = parseInt(Math.random() * (randomX - randomY + 1) + randomY);
- html += '<li>';
- html += '<div class="left_main">';
- html += '<a href="/house/typedetails/'+val.hid+'?daid='+key+'&type_id='+val.type_id+'">';
- html += '<div class="left_img">';
- html += '<img src="'+val.img+'" alt="">';
- if (val.type_id=='vr') {
- html += '<div class="vvid_pic_ico vr-animation-forever"></div>';
- };
- html += '</div>';
- html += '<div class="right_text">';
- html += '<p class="hx_m">'+val.title+'</p>';
- html += '<p class="js_m">'+val.indoor_info+'</p>';
- html += '<p class="mj_m">(建筑面积) '+val.area+'</p>';
- html += '<p class="style_m">';
- html += '<i>户型方正</i>';
- html += '<i>南北通透</i>';
- html += '</p>';
- html += '</div>';
- html += '</a>';
- html += '</div>';
- html += '<div class="hx_hqbj">';
- html += '<a href="javascript:;" class="pic_jjtz" data-buttom="立即获取报价" data-title="户型报价" data-hid="'+val.hid+'" data-text="提交号码可获取户型报价、首付、月供 详细报价单。" data-source="128">';
- html += '<p class="ico"><img src="/overseas/img/v2image/tx_ico'+randvalue+'.png" alt=""></p>';
- html += '<p class="text_m">户型报价</p>';
- html += '</a>';
- html += '</div>';
- html += '</li>';
- }
- })
- echodataUl.html(html);
- })
- }
- $('.js_honeganbi').on('click',function(){
- $('.js_yv2_saomaBox').hide();
- })
- var _liUrl=$('#yv2_saomaBox').attr('src');
- var qrcode = new QRCode(document.getElementById('yv2_saomaBox'), {
- width : 122,
- height : 122,
- });
- qrcode.makeCode(_liUrl);
- $(function () {
-
- $('.y_lpmap_lsit ul li').on('click', function () {
- $(this).addClass('on').siblings().removeClass('on');
- var _data = $(this).find('span').text();
- var _longitude = $('#y_lpmap').attr('data-jwd');
- var pintx = _longitude.split(',')[0];
- var pinty = _longitude.split(',')[1];
- _longitude = new BMap.Point(pintx, pinty);
- doSearch(_data, _longitude);
- })
- });
- var map = new BMap.Map("y_lpmap");
- var _lTude = $('#y_lpmap').attr('data-jwd');
- var _lJg = $('#y_lpmap').attr('data-jg');
- var _lTitle = $('#y_lpmap').attr('data-title');
- var pintx = _lTude.split(',')[0];
- var pinty = _lTude.split(',')[1];
- _lTude = new BMap.Point(pintx, pinty);
- map.centerAndZoom(_lTude, 15);
- map.enableScrollWheelZoom();
- function ComplexCustomOverlay(_lTude, text, mouseoverText) {
- this._point = _lTude;
- this._text = text;
- this._overText = mouseoverText;
- }
- ComplexCustomOverlay.prototype = new BMap.Overlay();
- ComplexCustomOverlay.prototype.initialize = function (map) {
- this._map = map;
- var div = this._div = document.createElement("div");
- div.style.position = "absolute";
- div.style.zIndex = BMap.Overlay.getZIndex(this._point.lat);
- div.style.backgroundColor = "#EE5D5B";
- div.style.border = "1px solid #BC3B3A";
- div.style.color = "white";
- div.style.height = "12px";
- div.style.padding = "2px";
- div.style.lineHeight = "10px";
- div.style.whiteSpace = "nowrap";
- div.style.MozUserSelect = "none";
- div.style.fontSize = "12px"
- var span = this._span = document.createElement("span");
- div.appendChild(span);
- span.appendChild(document.createTextNode(this._text));
- var that = this;
- var arrow = this._arrow = document.createElement("div");
- arrow.style.background = "url(http://map.baidu.com/fwmap/upload/r/map/fwmap/static/house/images/label.png) no-repeat";
- arrow.style.position = "absolute";
- arrow.style.width = "11px";
- arrow.style.height = "10px";
- arrow.style.top = "16px";
- arrow.style.left = "10px";
- arrow.style.overflow = "hidden";
- div.appendChild(arrow);
- div.onmouseover = function () {
- this.style.backgroundColor = "#6BADCA";
- this.style.borderColor = "#3487ab";
- this.getElementsByTagName("span")[0].innerHTML = that._overText;
- arrow.style.backgroundPosition = "0px -20px";
- }
- div.onmouseout = function () {
- this.style.backgroundColor = "#EE5D5B";
- this.style.borderColor = "#BC3B3A";
- this.getElementsByTagName("span")[0].innerHTML = that._text;
- arrow.style.backgroundPosition = "0px 0px";
- }
- map.getPanes().labelPane.appendChild(div);
- return div;
- }
- ComplexCustomOverlay.prototype.draw = function () {
- var map = this._map;
- var pixel = map.pointToOverlayPixel(this._point);
- this._div.style.left = pixel.x - parseInt(this._arrow.style.left) + "px";
- this._div.style.top = pixel.y - 30 + "px";
- }
- var txt = _lTitle, mouseoverTxt = txt + " " + _lJg;
- var myCompOverlay = new ComplexCustomOverlay(_lTude, _lTitle, mouseoverTxt);
- map.addOverlay(myCompOverlay);
- var local = new BMap.LocalSearch(map, {renderOptions: {map: map, autoViewport: true}});
- function doSearch(Odata, Opoint) {
- var address = Odata;
- local.searchNearby(address, Opoint);
- }
- var dom = document.getElementById("container");
- var myChart = echarts.init(dom);
- var app = {};
- var dataText = $('.js_y_lptitle h2').text();
- var dataYear = [];
- var dataPrice = [];
- var oid = $('.js_y_lptitle').attr('data-id');
- $.ajax({
- type: 'POST',
- url: '/json/houseprice',
- data: {id: oid, csrf_token_f: csrfToken},
- async: false,
- dataType: 'json',
- success: function (data) {
- if (data.code == 200) {
-
- var data = data.data;
- dataPrice = data.data;
- dataYear = data.categories;
- } else {
- $('.y_lptrend').hide();
- }
- }
- })
- option = null;
- option = {
- tooltip: {
- trigger: 'axis'
- },
- legend: {
-
- data: [dataText],
- right: '50px',
- },
- xAxis: {
- type: 'category',
- boundaryGap: false,
- data: dataYear
- },
- yAxis: {
- type: 'value',
- axisLabel: {
- formatter: '{value}元/㎡'
- }
- },
- series: [
- {
- name: dataText,
- type: 'line',
- data: dataPrice,
- color: ['#00aeff'],
- symbolSize: 8,
- itemStyle: {
- normal: {
- color: '#00aeff',
- borderColor: '#00aeff',
- }
- },
- }
-
-
-
-
-
-
-
-
-
-
-
-
-
- ]
- };
- if (option && typeof option === "object") {
- myChart.setOption(option, true);
- }
- $(function () {
- var xc_leng = $('.y_lpphoto_list ul li').length;
- if (xc_leng <= 4) {
- $('.js_prev,.js_next').hide();
- }
- })
- document.addEventListener('DOMContentLoaded', function () {
- var multiSlides = document.querySelector('.js_multislides');
- lory(multiSlides, {
-
- slidesToScroll: 1
- });
- });
- $(function () {
- $('.y_lpguanzhu a').on('click', function () {
- AddFavorite('我的网站', location.href);
- $(this).find('i img').attr('src', '/image/ico_10.png');
- })
- })
- function AddFavorite(title, url) {
- try {
- window.external.addFavorite(url, title);
- } catch (e) {
- try {
- window.sidebar.addPanel(title, url, "");
- } catch (e) {
- alert("抱歉,您所使用的浏览器无法完成此操作。\n\n加入收藏失败,请使用Ctrl+D进行添加");
- }
- }
- }
- $(function () {
- $('#y_lpdtpc_nav2 ul li').eq(0).click();
-
- PublicAction.AjaxSend(
- {
- CORID: 'apply_submit',
- }
- );
-
- PublicAction.AjaxSend(
- {
- CORID: 'js_homeButtom',
- }
- );
- })
- $('#y_lpdtpc_nav2 ul li').click(function () {
- $(this).addClass('on').siblings().removeClass('on');
- var dataid = $(this).attr('data-id');
- var type = $(this).attr('name');
- var valdata = $(this).attr('valdata');
- $.post('/json/tall', {type: type, csrf_token_f: csrfToken, content: valdata}, function (data) {
- var echodataUl = $('.y_lpdtpc_list ul');
- echodataUl.html('');
- var data = data.data;
- var html = '';
- $.each(data, function (key, val) {
- var pic = val.sale_price;
- pic = '<i style="color:#ccc;font-size:12px;display:inline-block;margin-right:5px;">参考价格</i>' + val.sale_price + val.price_unit;
- if (val.sale_price == 0 || val.sale_price == null || val.sale_price == '') {
- pic = '待定';
- }
- html = '<li>';
- html += '<div class="y_love_list_main">';
- html += '<div class="y_tu">';
- html += '<a target="_blank" href="/house/' + val.id + '"><img src="' + val.thumb + '" alt=""></a>';
- html += '</div>';
- html += '<div class="y_text">';
- html += '<h2><a target="_blank" href="/house/' + val.id + '">' + val.name + '</a><i>[' + val.city_name + ']</i></h2>';
- html += '<p class="y_pic">';
- html += '<span>' + pic + '</span>';
- html += '<i class="rq" style="color:#c2bfbf;font-size:12px;margin-top:2px;display: block;">有效期至:' + v3Time + '</i>';
- html += '</p>';
- html += '</div>';
- html += '</div>';
- html += '</li>';
- echodataUl.append(html);
- })
- })
- });
- listvideo();
- function listvideo() {
- $('.js_yv2_banner_image ul').on('click', '.video_puic', function () {
- if ($(this).find('video').hasClass('pause')) {
- $(this).find('p.video_puic_img').hide();
- $(this).find('p.video_puic_ico').hide();
- $(this).find('video').trigger("play");
- $(this).find('video').removeClass('pause');
- $(this).find('video').addClass('play');
- } else {
- $(this).find('video').trigger("pause");
- $(this).find('video').removeClass('play');
- $(this).find('video').addClass('pause');
- }
- })
- }
- $('.small_list ul li,.small_box .left_btn,.small_box .right_btn').on('click', function () {
- $('.js_yv2_banner_image ul .video_puic').find('p.video_puic_img').show();
- $('.js_yv2_banner_image ul .video_puic').find('p.video_puic_ico').show();
- $('.js_yv2_banner_image ul .video_puic video').trigger("pause");
- $('.js_yv2_banner_image ul .video_puic video').removeClass('play');
- $('.js_yv2_banner_image ul .video_puic video').addClass('pause');
- })
- $(function(){
-
-
- var audio = document.getElementById("lplive_vid");
- var btn = document.getElementById("lplive");
- var musitime= 0;
- var cubicle = "true";
-
- if (btn) {
- btn.onclick = function () {
- var domeid=$('#sxbmdata').attr('data-id')
- if (domeid!='' && domeid!=null ) {
- $('#sxbmdata').attr('data-type','false')
- $('#lplive').attr('data-boole','false')
- $('.m_videobj').hide();
- $('.m_video_img').hide();
- $('#lplive_vid').show();
- audio.play();
- }else{
- $('#sxbmdata').attr('data-type','true')
- $('#lplive').attr('data-boole','true')
- $('.m_videobj').hide();
- $('.m_video_img').hide();
- if(musitime >= 600 && cubicle == "true"){
- AudioWind_live();
- return false;
- }
- audio.play();
- watchMusicTime_vid()
- }
- }
- };
-
- $('.y_reduced2_bg , .y_reduced2_gb a').on('click',function(){
- $('.y_reduced2').hide();
- $('.m_form_button2').removeClass('wcontrol')
- $('.y_reduced2_bg').hide();
- $('.m_videobj').show();
- $('.m_video_img').show();
- $('#lplive_vid').show();
- })
-
- function AudioWind_live(){
- $('.y_reduced2').show();
- $('.y_reduced2_bg').show();
- audio.pause()
- }
-
- function watchMusicTime_vid(){
- console.log(1)
- let _this = this;
-
-
- let musicDom = audio;
-
- musicDom.addEventListener("timeupdate",function(){
- cubicle = $('#lplive').attr('data-boole');
-
-
- let timeDisplay;
-
- timeDisplay = Math.floor(musicDom.currentTime);
- musitime = timeDisplay;
-
-
-
- if(timeDisplay >= 600 && cubicle == "true"){
- audio.pause();
- AudioWind_live();
- }
-
-
- let minute = timeDisplay / 60;
- let minutes = parseInt(minute);
- if (minutes < 10) {
- minutes = "0" + minutes;
- }
-
- let second = timeDisplay % 60;
- let seconds = Math.round(second);
- if (seconds < 10) {
- seconds = "0" + seconds;
- }
- let shun= minutes+":"+seconds;
-
-
- },false);
- }
-
- var urlstr = window.location.href;
- var matchdata = urlstr.match(/\.com(\/\w+)/)[1];
- var phoneReg = /(^1[3|4|5|7|8]\d{9}$)|(^09\d{8}$)/;
- var count = 60;
- var InterValObj1;
- var curCount1;
- $('#btnSendCode1').on('click',function(){
- sendMessage1();
- })
-
- $('.m_reduced_r2 #buttom_m').on('click',function(){
- var phoneReg = /(^1[3|4|5|7|8]\d{9}$)|(^09\d{8}$)/;
- var phone = $.trim($('#phone1').val());
- var code = $.trim($('#code').val());
- if (!phoneReg.test(phone)) {
-
- $('.zhanghao b.hint-text').show();
- $('#phone1').addClass('on');
- return false;
- }else{
- $('.zhanghao b.hint-text').hide();
- $('#phone1').removeClass('on');
- }
- if (code!='') {
- $('.mima b.hint-text').hide();
- $('#code').removeClass('on');
- }else{
-
- $('.mima b.hint-text').show();
- $('#code').addClass('on');
- return false;
- }
-
- $.ajax({
- type: "POST",
- url: matchdata+"/public/checkcode",
- data: {mobile:phone,code:code,csrf_token_f: csrfToken},
- dataType: "json",
- success:function(data){
- if(data.code == 200) {
-
- $('.y_reduced2').hide();
- $('.y_reduced2_bg').hide();
- $('#sxbmdata').attr('data-type','false');
- $('#sxbmdata').attr('data-id',phone);
- $('#lplive').attr('data-boole','false');
- $('.m_videobj').hide();
- $('#lplive_vid').show();
- $('.m_video_img').hide();
- audio.play();
- $('.m_reduced_r2 .buttom_m2').click();
- }else{
- loginAlert(data.msg,2000)
- return false;
- }
- }
- });
- PublicAction.AjaxSend(
- {
- CORID:'buttom_m2',
- }
- );
-
- })
-
- function sendMessage1() {
- curCount1 = count;
- var phone = $.trim($('#phone1').val());
- if (!phoneReg.test(phone)) {
- $('.zhanghao b.hint-text').show();
- $('#phone1').addClass('on');
- return false;
- }else{
- $('.zhanghao b.hint-text').hide();
- $('#phone1').removeClass('on');
- }
-
- $("#btnSendCode1").attr("disabled", "true");
- $("#btnSendCode1").val( '('+ curCount1 + ")秒再获取");
- InterValObj1 = window.setInterval(SetRemainTime1, 1000);
-
- $.ajax({
- type: "POST",
- url: matchdata+"/public/sendcode",
- data: {mobilephone:phone,csrf_token_f: csrfToken},
- dataType: "json",
- success:function(data){
-
- if(data.code == 200){
-
- loginAlert(data.msg,2000)
- $('.mima b.hint-text').hide();
- $('#code').removeClass('on');
- }else{
- loginAlert(data.msg+',请重新发送!',2000)
- curCount1 = 0;
- window.clearInterval(InterValObj1);
- $("#btnSendCode1").removeAttr("disabled");
- $("#btnSendCode1").val("重新发送");
- $('.mima b.hint-text').show();
- $('#code').addClass('on');
- return false;
- }
- }
- });
- }
- function SetRemainTime1() {
- if (curCount1 == 0) {
- window.clearInterval(InterValObj1);
- $("#btnSendCode1").removeAttr("disabled");
- $("#btnSendCode1").val("重新发送");
- $("#btnSendCode1").css('color','#2DB1FB')
- }else {
- curCount1--;
- $("#btnSendCode1").val( '('+ curCount1 + ")秒再获取");
- $("#btnSendCode1").css('color','#999')
- }
- }
- function loginAlert(txt,time){
-
- var M = {};
- if(M.dialog1){
- return M.dialog1.show();
- }
- M.dialog1 = jqueryAlert({
- 'content' : txt,
- 'closeTime' : time,
- })
- }
- })
|