PageSourceSearch

https://www.yw56.com.cn/webfile/CnResource/js/public.js

js yw56.com.cn collected 2026-10-02 03:51:53 UTC 6,857 bytes, 178 lines download raw bytes

1$(function(){
2  function loadScript(url) {
3    const script = document.createElement('script');
4    script.src = url;
5    document.head.appendChild(script);
6}
7
8// loadScript(`/webfile/CnResource/js/robot.js`);
9	
10	// 页面跳转 class="toWeb" data-url="url"
11  handleGroupJump();
12  function handleGroupJump() {
13      $('.body-wrap').on('click', '.toWeb', function() {
14          var url = $(this).data("url");
15          var pathname = window.location.pathname;
16          // 一级页面跳转:首页/产品/服务/新闻资讯/关于我们
17          if (pathname.indexOf("home") === -1) {
18              jump(url);
19          }
20          // 二级页面以及logo跳转
21          if (url === "/chn/newHome") {
22              $("html, body").animate({scrollTop: "0px"}, 300);
23              return false;
24          } else {
25              jump(url);
26          }
27      });
28  };
29  function jump(url) {
30      window.location.href = ywwlPath + url;
31  };
32
33  // 针对移动端 copyright 底部 tab 切换
34  mobileCopyrightSwitchTab();
35  function mobileCopyrightSwitchTab() {
36    var $copyrights = $('.copyright-item__classify')
37    $('.copyright-item__title').off().on('click touchstart', function(){
38      $($copyrights[$(this).data('type')]).fadeToggle('fast')
39    })
40  }
41
42  // 给一级页面加上 bar-active 属性
43  // 一级标题高亮
44  addClassAuto();
45  function addClassAuto() {
46    var pathname = window.location.pathname;
47    var query = ywwlspace.util.getUrlParams();
48    // if (pathname.indexOf("/chn/product") !== -1) {
49    //   $("#clickProducts").addClass('bar-active');
50    // }
51    if (pathname.indexOf("/chn/feature9610") !== -1 || pathname.indexOf("/chn/featureZhongGangService") !== -1 ) {
52      $("#clickServer").addClass('bar-active');
53    }
54    if (pathname.indexOf("/chn/news") !== -1) {
55      $("#clickNews").addClass("bar-active");
56    }
57    if (pathname.indexOf("/chn/aboutUs") !== -1) {
58      $("#clickAboutUs").addClass("bar-active");
59    }
60      if (pathname.indexOf("/chn/service") !== -1 && pathname.indexOf("/chn/service/serviceNetworkQuery") !== -1 ) {
61          $("#newworkQuery").addClass('bar-active');
62      }
63      // if ("590" === query.fKey || "591" === query.fKey || "592" === query.fKey || "593"===query.fKey || "594"===query.fKey) {
64      //     $("#clickProducts").addClass('bar-active');
65      // }
66      // 小包产品
67      if ("500" === query.fKey) {
68          $("#smallProduct").addClass('bar-active');
69      }
70      // 国际快递
71      if ("502" === query.fKey) {
72          $("#international").addClass('bar-active');
73      }
74      // fba
75      if ("501" === query.fKey) {
76          $("#fba").addClass('bar-active');
77      }
78      // 特快专线
79      if ("590" === query.fKey) {
80        $('#tkzx').addClass('bar-active');
81      }
82      // 自有专线小包
83      if ("594" === query.fKey || "593" === query.fKey) {
84        $("#selfXb").addClass('bar-active');
85      }
86  }
87
88  //右侧浮动导航
89  leftFloatNavigation();
90  function leftFloatNavigation() {
91    $("#leftsead a").hover(function(){
92      if($(this).prop("className")=="youhui"){
93        $(this).children("img.hides").show();
94      }else{
95        $(this).children("img.hides").show();
96        $(this).children("img.shows").hide();
97        $(this).children("img.hides").animate({marginRight:'0px'},'slow');
98      }
99    },function(){
100      if($(this).prop("className")=="youhui"){
101        $(this).children("img.hides").hide('slow');
102      }else{
103        $(this).children("img.hides").animate({marginRight:'-143px'},'slow',function(){$(this).hide();$(this).next("img.shows").show();});
104      }
105    });
106    $("#top_btn").click(function(){if(scroll=="off") return;$("html,body").animate({scrollTop: 0}, 600);});
107    $("#to_seach").click(function(){if(scroll=="off") return;$("html,body").animate({scrollTop: 2700}, 600);});
108  }
109});
110
111// 封装地址选择函数
112// 参数 origin province city county
113// var address = {}
114// address.handleAddress = function(ele, obj) {
115//   // 文本框显示内容
116//   function handleInputValue() {
117//     var str = obj.province + "-" + obj.city + "-" + obj.county
118//     $("."+ ele + "-input").val(str)
119//   }
120//   // box显示与隐藏
121//   $("." + ele).off().on('click', "." + ele + "-choose", function() {
122//     $("." + ele + "-content").slideToggle('fast')
123//   })
124//
125//   $("." + ele + " .first-floor").off().on('click', 'li', function() {
126//     $(this).addClass('current').siblings().removeClass('current')
127//     obj.origin = $(this).data('tab')
128//     handleInputValue()
129//   })
130//   $("." + ele + " .third-floor").off().on('click', 'li', function() {
131//     $(this).addClass('current').siblings().removeClass('current')
132//     obj.province = $(this).data('province')
133//     handleInputValue()
134//     $("." + ele + " .third-floor").removeClass('display').addClass('displaynone')
135//     $("." + ele + " .fourth-floor").addClass('displaynone').addClass('display')
136//   })
137//   $("." + ele + " .fourth-floor").off().on('click', 'li', function() {
138//     $(this).addClass('current').siblings().removeClass('current')
139//     obj.city = $(this).data('city')
140//     handleInputValue()
141//     $("." + ele + " .fourth-floor").removeClass('display').addClass('displaynone')
142//     $("." + ele + " .fifth-floor").addClass('displaynone').addClass('display')
143//   })
144//   $("." + ele + " .fifth-floor").off().on('click', 'li', function() {
145//     $(this).addClass('current').siblings().removeClass('current')
146//     obj.county = $(this).data('county')
147//     handleInputValue()
148//     $("." + ele + " .fifth-floor").removeClass('display').addClass('displaynone')
149//     $("." + ele + " .third-floor").removeClass('displaynone').addClass('display')
150//     $("." + ele + "-content").slideToggle('fast')
151//     console.log(obj)
152//   })
153// }
154// address.handleWeight = function(ele, obj) {
155//   $('.' + ele).off().on('input', '.' + ele + '-input', function(event) {
156//     event.stopPropagation()
157//     obj.weight = $(this).val()
158//   })
159// }
160// address.origin = {origin: 'main-land',province: '省/市辖市',city: '市',county: '区/县'}
161// address.handleAddress('top-box', address.origin)
162// address.destination = {destination: 'main-land',province: '省/市辖市',city: '市',county: '区/县'}
163// address.handleAddress('destination-address-box', address.destination)
164// // 增加参数重量 weight
165// address.weight = 0
166// address.handleWeight('weight-box', address)
167// // 比较请求处理函数
168// $('.info-box').off().on('click', '.price-choose', function() {
169//   console.log(address)
170// })
171//
172// // 查询网点部分
173// address.queryCity = {origin: 'main-land',province: '省/市辖市',city: '市',county: '区/县'}
174// address.handleAddress('city-box', address.queryCity)
175// // 查询请求处理函数
176// $('.info-box').off().on('click', '.query-city', function() {
177//   console.log(address)
178// })

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.