约¥' + data.price + '' + data.price_nuit + '
'; html += '' + '(有效期:' + data.time + ')' + '
'; html += '
// 头部搜索 ---------------------------------------- $('.seekinput_search span').on('mousemove', function () { //显示切换框 $('.seekinput_option').show(); }) $('.seek_box').on('mouseleave', function () { //隐藏切换框 $('.seekinput_option').hide(); }) $('.seekinput_option span').eq(1).attr('class', 'on'); //默认 $('.seekinput_search input[qhid="2"]').show(); //默认 $('.seekinput_option span').on('click', function () { $('.seekinput_search input[type="text"]').hide(); var _html = $(this).html(); $('.seekinput_search span i').html(_html); $('.seekinput_option').hide(); $(this).attr('class', 'on').siblings().attr('class', ''); var _qhid = $(this).attr('qhid'); $('.seekinput_search input[qhid="' + _qhid + '"]').show(); //选中的搜索输入框 $('.seek_input input[type="button"]').attr('buttonid', _qhid); //选中的 类型 1为 楼盘列表 2为 视频列表 $('.seekinput_search input[type="text"]').val(""); //清空input 内容 }) $('.seek_input input[type="button"]').on('click', function () { //搜索跳转操作 var _buttonid = $(this).attr('buttonid'); var txt = $('.seek_input input[qhid="' + _buttonid + '"]').val(); console.log(_buttonid); console.log(txt); if (txt != '') { switch (_buttonid) { case '1': window.open('/house/search?name=' + txt); break; case '2': window.open('/video/videosearch?name=' + txt); break; } } ; }) $(document).keydown(function (event) { if (event.keyCode == 13) { $('.seek_input input[type="button"]').click(); } }); // 头部搜索 ---------------------------------------- // 视频看房 ------------------------------------------------------ var videoid = $('.m_videolist_dh .videoclick').eq(0).attr('videoid'); $('.m_videolist_dh .videoclick').eq(0).addClass('on'); ajax_qy(); var being = true; $('.m_videolist_dh .videoclick').on('mouseover', function () { if (videoid != $(this).attr('videoid')) { being = true; } videoid = $(this).attr('videoid'); if (being == true) { ajax_qy(); being = false; } $(this).addClass('on').siblings().removeClass('on'); $('.videolist_option p').removeClass('on'); }) $('.videolist_option p').on('mouseover', function () { if (videoid != $(this).attr('videoid')) { being = true; } videoid = $(this).attr('videoid'); if (being == true) { ajax_qy(); being = false; } $(this).addClass('on').siblings().removeClass('on'); $('.m_videolist_dh .videoclick').removeClass('on'); }) $('.gdclick').on('mousemove', function () { $('.videolist_option').show(); }) $('.gdclick').on('mouseleave', function () { $('.videolist_option').hide(); }) function ajax_qy() { var html = ''; $.ajax({ url: "/video/videolisthouse", // 索取 data: {city: videoid}, //传ID type: "GET", dataType: "json", success: function (data) {//请求成功完成后要执行的方法 var style = $('.m_videolistdata').attr('style'); if (data.code == 200) { $.each(data.data, function (i, data) { html += '
约¥' + data.price + '' + data.price_nuit + '
'; html += '' + '(有效期:' + data.time + ')' + '
'; html += ''; html += '' + data.main_units + ''; html += '|'; html += '参考收益 ' + data.rent.proportion + ''; html += '
'; html += ''; html += '' + data.title + ''; html += '
'; html += ''; html += '预约
'; html += '' + data.title + '
'; html += '';
html += '' + data.parentCity + ' ' + data.city_name + '';
// html+= '
156万';
html += '
预约
'; html += '' + data.title + '
'; html += '';
html += '' + data.parentCity + ' ' + data.city_name + '';
// html+= '
156万';
html += '