portal html css js resource

common.js 35KB

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