portal html css js resource

common.js 36KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315
  1. //var wlogurl="http://192.168.3.233:8080"
  2. var wlogurl="http://www.ekexiu.com:8082";
  3. $(document).ready(function() {
  4. $(".unlogin").show();
  5. $(".onlogin").hide();
  6. var footerHeight = $("footer").outerHeight(true);
  7. $('#container').css("padding-bottom", footerHeight + "px");
  8. $(".footer_tools").css("bottom", (footerHeight+10) + "px");
  9. $(window).resize(function() {//窗口大小变更事件
  10. footerHeight = $("footer").outerHeight(true);
  11. $('#container').css("padding-bottom", footerHeight + "px");
  12. });
  13. //底部企业入驻
  14. var orgid = $.cookie('orgId');
  15. $("#cmpSet2").on("click", function() {
  16. if(orgid && orgid != "null" && orgid != null) {
  17. location.href = "cmp-portal/cmp-workspaces.html"
  18. } else {
  19. location.href = "cmp-portal/cmp-settled-reg.html"
  20. }
  21. })
  22. $("#cmpSet3").on("click", function() {
  23. if(orgid && orgid != "null" && orgid != null) {
  24. location.href = "/cmp-portal/cmp-workspaces.html"
  25. } else {
  26. location.href = "/cmp-portal/cmp-settled-reg.html"
  27. }
  28. })
  29. //搜索框跳转页面
  30. $("#search").on("click", function() {
  31. var searchContent = $("#searchContent").val();
  32. setTimeout(function(){location.href = "searchNew.html?searchContent=" + encodeURI(searchContent)},300);
  33. });
  34. $("#search").on("click", function() {
  35. var searchContent = $("#searchContent").val().replace(/^\s*|\s*$/,"");
  36. if(searchContent) {
  37. wlog("kw", searchContent)
  38. }
  39. });
  40. //enter绑定时间
  41. $("#searchContent").keydown(function(e) {
  42. if(e.which == 13) {
  43. var searchContent = $("#searchContent").val();
  44. console.log(searchContent);
  45. location.href = "searchNew.html?searchContent=" + encodeURI(searchContent);
  46. }
  47. })
  48. $("#hsearchContent").keydown(function(e) {
  49. if(e.which == 13) {
  50. var searchContent = $("#hsearchContent").val();
  51. if($(this).siblings()[0].id=="searchh") {
  52. location.href = "/searchNew.html?searchContent=" + encodeURI(searchContent);
  53. return;
  54. }
  55. location.href = "searchNew.html?searchContent=" + encodeURI(searchContent);
  56. }
  57. })
  58. $("#hsearch").on("click", function() {
  59. var searchContent = $("#hsearchContent").val();
  60. setTimeout(function(){
  61. location.href = "searchNew.html?searchContent=" + encodeURI(searchContent);
  62. },300)
  63. });
  64. $("#searchh").on("click", function() {
  65. var searchContent = $("#hsearchContent").val();
  66. setTimeout(function(){
  67. location.href = "/searchNew.html?searchContent=" + encodeURI(searchContent);
  68. },300)
  69. });
  70. $("#hsearch").on("click", function() {
  71. var searchContent = $("#hsearchContent").val().replace(/^\s*|\s*$/,"");
  72. if(searchContent) {
  73. wlog("kw", searchContent)
  74. }
  75. });
  76. /*向下滚动时,header背景变半透明*/
  77. $(document).scroll(function() {
  78. var top = $(document).scrollTop();
  79. if(top == 0) {
  80. $(".navheader").removeClass("navhdown");
  81. } else {
  82. $(".navheader").addClass("navhdown");
  83. }
  84. if(top >= 300) {
  85. $(".content-left").css({
  86. "position": "fixed",
  87. "top": "80px"
  88. })
  89. } else {
  90. $(".content-left").css({
  91. "position": "static"
  92. })
  93. }
  94. });
  95. /*选择省份*/
  96. $(document).on("click", "#Province li a", function() {
  97. var aVal = $(this).text();
  98. $(this).parent().parent().parent().find('.mr_show').text(aVal);
  99. $(this).parent().parent().parent().find('input[name=cho_Province]').val(aVal);
  100. if($("#oprovince").text() == "请选择省/直辖市") {
  101. $("#oprovince").removeClass("mr_select");
  102. $("#ocity").removeClass("mr_select");
  103. } else {
  104. $("#oprovince").addClass("mr_select");
  105. $("#ocity").removeClass("mr_select");
  106. }
  107. });
  108. /*选择城市填充js */
  109. $(document).on("click", "#City li a", function() {
  110. var aVal = $(this).text();
  111. $(this).parent().parent().parent().find('.mr_show').text(aVal);
  112. $(this).parent().parent().parent().find('input[name=cho_City]').val(aVal);
  113. if($("#ocity").text() == "请选择城市") {
  114. $("#ocity").removeClass("mr_select");
  115. } else {
  116. $("#ocity").addClass("mr_select");
  117. }
  118. });
  119. /*多行文本框样式(带有限制数字)模拟focus效果*/
  120. $(".msgContbox textarea").focus(function() {
  121. $(this).parent().css("border-color", "#ff9900");
  122. }).blur(function() {
  123. $(this).parent().css("border-color", "#E5E5E5");
  124. })
  125. });
  126. var userid;
  127. function exit() {
  128. $.cookie('userid', null);
  129. $.cookie('userAuth', null);
  130. $.cookie('userEmail', null);
  131. $.cookie('userMobilePhone', null);
  132. $.cookie('userName', null);
  133. $.cookie('userType', null);
  134. location.href = "index.html"
  135. }
  136. function exitStaticize() {
  137. $.cookie('userid', null,{ path: '/' });
  138. $.cookie('userAuth', null,{ path: '/' });
  139. $.cookie('userEmail', null,{ path: '/' });
  140. $.cookie('userMobilePhone', null,{ path: '/' });
  141. $.cookie('userName', null,{ path: '/' });
  142. $.cookie('userType', null,{ path: '/' });
  143. location.href = "/index.html"
  144. }
  145. function valUser() {
  146. var userid = $.cookie('userid');
  147. var userAuth = $.cookie('userAuth');
  148. if(userid == undefined || userid.length == 0 || userid == "null" || userAuth == false) {
  149. location.href = "login.html";
  150. }
  151. }
  152. function pageUrl(type,datalist) {
  153. return ("shtml/"+type+"/"+datalist.createTime.substring(0,8)+"/"+datalist.shareId+".html");
  154. }
  155. function GetQueryString(name) {
  156. var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
  157. var r = window.location.search.substr(1).match(reg);
  158. var context = "";
  159. if(r != null)
  160. context = r[2];
  161. reg = null;
  162. r = null;
  163. return context == null || context == "" || context == "undefined" ? "" : decodeURI(context);
  164. }
  165. function loginStatus() {
  166. userid = $.cookie('userid');
  167. userAuth = $.cookie('userAuth');
  168. authentication = $.cookie('authentication');
  169. if(userid && userid != "null" && userid != null) {
  170. if(userAuth == "false" && authentication == "null") {
  171. location.href = "loginInviteFirst.html";
  172. }
  173. if(userAuth == "true" && authentication == "null") {
  174. location.href = "fillinfo-select.html";
  175. }
  176. if(userAuth == "true" && authentication != "null") {
  177. $(".onlogin").show();
  178. $(".unlogin").hide();
  179. $(".portrait-p").attr("src", "/images/head/" + userid + "_m.jpg");
  180. $(".portrait-p").load(function() { //判断图片是否加载,加载不成功默认有默认的图像
  181. })
  182. .error(function() {
  183. $(".portrait-p").attr("src", "/images/default-photo.jpg");
  184. });
  185. unReadedCount(userid);
  186. unInformCount(userid)
  187. }
  188. $(".portrait-p").on("click",function(){
  189. location.href="userInforShow.html?professorId="+userid;
  190. })
  191. $(".onlogin").on("click",".goMyInf",function(){
  192. $(this).attr("href","userInforShow.html?professorId="+userid)
  193. })
  194. } else {
  195. $(".unlogin").show();
  196. $(".onlogin").hide();
  197. }
  198. }
  199. function loginYesOrNo() {
  200. userid = $.cookie('userid');
  201. userAuth = $.cookie('userAuth');
  202. authentication = $.cookie('authentication');
  203. if(userid && userid != "null" && userid != null) {
  204. if(userAuth == "false" && authentication == "null") {
  205. location.href = "/loginInviteFirst.html";
  206. }
  207. if(userAuth == "true" && authentication == "null") {
  208. location.href = "/fillinfo-select.html";
  209. }
  210. if(userAuth == "true" && authentication != "null") {
  211. $(".onlogin").show();
  212. $(".unlogin").hide();
  213. $(".portrait-p").attr("src", "/images/head/" + userid + "_m.jpg");
  214. $(".portrait-p").load(function() { //判断图片是否加载,加载不成功默认有默认的图像
  215. })
  216. .error(function() {
  217. $(".portrait-p").attr("src", "/images/default-photo.jpg");
  218. });
  219. unReadedCount(userid);
  220. }
  221. $(".portrait-p").on("click",function(){
  222. location.href="/userInforShow.html?professorId="+userid;
  223. })
  224. $(".onlogin").on("click",".goMyInf",function(){
  225. $(this).attr("href","/userInforShow.html?professorId="+userid)
  226. })
  227. } else {
  228. $(".unlogin").show();
  229. $(".onlogin").hide();
  230. }
  231. }
  232. function unReadedCount(id){//查询指定用户的未读消息数量
  233. $.ajax({
  234. type:"get",
  235. url:"/ajax/webMsg/unReadedCount",
  236. async:true,
  237. data:{"id":id},
  238. success:function(data){
  239. console.log(data)
  240. if(data.success){
  241. if(data.data!=0){
  242. $(".mymessage").find(".badge").text(data.data);
  243. }else{
  244. $(".mymessage").find(".badge").text("");
  245. }
  246. }
  247. }
  248. });
  249. }
  250. function unInformCount(id){//查询指定用户的未读通知数量
  251. $.ajax({
  252. type:"get",
  253. url:"/ajax/notify/idx",
  254. async:true,
  255. data:{"id":id},
  256. success:function(data){
  257. console.log(data)
  258. if(data.success){
  259. if(data.data.unRead!=0){
  260. $(".myinform").find(".badge").text(data.data.unRead);
  261. }else{
  262. $(".myinform").find(".badge").text("");
  263. }
  264. }
  265. }
  266. });
  267. }
  268. //转换格式
  269. function changeTime(dealtime) {
  270. var s = dealtime;
  271. //console.log(s);
  272. if(dealtime.length == 8) {
  273. var y = s.substr(0, 4);
  274. var m = s.substr(4, 2);
  275. var d = s.substr(6, 2);
  276. var formatTime = y + "-" + m + "-" + d;
  277. return formatTime;
  278. } else {
  279. var y = s.substr(0, 4);
  280. var m = s.substr(4, 2);
  281. var d = s.substr(6, 2);
  282. var h = s.substr(8, 2);
  283. var minute = s.substr(10, 2);
  284. var formatTime = y + "-" + m + "-" + d + " " + h + ":" + minute;
  285. return formatTime;
  286. }
  287. }
  288. //******过滤特殊字符*******//
  289. function replaceStr(s) {
  290. var pattern = new RegExp("-");
  291. var rs = "";
  292. for(var i = 0; i < s.length; i++) {
  293. rs = rs + s.substr(i, 1).replace(pattern, '');
  294. }
  295. return rs;
  296. }
  297. //**********************//
  298. //根据用户输入的Email跳转到相应的电子邮箱首页
  299. var hash = {
  300. 'qq.com': 'http://mail.qq.com',
  301. 'gmail.com': 'http://mail.google.com',
  302. 'sina.com': 'http://mail.sina.com.cn',
  303. '163.com': 'http://mail.163.com',
  304. '126.com': 'http://mail.126.com',
  305. 'yeah.net': 'http://www.yeah.net/',
  306. 'sohu.com': 'http://mail.sohu.com/',
  307. 'tom.com': 'http://mail.tom.com/',
  308. 'sogou.com': 'http://mail.sogou.com/',
  309. '139.com': 'http://mail.10086.cn/',
  310. 'hotmail.com': 'http://www.hotmail.com',
  311. 'live.com': 'http://login.live.com/',
  312. 'live.cn': 'http://login.live.cn/',
  313. 'live.com.cn': 'http://login.live.com.cn',
  314. '189.com': 'http://webmail16.189.cn/webmail/',
  315. 'yahoo.com.cn': 'http://mail.cn.yahoo.com/',
  316. 'yahoo.cn': 'http://mail.cn.yahoo.com/',
  317. 'eyou.com': 'http://www.eyou.com/',
  318. '21cn.com': 'http://mail.21cn.com/',
  319. '188.com': 'http://www.188.com/',
  320. 'ustb.edu.cn': 'http://mail.ustb.edu.cn/',
  321. 'foxmail.coom': 'http://www.foxmail.com'
  322. };
  323. //轮播滚动函数
  324. function Carousel(inde, num, show, childcount, obj, next, prev) {
  325. var tapnum = 0; //按钮可点击次数
  326. if(childcount > num) {
  327. next.css("display", "block");
  328. prev.css("display", "none");
  329. } else {
  330. next.css("display", "none");
  331. prev.css("display", "none");
  332. }
  333. next.click(function() {
  334. if(!obj.is(":animated")) {
  335. if(num < childcount) {
  336. tapnum++;
  337. prev.css("display", "block");
  338. if(tapnum == childcount - show) {
  339. next.css("display", "none");
  340. }
  341. num++;
  342. obj.animate({
  343. left: "-=212px"
  344. }, 600);
  345. }
  346. }
  347. });
  348. prev.click(function() {
  349. if(!obj.is(":animated")) {
  350. if(num > inde) {
  351. tapnum--;
  352. next.css("display", "block");
  353. if(tapnum == 0) {
  354. prev.css("display", "none");
  355. }
  356. num--;
  357. obj.animate({
  358. left: "+=212px"
  359. }, 600);
  360. }
  361. }
  362. });
  363. }
  364. //评价字数限制
  365. //字数限制函数
  366. function limitTextCountFn(TextAreaId, countContainerId, count) {
  367. var curLength = $(TextAreaId).val().length;
  368. if(curLength > count) {
  369. var num = $(TextAreaId).val().substr(0, count);
  370. $(TextAreaId).val(num);
  371. } else {
  372. $(countContainerId).text(count - $(TextAreaId).val().length);
  373. }
  374. };
  375. //咨询申请主题字数限制函数
  376. function titleLimitFontCountFn() {
  377. var curLength = $("#consultTitle").val().length;
  378. if(curLength > 20) {
  379. var num = $("#consultTitle").val().substr(0, 20);
  380. $("#consultTitle").val(num);
  381. }
  382. };
  383. /*下拉select选择js */
  384. function seleCo(obj){
  385. var sleTd=$(obj).val();
  386. if(sleTd==0){
  387. $(obj).css("color","#999");
  388. }else{
  389. $(obj).css("color","#666");
  390. }
  391. }
  392. //咨询 专家信息接口函数
  393. function concultProInfo(professorId) {
  394. $.ajax({
  395. url: "/ajax/professor/editBaseInfo/" + professorId,
  396. type: "get",
  397. data: {
  398. "id": professorId
  399. },
  400. contentType: "application/x-www-form-urlencoded",
  401. success: function(response) {
  402. //console.log(response);
  403. var myData = response["data"];
  404. $("#professorName").html(myData["name"]);
  405. if(myData["title"]) {
  406. $("#professorTitle").html(myData["title"] + ' ');
  407. }
  408. if(myData["department"]) {
  409. $("#profDepartment").html(myData["department"] + ' ');
  410. }
  411. if(myData["orgName"]) {
  412. $("#profOrganization").html(myData["orgName"] + ' ');
  413. }
  414. if(myData["address"]) {
  415. $("#profAdress").html(myData["address"]);
  416. }
  417. console.log(myData["consultCount"])
  418. if(!myData["consultCount"]) {
  419. $("#starLevel").hide();
  420. }
  421. $("#byConsultConut").html(myData["consultCount"]);
  422. $("#sendConsultBtn").attr("proId", myData["id"]);
  423. //星级
  424. var startConut = parseInt(myData["starLevel"]);
  425. if(myData["consultCount"]) {
  426. if(!startConut) {
  427. $(".evastarbox2").hide();
  428. }
  429. }
  430. for(var i = 0; i < startConut; i++) {
  431. $("#starLevel .evastar2").eq(i).addClass("addStar");
  432. }
  433. //认证
  434. var oSty = autho(myData.authType, myData.orgAuth, myData.authStatus);
  435. $("#proModifyN").addClass(oSty.sty);
  436. $("#proModifyN").attr("title", oSty.title);
  437. //头像
  438. if(myData["hasHeadImage"] == 0) {
  439. $("#prohead").attr("src", "images/default-photo.jpg");
  440. } else {
  441. $("#prohead").attr("src", "images/head/" + myData["id"] + "_l.jpg");
  442. }
  443. },
  444. error: function(error) {
  445. $.MsgBox.Alert("message", "请求数据失败");
  446. }
  447. });
  448. };
  449. //发送咨询
  450. function sendConsultHandler(professorId) {
  451. var professorId = professorId;
  452. var consult_type = $(".clicknow").text(); //咨询类型
  453. var consult_title = $("#consultTitle").val(); //咨询主题
  454. var consult_content = $("#consultcontent").val(); //咨询内容
  455. var consultStr = {
  456. "consultType": consult_type,
  457. "consultTitle": consult_title,
  458. "consultContant": consult_content,
  459. "professorId": professorId,
  460. "consultantId": userid
  461. };
  462. if(consult_type == '' || consult_title == '' || consult_content == '') {
  463. $.MsgBox.Alert("消息提醒", "请填写完整");
  464. };
  465. if(consult_type == '') {
  466. $.MsgBox.Alert("消息提醒", "请选择联系目的");
  467. }
  468. if(consult_title == '') {
  469. $.MsgBox.Alert("消息提醒", "请填写咨询目的");
  470. }
  471. if(consult_content == '') {
  472. $.MsgBox.Alert("消息提醒", "请填写咨询内容");
  473. }
  474. if(userid && userid != null && userid != "null" && consult_type != '' &&
  475. consult_title != '' && consult_content != ''
  476. ) {
  477. $.ajax({
  478. "url": "/ajax/consult",
  479. "type": "post",
  480. //传值:咨询类型、主题、内容、专家id、申请人id
  481. "data": consultStr,
  482. "contentType": "application/x-www-form-urlencoded",
  483. "dataType": "json",
  484. "success": function(response) {
  485. console.log(response);
  486. },
  487. "error": function() {
  488. $.MsgBox.Alert("消息提醒", "咨询申请失败");
  489. },
  490. "complete": function() {
  491. //$(".consultapply").remove();
  492. $(".blackcover").remove();
  493. $("body").css("position", "");
  494. $.MsgBox.Alert("消息提醒", "咨询申请成功");
  495. $("#mb_msgicon").css("background", 'url("images/sign_icon_chenggong_nor.png") 0% 0% / contain');
  496. },
  497. });
  498. }
  499. };
  500. /*标志*/
  501. function autho() {
  502. if(arguments[0] == 1) {
  503. return {
  504. "sty": "authicon-pro",
  505. "title": "科袖认证专家"
  506. }
  507. } else {
  508. if(arguments[1] == 1) {
  509. return {
  510. "sty": "authicon-staff-ok",
  511. "title": "企业认证员工"
  512. }
  513. } else {
  514. if(arguments[2] == 3) {
  515. return {
  516. "sty": "authicon-real",
  517. "title": "实名认证用户"
  518. }
  519. } else {
  520. return {
  521. "sty": "e",
  522. "title": " "
  523. }
  524. }
  525. }
  526. }
  527. }
  528. //时间显示规则
  529. function commenTime(startTime) {
  530. var nowTimg = new Date();
  531. var startdate = new Date();
  532. startdate.setFullYear(parseInt(startTime.substring(0, 4)));
  533. startdate.setMonth(parseInt(startTime.substring(4, 6)) - 1);
  534. startdate.setDate(parseInt(startTime.substring(6, 8)));
  535. startdate.setHours(parseInt(startTime.substring(8, 10)));
  536. startdate.setMinutes(parseInt(startTime.substring(10, 12)));
  537. startdate.setSeconds(parseInt(startTime.substring(12, 14)));
  538. var date3 = nowTimg.getTime() - startdate.getTime(); //时间差的毫秒数
  539. var hours = parseInt((date3 % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
  540. var minutes = parseInt((date3 % (1000 * 60 * 60)) / (1000 * 60));
  541. if(date3 < 60000) {
  542. return "刚刚";
  543. } else if(date3 >= 60000 && date3 < 3600000) {
  544. return minutes + "分钟前";
  545. } else if(date3 >= 3600000 && date3 < 86400000) {
  546. return hours + "小时前";
  547. } else if(date3 >= 86400000) {
  548. if(nowTimg.getFullYear() == startTime.substring(0, 4)) {
  549. return startTime.substring(4, 6).replace(/\b(0+)/gi, "") + "月" + startTime.substring(6, 8).replace(/\b(0+)/gi, "") + "日 " + startTime.substring(8, 10) + ":" + startTime.substring(10, 12);
  550. } else {
  551. return startTime.substring(0, 4) + "年" + startTime.substring(4, 6).replace(/\b(0+)/gi, "") + "月" + startTime.substring(6, 8).replace(/\b(0+)/gi, "") + "日 " + startTime.substring(8, 10) + ":" + startTime.substring(10, 12);
  552. }
  553. }
  554. }
  555. /*时间转换*/
  556. function TimeTr(dealtime) {
  557. var myDate = new Date();
  558. var s = dealtime;
  559. var y = s.substr(0, 4);
  560. var m = s.substr(4, 2);
  561. var d = s.substr(6, 2);
  562. var h = s.substr(8, 2);
  563. var minute = s.substr(10, 2);
  564. var formatTime;
  565. if(s.length <= 6) {
  566. formatTime = y + "年" + m.replace(/\b(0+)/gi, "") + "月";
  567. } else if(s.length > 6 && s.length <= 8) {
  568. formatTime = m.replace(/\b(0+)/gi, "") + "月" + d.replace(/\b(0+)/gi, "") + "日 ";
  569. if(y != myDate.getFullYear()) {
  570. formatTime = y + "年" + m.replace(/\b(0+)/gi, "") + "月" + d.replace(/\b(0+)/gi, "") + "日 ";
  571. }
  572. } else {
  573. formatTime = m.replace(/\b(0+)/gi, "") + "月" + d.replace(/\b(0+)/gi, "") + "日 " + h + ":" + minute;
  574. if(y != myDate.getFullYear()) {
  575. formatTime = y + "年" + m.replace(/\b(0+)/gi, "") + "月" + d.replace(/\b(0+)/gi, "") + "日 " + h + ":" + minute;
  576. }
  577. }
  578. return formatTime;
  579. }
  580. /*判断是否收藏资源文章或者是否关注专家*/
  581. function ifcollectionAbout(watchObject, sel,num) {
  582. var that=sel;
  583. $.ajax('/ajax/watch/hasWatch', {
  584. data: {
  585. "professorId": userid,
  586. "watchObject": watchObject
  587. },
  588. dataType: 'json', //数据格式类型
  589. type: 'get', //http请求类型
  590. timeout: 10000,
  591. async: false,
  592. success: function(data) {
  593. if(data.success && data.data != null) {
  594. if(num == "1" || num == "6") { //已关注专家
  595. $(that).addClass("attenedSpan");
  596. $(that).text("已关注");
  597. } else { //已收藏资源或文章
  598. $(that).removeClass("icon-collect");
  599. $(that).addClass("icon-collected");
  600. }
  601. } else {
  602. if(num == "1" || num == "6") { //关注专家
  603. $(that).removeClass("attenedSpan");
  604. $(that).text("关注");
  605. } else { //收藏资源或文章
  606. $(that).addClass("icon-collect");
  607. $(that).removeClass("icon-collected");//
  608. }
  609. }
  610. },
  611. error: function(data) {
  612. $.MsgBox.Alert('提示', "服务器链接超时");
  613. }
  614. });
  615. }
  616. /*收藏资源、文章或者关注专家*/
  617. function collectionAbout(watchObject,sel, num) {
  618. var that=sel;
  619. $.ajax('/ajax/watch', {
  620. data: {
  621. "professorId": userid,
  622. "watchObject": watchObject,
  623. "watchType": num,
  624. "uname":$.cookie("userName")
  625. },
  626. dataType: 'json', //数据格式类型
  627. type: 'POST', //http请求类型
  628. timeout: 10000,
  629. async: false,
  630. success: function(data) {
  631. if(data.success) {
  632. console.log(data)
  633. if(num == "1" || num == "6") {
  634. $(that).addClass("attenedSpan");
  635. $(that).text("已关注");
  636. } else {
  637. $(that).removeClass("icon-collect");
  638. $(that).addClass("icon-collected");
  639. }
  640. }
  641. },
  642. error: function(data) {
  643. $.MsgBox.Alert('提示', "服务器链接超时");
  644. }
  645. });
  646. }
  647. /*取消收藏资源、文章或者取消关注专家*/
  648. function cancelCollectionAbout(watchObject,sel,num) {
  649. var that=sel;
  650. $.ajax({
  651. url: '/ajax/watch/delete',
  652. data: {
  653. professorId: userid,
  654. watchObject: watchObject
  655. },
  656. dataType: 'json', //数据格式类型
  657. type: 'post', //http请求类型
  658. timeout: 10000,
  659. async: true,
  660. success: function(data) {
  661. console.log(data.success)
  662. if(num == "1" || num == "6") { //关注专家
  663. $(that).removeClass("attenedSpan");
  664. $(that).text("关注");
  665. } else { //收藏资源或文章
  666. $(that).addClass("icon-collect");
  667. $(that).removeClass("icon-collected");
  668. }
  669. },
  670. error: function(data) {
  671. $.MsgBox.Alert('提示', "服务器链接超时");
  672. }
  673. });
  674. }
  675. //企业规模
  676. var orgSizeShow = {
  677. '1': '50人以内',
  678. '2': '50-100人',
  679. '3': '100-200人',
  680. '4': '200-500人',
  681. '5': '500-1000人',
  682. '6': '1000人以上'
  683. }
  684. //企业类型
  685. var orgTypeShow = {
  686. "2": "上市企业",
  687. "3": "外资企业",
  688. "4": "合资企业",
  689. "5": "独资企业",
  690. "6": "个体经营",
  691. "7": "政府机构",
  692. "8": "公益组织",
  693. "9": "协会学会",
  694. "10": "新闻媒体",
  695. "11": "教育机构",
  696. "undefined":""
  697. }
  698. //学位
  699. var eduDegree = {
  700. "1": "博士",
  701. "2": "硕士",
  702. "3": "学士",
  703. "4": "大专",
  704. "5": "其他"
  705. }
  706. //栏目
  707. var columnType = {
  708. "1":{
  709. fullName:"个人原创",
  710. shortName:"原创"
  711. },
  712. "2":{
  713. fullName:"企业原创",
  714. shortName:"原创"
  715. },
  716. "3":{
  717. fullName:"科研",
  718. shortName:"科研"
  719. },
  720. "4":{
  721. fullName:"智库",
  722. shortName:"智库"
  723. },
  724. "5":{
  725. fullName:"检测",
  726. shortName:"检测"
  727. },
  728. "6":{
  729. fullName:"会议",
  730. shortName:"会议"
  731. },
  732. "7":{
  733. fullName:"企业",
  734. shortName:"企业"
  735. },
  736. "8":{
  737. fullName:"招聘",
  738. shortName:"招聘"
  739. },
  740. "9":{
  741. fullName:"新闻",
  742. shortName:"新闻"
  743. },
  744. "10":{
  745. fullName:"问答",
  746. shortName:"问答"
  747. }
  748. }
  749. //需求的费用预算
  750. var demandCost = {
  751. '1': '1万元以内',
  752. '2': '1-5万元',
  753. '3': '5-10万元',
  754. '4': '10-20万元',
  755. '5': '20-50万元',
  756. '6': '50万元以上'
  757. }
  758. //需求的预期时长
  759. var demandDuration = {
  760. '1': '1个月内',
  761. '2': '1-3个月',
  762. '3': '3-6个月',
  763. '4': '6-12个月',
  764. '5': '1年以上'
  765. }
  766. //反馈意见成功
  767. function backSuccessed(){
  768. $(".correctCon").val("");
  769. $(".correctSubmit").attr("disabled",true);
  770. $(".correctSubmit").parents(".correctBlock").fadeOut();
  771. $.MsgBox.Alert('提示', '感谢您的反馈,我们马上处理。');
  772. $("#mb_msgicon").css("background", 'url("images/sign_icon_chenggong_nor.png") 0% 0% / contain');
  773. }
  774. function suImg() {
  775. $("#mb_msgicon").css("background", 'url("/images/sign_icon_chenggong_nor.png") 0% 0% / contain');
  776. $("#mb_ico").css("background",'url(/images/sign_icon_guanbi_nor.png) center center no-repeat');
  777. }
  778. function hotKey(sel, num) {
  779. $(sel).bind({
  780. paste: function(e) {
  781. var pastedText;
  782. if (window.clipboardData  &&  window.clipboardData.getData)  {  // IE
  783. pastedText  = $(this).val() +  window.clipboardData.getData('Text');          
  784. else  {            
  785. pastedText  = $(this).val() +  e.originalEvent.clipboardData.getData('Text'); //e.clipboardData.getData('text/plain');
  786. }
  787. $(this).val(pastedText);
  788. var $this = $(this);
  789. setTimeout(function() {
  790. if($this.val().trim()) {
  791. $this.siblings("button").show();
  792. } else {
  793. $this.siblings("button").hide();
  794. }
  795. }, 1);
  796. e.preventDefault();
  797. },
  798. cut: function(e) {
  799. var $this = $(this);
  800. setTimeout(function() {
  801. if($this.val().trim()) {
  802. $this.siblings("button").show();
  803. } else {
  804. $this.siblings("button").hide();
  805. }
  806. }, 1);
  807. },
  808. blur: function() {
  809. var $this = $(this);
  810. setTimeout(function() {
  811. $this.siblings(".keydrop").hide();
  812. }, 500)
  813. },
  814. focus: function() {
  815. $(this).siblings(".keydrop").show();
  816. },
  817. keyup: function(e) {
  818. var ti=$(this).val();
  819. var $t=this;
  820. $t.comr=ti;
  821. var $this=$(this);
  822. if($(this).val().trim()) {
  823. $(this).siblings("button").show();
  824. var lNum = $.trim($(this).val()).length;
  825. if(0 < lNum) {
  826. setTimeout(function(){
  827. if( ti===$t.comr && ti!== $t.comrEnd) {
  828. var tt=ti;
  829. $t.comrEnd=tt;
  830. $("#addKeyword").show();
  831. $.ajax({
  832. "url": "/ajax/dataDict/qaHotKey",
  833. "type": "GET",
  834. "success": function(data) {
  835. console.log(data);
  836. if(data.success) {
  837. if($t.comrEnd==tt) {
  838. if(data.data.length == 0) {
  839. $this.siblings(".keydrop").addClass("displayNone");
  840. $this.siblings(".keydrop").find("ul").html("");
  841. } else {
  842. $this.siblings(".keydrop").removeClass("displayNone");
  843. var oSr = "";
  844. for(var i = 0; i < Math.min(data.data.length,5); i++) {
  845. oSr += '<li>' + data.data[i].caption + '<div class="closeThis"></div></li>';
  846. }
  847. $this.siblings(".keydrop").find("ul").html(oSr);
  848. }
  849. }
  850. } else {
  851. $this.siblings(".keydrop").addClass("displayNone");
  852. $this.siblings(".keydrop").find("ul").html("");
  853. }
  854. },
  855. "data": {
  856. "key": $this.val()
  857. },
  858. dataType: "json",
  859. 'error': function() {
  860. $.MsgBox.Alert('提示', '服务器连接超时!');
  861. }
  862. });
  863. }
  864. },500);
  865. }
  866. } else {
  867. $(this).siblings("button").hide();
  868. $(this).siblings(".keydrop").addClass("displayNone");
  869. $(this).siblings(".keydrop").find("ul").html("");
  870. }
  871. }
  872. })
  873. $(".keydrop").on("click", "li", function() {
  874. var oValue = $(this).text();
  875. var oJudge = $(this).parents(".col-w-12").siblings().find("ul.ulspace li");
  876. var addNum = $(this).parents(".keydrop").siblings("input").attr("data-num");
  877. for(var i = 0; i < oJudge.length; i++) {
  878. if(oValue == oJudge[i].innerText) {
  879. $.MsgBox.Alert('提示', '添加内容不能重复');
  880. return;
  881. }
  882. }
  883. $(this).parents(".col-w-12").siblings().find("ul.ulspace").append('<li>' + oValue + '<div class="closeThis"></div></li>');
  884. $(this).parents(".keydrop").siblings("input").val("");
  885. $(this).parents(".keydrop").siblings("button").hide();
  886. if(oJudge.length == addNum - 1) {
  887. $(this).parents(".keydrop").siblings("input").val("");
  888. $(this).parents(".col-w-12").hide();
  889. }
  890. $(this).parent("ul").html("")
  891. })
  892. if(num == 1) {
  893. return;
  894. } else {
  895. /*添加*/
  896. $(".addButton").siblings("input").keypress(function(){
  897. var e = event || window.event;
  898. if(e.keyCode == 13) {
  899. var oValue = $(this).val().trim();
  900. var oJudge = $(this).parent().siblings().find("ul.ulspace li");
  901. var addContent = $(this).attr("data-pro");
  902. var addNum = $(this).attr("data-num");
  903. var addfontSizeNum = $(this).attr("data-fontSizeN");
  904. if(!oValue) {
  905. $.MsgBox.Alert('提示', '请先填写内容');
  906. return;
  907. }
  908. if(oValue.length > addfontSizeNum) {
  909. $.MsgBox.Alert('提示', addContent);
  910. return;
  911. }
  912. for(var i = 0; i < oJudge.length; i++) {
  913. if(oValue == oJudge[i].innerText) {
  914. $.MsgBox.Alert('提示', '添加内容不能重复');
  915. return;
  916. }
  917. }
  918. $(this).parent().siblings().find("ul.ulspace").append('<li>' + oValue + '<div class="closeThis"></div></li>');
  919. $(this).siblings(".addButton").hide();
  920. $(this).val("");
  921. if(oJudge.length == addNum - 1) {
  922. $(this).val("").parents(".col-w-12").hide();
  923. }
  924. $(this).siblings(".keydrop").find("ul").html("");
  925. }
  926. })
  927. $(".addButton").click(function() {
  928. var oValue = $(this).siblings("input").val().trim();
  929. var oJudge = $(this).parent().siblings().find("ul.ulspace li");
  930. var addContent = $(this).siblings("input").attr("data-pro");
  931. var addNum = $(this).siblings("input").attr("data-num");
  932. var addfontSizeNum = $(this).siblings("input").attr("data-fontSizeN");
  933. if(!oValue) {
  934. $.MsgBox.Alert('提示', '请先填写内容');
  935. return;
  936. }
  937. if(oValue.length > addfontSizeNum) {
  938. $.MsgBox.Alert('提示', addContent);
  939. return;
  940. }
  941. for(var i = 0; i < oJudge.length; i++) {
  942. if(oValue == oJudge[i].innerText) {
  943. $.MsgBox.Alert('提示', '添加内容不能重复');
  944. return;
  945. }
  946. }
  947. $(this).parent().siblings().find("ul.ulspace").append('<li>' + oValue + '<div class="closeThis"></div></li>');
  948. $(this).hide();
  949. $(this).siblings("input").val("");
  950. if(oJudge.length == addNum - 1) {
  951. $(this).val("").parents(".col-w-12").hide();
  952. }
  953. $(this).siblings(".keydrop").find("ul").html("");
  954. })
  955. }
  956. }
  957. //带有限制字数的多行文本框
  958. function limitObj(obj,maxNum){
  959. $(obj).bind({
  960. paste: function(e) {
  961. if($(this).val().length==""){
  962. $(this).parent().siblings(".btnModel").attr("disabled", true);
  963. }else{
  964. $(this).parent().siblings(".btnModel").attr("disabled", false);
  965. }
  966. var pastedText;
  967. if (window.clipboardData  &&  window.clipboardData.getData)  {  // IE
  968. pastedText  = $(this).val() +  window.clipboardData.getData('Text');          
  969. else  {            
  970. pastedText  = $(this).val() +  e.originalEvent.clipboardData.getData('Text'); //e.clipboardData.getData('text/plain');
  971. }
  972. $(this).val(pastedText);
  973. setTimeout(function() {
  974. $(this).siblings().find("em").text($(obj).val().length);
  975. }, 1);
  976. e.preventDefault();
  977. },
  978. cut: function(e) {
  979. if($(this).val().length==""){
  980. $(this).parent().siblings(".btnModel").attr("disabled", true);
  981. }else{
  982. $(this).parent().siblings(".btnModel").attr("disabled", false);
  983. }
  984. setTimeout(function() {
  985. $(obj).siblings().find("em").text($(obj).val().length);
  986. }, 1);
  987. },
  988. keyup: function(e) {
  989. if($(this).val().length==""){
  990. $(this).parent().siblings(".btnModel").attr("disabled", true);
  991. }else{
  992. $(this).parent().siblings(".btnModel").attr("disabled", false);
  993. }
  994. if($(this).val().length > maxNum) {
  995. $(obj).val($(obj).val().substring(0, maxNum));
  996. e.preventDefault();
  997. }
  998. setTimeout(function() {
  999. $(obj).siblings().find("em").text($(obj).val().length);
  1000. }, 1);
  1001. }
  1002. });
  1003. }
  1004. var r64 = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "-", "_"];
  1005. var d64 = {
  1006. "0": 0,
  1007. "1": 1,
  1008. "2": 2,
  1009. "3": 3,
  1010. "4": 4,
  1011. "5": 5,
  1012. "6": 6,
  1013. "7": 7,
  1014. "8": 8,
  1015. "9": 9,
  1016. "A": 10,
  1017. "B": 11,
  1018. "C": 12,
  1019. "D": 13,
  1020. "E": 14,
  1021. "F": 15,
  1022. "G": 16,
  1023. "H": 17,
  1024. "I": 18,
  1025. "J": 19,
  1026. "K": 20,
  1027. "L": 21,
  1028. "M": 22,
  1029. "N": 23,
  1030. "O": 24,
  1031. "P": 25,
  1032. "Q": 26,
  1033. "R": 27,
  1034. "S": 28,
  1035. "T": 29,
  1036. "U": 30,
  1037. "V": 31,
  1038. "W": 32,
  1039. "X": 33,
  1040. "Y": 34,
  1041. "Z": 35,
  1042. "a": 36,
  1043. "b": 37,
  1044. "c": 38,
  1045. "d": 39,
  1046. "e": 40,
  1047. "f": 41,
  1048. "g": 42,
  1049. "h": 43,
  1050. "i": 44,
  1051. "j": 45,
  1052. "k": 46,
  1053. "l": 47,
  1054. "m": 48,
  1055. "n": 49,
  1056. "o": 50,
  1057. "p": 51,
  1058. "q": 52,
  1059. "r": 53,
  1060. "s": 54,
  1061. "t": 55,
  1062. "u": 56,
  1063. "v": 57,
  1064. "w": 58,
  1065. "x": 59,
  1066. "y": 60,
  1067. "z": 61,
  1068. "-": 62,
  1069. "_": 63
  1070. };
  1071. function s16to64(s) {
  1072. var out, idx, n1, n2, n3;
  1073. idx = s.length - 1;
  1074. out = "";
  1075. while(idx >= 0) {
  1076. n1 = d64[s.charAt(idx--)];
  1077. if(idx < 0) {
  1078. out = r64[n1] + out;
  1079. break;
  1080. }
  1081. n2 = d64[s.charAt(idx--)];
  1082. if(idx < 0) {
  1083. out = r64[(n2 >>> 2)] + r64[((n2 & 0x3) << 4) + n1] + out;
  1084. break;
  1085. }
  1086. n3 = d64[s.charAt(idx--)];
  1087. out = r64[(n2 >>> 2) + (n3 << 2)] + r64[((n2 & 0x3) << 4) + n1] + out;
  1088. }
  1089. return out;
  1090. }
  1091. function s64to16(s) {
  1092. var out, idx, n1, n2;
  1093. idx = s.length - 1;
  1094. out = "";
  1095. while(idx >= 0) {
  1096. n1 = d64[s.charAt(idx--)];
  1097. if(idx < 0) {
  1098. out = r64[n1 >>> 4] + r64[n1 & 0xF] + out;
  1099. break;
  1100. }
  1101. n2 = d64[s.charAt(idx--)];
  1102. out = r64[(n2 >>> 2)] + r64[(n1 >>> 4) + ((n2 & 0x3) << 2)] + r64[n1 & 0xF] + out;
  1103. }
  1104. if(out.length>32) {
  1105. return out.substring(1);
  1106. }
  1107. return out;
  1108. }
  1109. //发现上方轮播
  1110. var bannerRotate = {// banner rotating
  1111. _time: 3000,
  1112. _i: 0,
  1113. _interval: null,
  1114. _navId: "#slide-tab",
  1115. _navBox: "#slide-list",
  1116. bannerShow: function() {
  1117. $(this._navId).find("li").removeClass("slide-tab-item-active");
  1118. $(this._navId).find("li:eq("+this._i+")").addClass("slide-tab-item-active");
  1119. $(this._navBox).find("li").removeClass("slide-item-active");
  1120. $(this._navBox).find("li:eq("+this._i+")").addClass("slide-item-active");
  1121. },
  1122. bannerStart:function() {
  1123. var _this = this;
  1124. _this._interval = setInterval(function() {
  1125. if(_this._i >= 4) {
  1126. _this._i = 0;
  1127. }
  1128. else {
  1129. _this._i++;
  1130. }
  1131. _this.bannerShow();
  1132. }, _this._time);
  1133. },
  1134. bannerInit: function() {
  1135. var _this = this;
  1136. _this.bannerStart();
  1137. $(_this._navId).find("li").bind("mouseover", function() {
  1138. clearInterval(_this._interval);
  1139. _this._i = $(this).index();
  1140. _this.bannerShow();
  1141. _this.bannerStart();
  1142. });
  1143. }
  1144. };
  1145. var currentdate;
  1146. function getNowFormatDate(num) {
  1147. var date = new Date();
  1148. var seperator1 = "-";
  1149. var seperator2 = ":";
  1150. var month = date.getMonth() + 1;
  1151. var strDate = date.getDate();
  1152. var getHours = date.getHours();
  1153. var getMinutes = date.getMinutes();
  1154. if (month >= 1 && month <= 9) {
  1155. month = "0" + month;
  1156. }
  1157. if (strDate >= 0 && strDate <= 9) {
  1158. strDate = "0" + strDate;
  1159. }
  1160. if (getMinutes >= 0 && getMinutes <= 9) {
  1161. getMinutes = "0" + getMinutes;
  1162. }
  1163. if (getHours >= 0 && getHours <= 9) {
  1164. getHours = "0" + getHours;
  1165. }
  1166. var currentdate = date.getFullYear() + seperator1 + month + seperator1 + strDate
  1167. + " " + getHours + seperator2 + getMinutes
  1168. if(num==1){
  1169. currentdate = date.getFullYear() + seperator1 + month + seperator1 + strDate
  1170. }
  1171. return currentdate;
  1172. }
  1173. function wlog(dt, id, src) {
  1174. var src = src || "1";
  1175. var $img=$("<img src='"+wlogurl+"/log/img?__lt="+dt+"&src="+src+"&id="+id+"&_t="+(new Date().getTime())+"' style='display:none;' ></img>");
  1176. $img.appendTo($("body"));
  1177. setTimeout(function(){
  1178. $img.remove();
  1179. },5000);
  1180. // $.ajax({
  1181. // url: "http://www.ekexiu.com:8082/log/jsonp/log",
  1182. // data: {
  1183. // "id": id,
  1184. // "src": src,
  1185. // "__lt": dt,
  1186. // },
  1187. // success:function(data) {
  1188. // },
  1189. // dataType: "jsonp"
  1190. // });
  1191. }
  1192. //广告相关操作
  1193. function addscript(that){
  1194. var script=document.createElement("script");
  1195. script.setAttribute("type", "text/javascript");
  1196. var srclink= "https://www.ekexiu.com/data/inc/ad/"+ that +".js?r=" + new Date().getTime();
  1197. script.setAttribute("src", srclink);
  1198. var heads = document.getElementsByTagName("head");
  1199. if(heads.length){
  1200. heads[0].appendChild(script);
  1201. }else{
  1202. document.documentElement.appendChild(script);
  1203. }
  1204. }
  1205. $(document).ready(function(){
  1206. //处理点击事件,需要打开原生浏览器
  1207. $("body").on("click","a.advertsub",function(){
  1208. var adId = this.getAttribute('data-id');
  1209. console.log(adId)
  1210. wlog("ad", adId ,"1");
  1211. return true;
  1212. })
  1213. })
  1214. function adScroll(){
  1215. //不随滚动条滚动的固定层广告代码
  1216. function thisS() {
  1217. var scrollHeight = $(document).height();
  1218. var windowHeight = $(window).innerHeight();
  1219. var footerHeight = $("footer").outerHeight(true);
  1220. var containH = $("#container").outerHeight(true)-footerHeight
  1221. var scroTop = $(window).scrollTop();
  1222. (scroTop+offTop-120) < containH ? (scroTop > offTop ?
  1223. (scroObj.attr('class',"div1 div2"), c && (scroObj.style.top = scroTop - offTop + "px")) :scroObj.attr('class',"div1")):
  1224. (scroObj.attr('class',"div1 div3"),scroObj.css("bottom",windowHeight + scroTop + footerHeight+ 10 - scrollHeight))
  1225. console.log("***"+(scroTop+offTop-120))
  1226. }
  1227. var scroObj = $("#scroll-fixed-ad");
  1228. var offTop=scroObj.offset().top + 40;
  1229. if(scroObj == undefined) return !1;
  1230. var c;
  1231. c = window.ActiveXObject && !window.XMLHttpRequest;
  1232. if(!c || !0) window.onscroll =function(){
  1233. var d;
  1234. if(d) return;
  1235. d = setTimeout(function() {
  1236. thisS.call(this), d = undefined
  1237. }, 150)
  1238. }
  1239. }