' _this.publishBox.innerHTML = listTpl; } this.loginedBox.style.display = 'block'; if (typeof Stat !== 'undefined') { // 埋点 _this.initStatEvent(); } // 回调侧边栏方法 setTimeout(function () { window.asideInstance && asideInstance.updateUserInfo(oData) }, 1000); } else { // 显示登陆按钮 this.loginBox && this.loginBox._show(); ucenterLink = this.loginUrl(window.location.href) } this.oUserInfo.setAttribute('href', ucenterLink) // 请求完接口,执行回调逻辑 window._YC_.ee.on("common:userInfo", oData) // 接口加载完成 window._YC_.userInfo.loaded = true; // 清空队列 this.fnClearUserAfterQueue() }, // 生成登录URL loginUrl: function (url) { return "//i.yiche.com/authenservice/login.html?returnurl=" + encodeURIComponent(url); }, // 初始化 自定义事件 initEventEmit: function () { window._YC_.ee = new EventEmitter(); }, // 登陆与未登录显示 initVisible: function () { // 屏蔽域名 newcenter.yiche.com和i.yiche.com if (/^i\.yiche\.com/.test(window.location.hostname)) { this.loginBox.className = this.loginBox.className + ' hide-line' this.loginedBox.className = this.loginedBox.className + ' hide-line' } }, // 城市组件初始化 // 初始化城市 initCity: function () { var _self = this; // 导航的city var city = new City({ el: "#new-head-city-list", city_id: _self.oSelectCity.cityId, clickCityRequested: function () { _self.clickStat({ ctitle: 'diquxialacaidan', ptitle: _self.ptitle, crgn: 'dingbutonglan' }) setTimeout(function () { window.location.reload(); }, 200); } }); var cityBox = this.$$('#new-head-city') if(cityBox) { cityBox.onmouseenter = function () { city.show({ cityId: _self.oSelectCity.cityId }); } cityBox.onmouseleave = function () { city.hide(); // 北京 } } window._YC_ ? window._YC_.topCity = city : ''; }, isParents: function (target, selector) { var targetEl = target; var isIn = false // 遍历外层并且匹配 while (targetEl) { // 判断是否匹配到我们所需要的元素上 if (targetEl && targetEl.matches && targetEl.matches(selector)) { isIn = true } targetEl = targetEl.parentNode; } return isIn }, // window._YC_userInfoEmit initUserInfoAfterQueue: function () { var _self = this; window._YC_.userInfoEmit = function () { var aList = Array.prototype.slice.call(arguments); for (var i = 0; i < aList.length; i++) { var cb = aList[i]; if (typeof cb === "function") { _self.aUserAfterQueue.push(cb); } else { console.error("userInfoEmit的每个参数应为function"); } } _self.fnClearUserAfterQueue(); }; }, // 清空获取信息后的队列 fnClearUserAfterQueue: function () { var _self = this; if (window._YC_.userInfo.loaded) { for (var index = 0; index < _self.aUserAfterQueue.length; index++) { var cb = _self.aUserAfterQueue[index]; cb(); // 执行队列每个元素 _self.aUserAfterQueue.shift(); // 执行后清除当前队列 index--; } } }, // 初始化搜索 initSearch: function () { var _self = this window.YicheSearchInstance = window.YicheSearch && new window.YicheSearch({ el: "#new-head-search", searchCb: function (value) { _self.clickStat({ ctitle: 'sousuo', ptitle: _self.ptitle, crgn: 'dingbutonglan' }) setTimeout(function () { window.location.href = '//so.yiche.com/qiche/' + encodeURIComponent(value) + '/'; }, 200); } }) || ""; // 埋点 var brandBox = document.querySelector('.yccmp-brand-box'); if(brandBox) { brandBox.addEventListener('click', function () { _self.clickStat({ ctitle: 'sousuo', ptitle: _self.ptitle, crgn: 'dingbutonglan' }) }, false) } }, // 初始化埋点 initStatEvent: function () { if(typeof Stat == 'function') { var _self = this; _self.st = new Stat({}); var pointsEl = document.querySelectorAll('.yc-head-point'); if (pointsEl && pointsEl.length) { for (var i = 0; i < pointsEl.length; i++) { var itemA = pointsEl[i]; itemA.onclick = function () { var ctitle = this.getAttribute('point-ctitle') || ''; if (ctitle) { _self.clickStat({ ctitle: ctitle, ptitle: _self.ptitle, crgn: 'dingbutonglan' }); } } } } } }, // 埋点 clickStat: function (oLg) { var pageStat = window._YC_ && window._YC_.stat || { base: {}, yc_log: {}, lg_vl: {}, } pageStat.base.ltype = 'click' this.st({ base: pageStat.base, yc_log: pageStat.yc_log, lg_vl: this.extend(pageStat.lg_vl, oLg) }) }, // 城市cookie setCityCookies: function () { if (window.Bitauto && window.Bitauto.location) { var bitlocal = window.Bitauto.location; var city = bitlocal.city var selectcity = city ? city.regionId : bitlocal.regionId; var selectcityid = city ? city.id : bitlocal.cityId; var selectcityname = city ? city.shortName : bitlocal.shortName; var sHostName = document.domain.split('.').slice(-2).join('.'); var cityPinyin = city ? city.spell : '' this.setCookieItem('selectcity', selectcity, new Date(2222, 2, 2), '/', sHostName); this.setCookieItem('selectcityid', selectcityid, new Date(2222, 2, 2), '/', sHostName); this.setCookieItem('selectcityName', selectcityname, new Date(2222, 2, 2), '/', sHostName); this.setCookieItem('selectcityPinyin', cityPinyin, new Date(2222, 2, 2), '/', sHostName); }; }, // 设置城市cookie setCookieItem: function (sKey, sValue, vEnd, sPath, sDomain, bSecure) { if (!sKey || /^(?:expires|max\-age|path|domain|secure)$/i.test(sKey)) { return false; } var sExpires = ""; if (vEnd) { switch (vEnd.constructor) { case Number: sExpires = vEnd === Infinity ? "; expires=Fri, 31 Dec 9999 23:59:59 GMT" : "; max-age=" + vEnd; break; case String: sExpires = "; expires=" + vEnd; break; case Date: sExpires = "; expires=" + vEnd.toUTCString(); break; } } document.cookie = encodeURIComponent(sKey) + "=" + encodeURIComponent(sValue) + sExpires + (sDomain ? "; domain=" + sDomain : "") + (sPath ? "; path=" + sPath : "") + (bSecure ? "; secure" : ""); return true; }, extend: function () { var sources = Array.prototype.slice.call(arguments, 0); var destination = sources.shift(); if (typeof destination != "object") { destination = {} } if (sources && sources.length) { for (var i = 0; i < sources.length; i++) { var item = sources[i]; if (typeof item == "object") { for (var name in item) { destination[name] = item[name]; } } } } return destination; }, replaceWpUrl: function (url, width) { return url && url.replace && url.replace('{0}', width); }, isSupportWebp: function (callback) { var img = new Image(); img.onload = function () { var result = img.width > 0 && img.height > 0; callback(result); }; img.onerror = function () { callback(false); }; img.src = "data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA"; }, getCookie: function (e) { var t = ";?s*" + e + "=([^;]+)", n = new RegExp(t, "ig"), o = document.cookie.match(n); if (o) { return decodeURIComponent(o[0].split("=")[1]) } return null } } topNav.init();

浏览易车国际站

您是否想浏览中国自主品牌出口车型,可以为您切换到易车国际站。

去易车国际站
继续浏览当前页
近期重磅新车最新优惠
    • 加速
    • 制动
    • 麋⿅
    • 滑轮组
    汽车资讯查看更多
    汽车视频查看更多
    北京·二手车查看更多
    优惠购车查看更多

      优惠品牌推荐

      本地优惠推荐

      • 推荐
      • 新能源
      • 导购
      • 原创
      • 上市新车
      • 社区
      • 养车宝典
      • 商用车
      • 易车号
      • 玩转改装
      • 摩托之家
      • 汽车产经
      服务热线 4000 168 168 am9:00 - pm5:30 (法定假日除外) 传真:(010) 68492726

      CopyRight © 2000-2023 BitAuto,All Rights Reserved. 版权所有 北京易车信息科技有限公司    备案号:京ICP备09064160号 经营许可证 京ICP证060175号 网络视听许可证0110543号 广播电视节目制作许可证1238号
      营业执照 公安备案 11010802020002号 乙测资字11513421
      违法和不良信息 涉未成年人有害信息 算法推荐专项问题 举报:4000168168转2 [email protected] 水滴信用 网上有害信息举报专区 中国互联网联合辟谣平台