上跨越速运总裁信箱提“金点子”赢奖励|千万家企业首选定制化限时速运服务专家

") messageJQ.hide().appendTo('body') } var timeoutMessage; // 弹窗 function aleartMessage(value){ // 设置弹窗DOM与内容 messageInit(value) // 显示弹窗 $('.ky-message').show() // 判断是否有定时器 if(timeoutMessage){ window.clearTimeout(timeoutMessage) } // 定时后隐藏弹窗 timeoutMessage = window.setTimeout(function () { $('.ky-message').hide() }, 1000); } onMessage(); $(window).on('load', function () { // 菜单初始化 menuInit(); //右边工具栏初始化 toolbarInit(); //导航菜单下划线初始化 menuUnderline() //百度统计 baiduInit(); //APM性能 kyApmInit(); //导航登录按钮逻辑 handleLoginBtn(); //下载客户端按钮 downloadBtnInit(); }); function menuInit() { $('#zlight-nav').zlightMenu({ transform: 'off', fontSize: '16px' }); var $nav = $(".ky-header"); $nav.toggleClass('scrolled', $(document).scrollTop() > $nav.height() * 2); $(document).on('scroll', function () { $nav.toggleClass('scrolled', $(this).scrollTop() > $nav.height() * 2); }); $('#zlight-main-nav > li').each(function(i){ $(this).css({width: $(this).innerWidth(), padding: 0}) }) } function toolbarInit() { $('#goTop').on('click', function () { $('body, html').animate({ scrollTop: 0 }, 300); }); $('#aiService').on('click', function () { reportEvents.clk_website_home_page_customer_service('运单查询') var iWidth = 1145; //弹出窗口的宽度; var iHeight = 780; var iTop = (window.screen.availHeight - 30 - iHeight) / 2; //获得窗口的水平位置 var iLeft = (window.screen.availWidth - 10 - iWidth) / 2; // var param = "height=".concat(iHeight, ", top=").concat(iTop, ", width=").concat(iWidth, ", left=").concat(iLeft, ", toolbar='no', menubar='no', scrollbars='no', resizable='no', location='no', status='no'"); var param = "" var url = 'https://kuasheng-h5.kye-erp.com/ccms-jd-web/'; var params = { source: 'WEB' }; var keys = Object.keys(params).filter(function (k) { return params[k]; }).sort(); var rawString = keys.reduce(function (str, cur) { str += cur + params[cur]; return str; }, ''); rawString += 'imcloudMethod'; params.sign = hex_md5(rawString).toUpperCase(); var paramsString = Object.keys(params).filter(function (k) { return params[k]; }).map(function (k) { return "".concat(k, "=").concat(params[k]); }).join('&'); window.open("".concat(url, "?").concat(paramsString), '_blank', param); }); } // 侧边栏 function sidebarInit() { $('.sidebar-dropdown > .title').on('click', function () { if (!$(this).hasClass('link')){ var el = $(this).siblings('.sidebar-submenu'); // el.slideToggle() if (el.hasClass('hide')) { var siblings = $(this).parents().siblings(); el.slideDown(400).removeClass('hide'); $(this).find('.ky-arrow-up').removeClass('rotate'); siblings.find('.sidebar-submenu').slideUp(400).addClass('hide'); siblings.find('.ky-arrow-up').addClass('rotate'); } else { el.slideUp(400).addClass('hide'); $(this).find('.ky-arrow-up').addClass('rotate'); } } }); $('.sidebar-submenu .item').on('click', function () { $('.sidebar-submenu .item').removeClass('active'); $(this).addClass('active'); }); } //二级tab function tabInit() { $('.ky-tab-item').on('click', function () { if ($(this).hasClass('active')) return false; $(this).addClass('active').siblings().removeClass('active'); }); } //百度统计 function baiduInit() { var _hmt = _hmt || []; (function() { var hm = document.createElement("script"); hm.src = "https://hm.baidu.com/hm.js?14abfe1895f1102e0c0811ad3bb1dbcc"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(hm, s); })(); } //APM性能监控 function kyApmInit() { var dsn = 'https://quickaplus-api-uat.ky-tech.com.cn:1443'; var appkey = 'p7o74xv9aryrsspw625wko3y'; var url = window.location.href; /* 生产 */ if (url.indexOf('www.ky-express.com') > -1) { dsn = 'https://quickaplus-api.ky-tech.com.cn' appkey = '9g8nnoekoisjdn6kp01ceoq8' } void (function (e, t, n, a, o, i, m) { (e._um_apm_namespace = o), (e[o] = e[o] || function () { (e[o].q = e[o].q || []).push(arguments); }), (e[o].l = e[o].l || +new Date()), (i = t.createElement(n)), i.setAttribute('crossorigin', ''), (i.src = a), (m = t.getElementsByTagName(n)[0]), m.parentNode.insertBefore(i, m); })(window, document, "script", "https://g.alicdn.com/jssdk/apm/2.0.9/es5/uapm.iife.js", "_apm"); _apm('create',{ pid: appkey, dsn: dsn, pageFilter: { mode: 'ignore', rules: [] }, }); } //导航登录按钮逻辑 function handleLoginBtn(){ var cookieVal = 'Login-data' var userInfoStr = getCookie(cookieVal) if(userInfoStr){ var userInfo = JSON.parse(decodeURIComponent(userInfoStr)) if(userInfo.token){ $('.login-btn').text('去寄件').on('click',function(){ reportEvents.clk_website_home_page_Login_order('登录/下单') window.open('https://uc.ky-express.com/#/admin/delivery?sourcePage=official_website&sourceAction=website_order', '_blank') }) return } } $('.login-btn').on('click',function(){ reportEvents.clk_website_home_page_Login_order('登录/下单') var loginUrl = 'https://uc.ky-express.com/#/login/password?sourceFrom=website' window.open(loginUrl, '_blank') }) } //获取cookie逻辑 function getCookie(cookieName){ var cookieValue=""; if (document.cookie && document.cookie != '') { var cookies = document.cookie.split(';'); for (var i = 0; i -1) { baseUrl = 'http://api-uat.kyeapi.com/router/rest' } if(version.indexOf("Windows NT 5")!=-1 || version.indexOf('Windows XP') != -1){ link='https://ver1.ky-express.com/DATA/Upgrade/KYEClientSetup-0323.exe' }else { $.ajax( { url:baseUrl, type:'post', dateType:'json', headers:{ 'Content-Type':'application/json;charset=utf8', 'appkey':appkey, 'method':'web.version.versionManager.getVersionLink' }, data: JSON.stringify({ packageType: 'pc' }), success:function(res){ if(res.data){ $(".clientDownload").on('click', function () { window.location.href=res.data }) } }, error:function(err){ } } ) } $(".clientDownload").on('click', function () { window.location.href=link }) }