1/** 2 * é对bannerè½®æå¾æ¸²ææ°æ®å®æåï¼å è½½é¨åæ ·å¼ 3 * @returns 4 */ 5app.directive('finishBanner',function(){ 6 return { 7 link: function(scope,element,attr){ 8 if(scope.$last == true){ 9 //$emitè°ç¨ç¶çº§Controllerå çæ¹æ³,$broadcastä¸$emitç¸å 10 //scope.$emit('repeatFinishCallback'); 11 setTimeout(function() { 12 if ($(".banner").length > 0) { 13 $('.banner').owlCarousel({ 14 items: 1, 15 itemsDesktop: [1200, 1], 16 itemsDesktopSmall: [992, 1], 17 itemsTablet: [768, 1], 18 itemsTabletSmall: [450, 1], 19 itemsMobile: [360, 1], 20 navigation: false, 21 pagination:true, 22 navigationText: ["", ""], 23 autoPlay: true, 24 }); 25 } 26 }, 100); 27 } 28 } 29 } 30}) 31 32 33//è·åæ°æ®åå ¸å 容 -- ç¹æ®éè¦å¤ç 34app.controller('j-data-dict1', function($scope, $http) { 35 var dataKey = $('.j-data-dict1').attr("type"); 36 if(isNull(dataKey)){ 37 dataKey = ""; 38 } 39 if(!isNull(dataKey)){ 40 $http({ 41 method:'post', 42 url:local_host +"public/datadict", 43 params:{'publisherId':$("#publisherId").val(),'datadictCode':dataKey} 44 }).then(function(response){ 45 //æåæ¶æ§è¡ 46 if(response.data.result == 'success'){ 47 var dataDict = response.data.data; 48 var valArr = dataDict.busVal.split(","); 49 dataDict.busValArr = valArr; 50 $scope.dataDict = dataDict; 51 }else{ 52 console.log(response.data.message); 53 } 54 },function(response){ 55 //å¤±è´¥æ¶æ§è¡ 56 console.log(response.data.message); 57 }); 58 } 59}); 60//çç¹èç¦ æ¨èæç« -éå¶æ¡æ°5ï¼é¡µé¢åå¨ä¸¤ä¸ªä¸å模åççç¹æç« æ¶å¯ç¨ 61app.controller('j-hot-article-limit2', function($scope, $http, $timeout) { 62 var limit = ''; 63 var type = ''; 64 if($('.j-hot-article-limit2').length > 0){ 65 limit = $('.j-hot-article-limit2').attr("data"); 66 type = $('.j-hot-article-limit2').attr("type"); 67 } 68 $http({ 69 method:'post', 70 url:local_host +"data/article/top-hot-data", 71 params:{'publisherId':$('#publisherId').val(),'limit':limit,'hotQueryName':type} 72 }).then(function(response){ 73 //æåæ¶æ§è¡ 74 if(response.data.result == 'success'){ 75 $scope.articles_limit = response.data.data; 76// $timeout(function(){ 77// $rootScope.showCitedByCount($scope.articles_limit); 78// },50) 79 //æ¯å¦éè¦è·åæ½å¼æç®æ°é 80 $timeout(function(){ 81 loadPlugins($scope.articles_limit); 82 },100); 83 $('.loading-show').hide(); 84 }else{ 85 console.log(response.data.message); 86 } 87 },function(response){ 88 //å¤±è´¥æ¶æ§è¡ 89 console.log(response.data.message); 90 }); 91// $scope.showCitedByCount = function(){ 92// var _articles = []; 93// for(var i=0;i<$scope.articles_limit.length;i++){ 94// var _tempArticle = $scope.articles_limit[i]; 95// _tempArticle.citedCount = 10; 96// _articles.push(_tempArticle); 97// } 98// $scope.articles_limit = _articles; 99// } 100}); 101 102/*NEWS info */ 103app.directive('finishNewsinfo',function(){ 104 return { 105 link: function(scope,element,attr){ 106 if(scope.$index %2 != 0){ 107 $(".infobtmwrap .infobtm:last-child").after("<p style='clear:both;width:100%;'></p>").addClass("float-r"); 108 } 109 } 110 } 111}) 112/*News info more*/ 113app.directive('finishInfomore',function(){ 114 return { 115 link: function(scope,element,attr){ 116 if(scope.$index %2 != 0){ 117 $(".inforepeat .infomore:last-child").after("<p style='clear:both;width:100%;'></p>").addClass("float-r"); 118 } 119 } 120 } 121}) 122 123 124/*ä¸å®¶ */ 125app.directive('finishExpert',function(){ 126 return { 127 link: function(scope,element,attr){ 128 if(scope.$index %2 != 0){ 129 $(".experlist dl:last-child").after("<p style='clear:both;width:100%;'></p>").addClass("float-r"); 130 } 131 } 132 } 133}) 134 135/** 136 * éè¿æ ç®æ¥è¯¢åç§°åæ ç®ï¼ä¸æ¯æ°é»ï¼ 137 * @param $scope 138 * @param $http 139 * @returns 140 */ 141app.controller('j-newscolumn-list-child2', function($scope, $http) { 142 143 var limit = $(".j-newscolumn-list-child2").attr("data"); 144 var abbrs = $(".j-newscolumn-list-child2").attr("type"); 145 $http({ 146 method:'post', 147 url:local_host +"data/news/newscolumn-list-parentAbbrs-data", 148 params:{'publisherId':$('#publisherId').val(),'parentAbbrs':abbrs,'limit':limit} 149 }).then(function(response){ 150 //æåæ¶æ§è¡ 151 if(response.data.result == 'success'){ 152 $scope.newscolumnList = response.data.data; 153 }else{ 154 console.log(response.data.message); 155 } 156 },function(response){ 157 //å¤±è´¥æ¶æ§è¡ 158 console.log(response.data.message); 159 }); 160 161 $scope.showNews = function(ev){ 162 var evParent = $(ev.target).parents(".toolist1"); 163 if(evParent.siblings(".listdrop").length >0){
164 evParent.find(".icodrop").toggleClass("rotate"); 165 evParent.siblings(".listdrop").toggle(); 166 } 167 } 168 169}); 170 171//个人信æ¯é¡µé¢ 172$(function(){ 173 $(".tab-left li").click(function(){ 174 var _index = $(this).index(); 175 $(this).addClass("active").siblings().removeClass("active"); 176 $(".tab-leftcon .tab-leftlist").eq(_index).addClass("active").siblings().removeClass("active"); 177 }) 178}) 179 180//ä¸å©é¡µé¢ 181$(function(){ 182 $("body").on("click",".patit i",function(){ 183 $(this).toggleClass("rotate"); 184 $(this).parent(".patit").siblings(".pacon").toggle(); 185 }) 186 $("body").on("click","i.icos",function(){ 187 var flag = $(this).data('flag'); 188 $(this).text(!flag ? ' - ' : '+').data('flag', !flag); 189 $(this).siblings('.dropdown-menu').toggle(); 190 }) 191}) 192 193app.directive('finishPatent',function(){ 194 return { 195 link: function(scope,element,attr){ 196 setTimeout(function() { 197 $("li.isShow1>i").text(' - '); 198 $("li.isShow1>.dropdown-menu").css("display","block"); 199 }, 100); 200 } 201 } 202}) 203 204 205//ä¸ªäººä¿¡æ¯ 206window.onload = function(){ 207 //个人信æ¯é¡µå·¦å³ä¾§é«åº¦éåº 208 var tempH =$(".user-modify").innerHeight()-20; 209 $(".user-modifyr").css("min-height",tempH); 210 211 // 212 $(".phonefocus input").focus(function(){ 213 $(".identify-code").show(); 214 }) 215} 216$(function(){ 217 //ç©çè¯æ± 218 $(".voca-tabcon li").click(function(){ 219 $(this).addClass("active").siblings().removeClass("active"); 220 }) 221}) 222 223app.controller('j-news-list-condition2', function($scope, $http) { 224 //页é¢ç¬¬ä¸æ¬¡å è½½ 225 setTimeout(function() { 226 $scope.paginationData(0); 227 }); 228 229 $scope.paginationData = function(type) { 230 231 var abbreviation = $('#abbreviation').val(); 232 if(isNull(abbreviation)){ 233 abbreviation = $('#pageViewId').val(); 234 } 235 236 var currentpage = 1; 237 238 var limit = $('#limit').val(); 239 if(isNull(limit)){ 240 limit = 20; 241 } 242 243 //èªå®ä¹æ¡ä»¶æç´¢ 244 var conditionList = new Array(); 245 var condition = {}; 246 var conditionName = $(".conditionName").val(); 247 var conditionJudge = ">="; 248 var date = new Date(); 249 var day = date.getDate(); 250 if(day < 10){ 251 day = "0" + day; 252 } 253 var month = date.getMonth() + 1; 254 if(month < 10){ 255 month = "0" + month; 256 } 257 var conditionValue = date.getFullYear()+"-"+month+"-"+day; 258 var conditionOrderName = $(".conditionOrderName").val(); 259 var conditionOrder = "asc"; 260 261 if(!isNull(conditionName) && !isNull(conditionJudge) && !isNull(conditionValue)){ 262 condition.conditionName = conditionName; 263 condition.conditionJudge = conditionJudge; 264 condition.conditionValue = conditionValue; 265 } 266 if(!isNull(conditionOrderName)){ 267 condition.orderName = conditionOrderName; 268 } 269 if(!isNull(conditionOrder)){ 270 condition.order = conditionOrder; 271 } 272 conditionList.push(condition); 273 274 var currentUrl = window.location.href; 275 var urlArr = currentUrl.split("#"); 276 if(urlArr.length > 1){ 277 var condition2 = {}; 278 if(urlArr[1] == "zhanlan"){ 279 condition2.conditionName = "remark2"; 280 condition2.conditionJudge = "="; 281 condition2.conditionValue = "å±è§"; 282 conditionList.push(condition2); 283 $('.trade-tit').html("å±è§"); 284 $('.past-trade-tit').html("å¾å±å±è§"); 285 }else if(urlArr[1] == "huiyi" || $('#pageViewId').val() == "hangyehuodong"){ 286 condition2.conditionName = "remark2"; 287 condition2.conditionJudge = "!="; 288 condition2.conditionValue = "å±è§"; 289 conditionList.push(condition2); 290 $('.trade-tit').html("ä¼è®®"); 291 $('.past-trade-tit').html("å¾å±ä¼è®®"); 292 } 293 } 294 295 $http({ 296 method:'post', 297 url:local_host +"data/news/news-list-condition-data", 298 params:{'publisherId':$('#publisherId').val(),'abbreviation':abbreviation, 299 'customConditions':JSON.stringify(conditionList), 300 'newsWord':"",'pageNum':currentpage,'limit':limit} 301 }).then(function(response){ 302 //æåæ¶æ§è¡ 303 if(response.data.result == 'success'){ 304 var newsList = new Array(); 305 for(var i = 0;i< response.data.data.data.length;i++){ 306 var news = response.data.data.data[i]; 307 var releaseTime = new Date(news.releaseTime); 308 news.releaseTimeEn = formatDateEn(releaseTime); 309 var monthNum = releaseTime.getMonth() + 1; 310 if(monthNum < 10){ 311 monthNum = "0"+monthNum; 312 } 313 var dayNum = releaseTime.getDate(); 314 if(dayNum < 10){ 315 dayNum = "0"+dayNum; 316 } 317 news.releaseTime = releaseTime.getFullYear() + '-' + monthNum + 318 '-' + dayNum; 319 320 //å½ä¸è¯æ± 321 if(!isNull(news.keyWord)){ 322 news.keyWordArr = news.keyWord.split(","); 323 } 324 newsList.push(news); 325 326 } 327 $scope.newsList = newsList; 328 329 }else{ 330 console.log(response.data.message); 331 } 332 },function(response){ 333 //å¤±è´¥æ¶æ§è¡ 334 console.log(response.data.message); 335 }); 336 } 337 338}); 339 340app.controller('j-news-list-condition3', function($scope, $http) { 341 342 //页é¢ç¬¬ä¸æ¬¡å è½½ 343 setTimeout(function() { 344 $scope.paginationData(0); 345 }); 346 //ç¹å»é¡µç å è½½ 347 $scope.gotopage = function(page) { 348 if(isNull(page)){ 349 $scope.paginationData(1); 350 }else{ 351 $('#pageNum').val(page) 352 $scope.paginationData(0); 353 } 354 } 355 //è¾å ¥é¡µç å è½½ 356 $scope.enterEvent = function (e) { 357 if(loadCommonPagesEnter(e)){ 358 $scope.paginationData(1); 359 } 360 }; 361 362 //enteræç´¢å¯¹åºæ ç®çæ°é» 363 $scope.enterEventSearch = function (e) { 364 var keycode = window.event ? e.keyCode : e.which; 365 if(keycode==13){ 366 if(!isNull($("#newsWord").val())){ 367 $scope.paginationData(0); 368 }else{ 369 if($("#language").val() == "cn"){ 370 alert("请è¾å ¥æ£ç´¢å 容ï¼"); 371 }else{ 372 alert("Please enter the search content!"); 373 } 374 } 375 } 376 }; 377 378 //ç¹å»æç´¢å¯¹åºæ ç®çæ°é» 379 $scope.searchNews = function () { 380 if(!isNull($("#newsWord").val())){ 381 $scope.paginationData(0); 382 }else{ 383 if($("#language").val() == "cn"){ 384 alert("请è¾å ¥æ£ç´¢å 容ï¼"); 385 }else{ 386 alert("Please enter the search content!"); 387 } 388 } 389 }; 390 391 //ç¹å»æç´¢å¯¹åºæ ç¾ 392 $scope.searchTag = function(e) { 393 $(e.target).addClass("showTag").parents(".tag-span").siblings().find("a").removeClass("showTag"); 394 $('#pageNum').val(1); 395 var conditionValue = $(e.target).attr("data"); 396 $('.conditionValue').val(conditionValue); 397 $scope.paginationData(0); 398 } 399 400 $scope.paginationData = function(type) { 401 402 var newsWord = $("#newsWord").val(); 403 if(isNull(newsWord)){ 404 newsWord = ""; 405 } 406 407 var abbreviation = $('#abbreviation').val(); 408 if(isNull(abbreviation)){ 409 abbreviation = $('#pageViewId').val(); 410 } 411 412 var currentpage = ""; 413 if(type == 1){ 414 currentpage = $("input.inputpagenum").val(); 415 }else{ 416 currentpage = $('#pageNum').val(); 417 } 418 var limit = $('#limit').val(); 419 if(isNull(limit)){ 420 limit = 20; 421 } 422 423 //èªå®ä¹æ¡ä»¶æç´¢ 424// var conditionName = "remark1"; 425// var conditionJudge = "="; 426// var conditionValue = $("#videoTag").val(); 427 var conditionList = new Array(); 428 var condition = {}; 429 var conditionName = $(".conditionName").val(); 430 var conditionJudge = $(".conditionJudge").val(); 431 var date = new Date(); 432 var day = date.getDate(); 433 if(day < 10){ 434 day = "0" + day; 435 }
436 var month = date.getMonth() + 1; 437 if(month < 10){ 438 month = "0" + month; 439 } 440 var conditionValue = date.getFullYear()+"-"+month+"-"+day; 441 var conditionOrderName = $(".conditionOrderName").val(); 442 var conditionOrder = $(".conditionOrder").val(); 443 //var conditionValue = "人工æºè½"; 444 if(!isNull(conditionName) && !isNull(conditionJudge) && !isNull(conditionValue)){ 445 condition.conditionName = conditionName; 446 condition.conditionJudge = conditionJudge; 447 condition.conditionValue = conditionValue; 448 } 449 if(!isNull(conditionOrderName)){ 450 condition.orderName = conditionOrderName; 451 } 452 if(!isNull(conditionOrder)){ 453 condition.order = conditionOrder; 454 } 455 conditionList.push(condition); 456 457 var currentUrl = window.location.href; 458 var urlArr = currentUrl.split("#"); 459 if(urlArr.length > 1){ 460 var condition2 = {}; 461 if(urlArr[1] == "zhanlan"){ 462 condition2.conditionName = "remark2"; 463 condition2.conditionJudge = "="; 464 condition2.conditionValue = "å±è§"; 465 conditionList.push(condition2); 466 $('.trade-tit').html("å±è§"); 467 $('.past-trade-tit').html("å¾å±å±è§"); 468 }else if(urlArr[1] == "huiyi" || $('#pageViewId').val() == "hangyehuodong"){ 469 condition2.conditionName = "remark2"; 470 condition2.conditionJudge = "!="; 471 condition2.conditionValue = "å±è§"; 472 conditionList.push(condition2); 473 $('.trade-tit').html("ä¼è®®"); 474 $('.past-trade-tit').html("å¾å±ä¼è®®"); 475 } 476 } 477 478 $http({ 479 method:'post', 480 url:local_host +"data/news/news-list-condition-data", 481 params:{'publisherId':$('#publisherId').val(),'abbreviation':abbreviation, 482 'customConditions':JSON.stringify(conditionList), 483 'newsWord':newsWord,'pageNum':currentpage,'limit':limit} 484 }).then(function(response){ 485 //æåæ¶æ§è¡ 486 if(response.data.result == 'success'){ 487 var newsList = new Array(); 488 for(var i = 0;i< response.data.data.data.length;i++){ 489 var news = response.data.data.data[i]; 490 var releaseTime = new Date(news.releaseTime); 491 news.releaseTimeEn = formatDateEn(releaseTime); 492 var monthNum = releaseTime.getMonth() + 1; 493 if(monthNum < 10){ 494 monthNum = "0"+monthNum; 495 } 496 var dayNum = releaseTime.getDate(); 497 if(dayNum < 10){ 498 dayNum = "0"+dayNum; 499 } 500 news.releaseTime = releaseTime.getFullYear() + '-' + monthNum + 501 '-' + dayNum; 502 503 //å½ä¸è¯æ± 504 if(!isNull(news.keyWord)){ 505 news.keyWordArr = news.keyWord.split(","); 506 } 507 newsList.push(news); 508 } 509 $scope.newsList = newsList; 510 var count = response.data.data.count; 511 var totalpage = Math.ceil(count/limit); 512 $scope.count = count; 513 $scope.totalpage = totalpage; 514 $scope.currentpage = Number(currentpage); 515 $scope.pageList = new Array(); 516 $scope.pageList = loadCommonPages(count,totalpage,currentpage,limit); 517 518 $('#amount').val(count); 519 $('#totalpage').val(totalpage); 520 $('.loading-show').hide(); 521 }else{ 522 console.log(response.data.message); 523 } 524 },function(response){ 525 //å¤±è´¥æ¶æ§è¡ 526 console.log(response.data.message); 527 }); 528 } 529 530}); 531 532/** 533 * é¦é¡µä¼è®®æ¨¡å 534 * @param $scope 535 * @param $http 536 * @returns 537 */ 538app.controller('j-news-list-condition4', function($scope, $http) { 539 var abbreviation = "hyhd1"; 540 var currentpage = 1; 541 var limit = 4; 542 var condition = {}; 543 var conditionName = "remark2"; 544 var conditionJudge = "="; 545 var conditionValue = "ä¼è®®"; 546 var conditionOrderName = "remark1"; 547 var conditionOrder = "desc"; 548 549 var conditionList = new Array(); 550 condition.conditionName = conditionName; 551 condition.conditionJudge = conditionJudge; 552 condition.conditionValue = conditionValue; 553 condition.orderName = conditionOrderName; 554 condition.order = conditionOrder; 555 conditionList.push(condition); 556 557 $http({ 558 method:'post', 559 url:local_host +"data/news/news-list-condition-data", 560 params:{'publisherId':$('#publisherId').val(),'abbreviation':abbreviation, 561 'customConditions':JSON.stringify(conditionList), 562 'newsWord':"",'pageNum':currentpage,'limit':limit} 563 }).then(function(response){ 564 //æåæ¶æ§è¡ 565 if(response.data.result == 'success'){ 566 $scope.newsList = response.data.data.data; 567 }else{ 568 console.log(response.data.message); 569 } 570 },function(response){ 571 //å¤±è´¥æ¶æ§è¡ 572 console.log(response.data.message); 573 }); 574}); 575 576/** 577 * é¦é¡µå±è§æ¨¡å 578 * @param $scope 579 * @param $http 580 * @returns 581 */ 582app.controller('j-news-list-condition5', function($scope, $http) { 583 var abbreviation = "hyhd1"; 584 var currentpage = 1; 585 var limit = 4; 586 var condition = {}; 587 var conditionName = "remark2"; 588 var conditionJudge = "="; 589 var conditionValue = "å±è§"; 590 var conditionOrderName = "remark1"; 591 var conditionOrder = "desc"; 592 593 var conditionList = new Array(); 594 condition.conditionName = conditionName; 595 condition.conditionJudge = conditionJudge; 596 condition.conditionValue = conditionValue; 597 condition.orderName = conditionOrderName; 598 condition.order = conditionOrder; 599 conditionList.push(condition); 600 601 $http({ 602 method:'post', 603 url:local_host +"data/news/news-list-condition-data", 604 params:{'publisherId':$('#publisherId').val(),'abbreviation':abbreviation, 605 'customConditions':JSON.stringify(conditionList), 606 'newsWord':"",'pageNum':currentpage,'limit':limit} 607 }).then(function(response){ 608 //æåæ¶æ§è¡ 609 if(response.data.result == 'success'){ 610 /* var newsList = new Array();
611 for(var i = 0;i< response.data.data.data.length;i++){ 612 var news = response.data.data.data[i]; 613 if(!isNull(news.remark1)){ 614 var timeArr = news.remark1.trim().split("-"); 615 if(timeArr.length == 3){ 616 news.remark1 = timeArr[0]+"å¹´"+timeArr[1]+"æ"+timeArr[2]+"æ¥"; 617 } 618 } 619 newsList.push(news); 620 }*/ 621 $scope.newsList = response.data.data.data; 622 }else{ 623 console.log(response.data.message); 624 } 625 },function(response){ 626 //å¤±è´¥æ¶æ§è¡ 627 console.log(response.data.message); 628 }); 629 630}); 631 632/** 633 * é¦é¡µä¼è®®æ¨¡å 634 * @param $scope 635 * @param $http 636 * @returns 637 */ 638app.controller('j-news-list-condition6', function($scope, $http) { 639 var abbreviation = "jzlb"; 640 var currentpage = 1; 641 var limit = 4; 642 var condition = {}; 643 var conditionOrderName = "remark1"; 644 var conditionOrder = "desc"; 645 646 var conditionList = new Array(); 647 condition.orderName = conditionOrderName; 648 condition.order = conditionOrder; 649 conditionList.push(condition); 650 651 $http({ 652 method:'post', 653 url:local_host +"data/news/news-list-condition-data", 654 params:{'publisherId':$('#publisherId').val(),'abbreviation':abbreviation, 655 'customConditions':JSON.stringify(conditionList), 656 'newsWord':"",'pageNum':currentpage,'limit':limit} 657 }).then(function(response){ 658 //æåæ¶æ§è¡ 659 if(response.data.result == 'success'){ 660 $scope.newsList = response.data.data.data; 661 }else{ 662 console.log(response.data.message); 663 } 664 },function(response){ 665 //å¤±è´¥æ¶æ§è¡ 666 console.log(response.data.message); 667 }); 668}); 669 670app.controller('j-news-list-group1', function($scope, $http) { 671 672 var abbreviation = $('#abbreviation').val(); 673 if(isNull(abbreviation)){ 674 abbreviation = $('#pageViewId').val(); 675 } 676 677 var conditionName = $(".conditionName").val(); 678 var conditionJudge = $(".conditionJudge").val(); 679 var conditionValue = $(".conditionValue").val(); 680 if(isNull(conditionJudge)){ 681 conditionJudge = ""; 682 } 683 if(isNull(conditionValue)){ 684 conditionValue = ""; 685 } 686 if(!isNull(conditionName)){ 687 $http({ 688 method:'post', 689 url:local_host +"data/news/news-list-group-data", 690 params:{'publisherId':$('#publisherId').val(),'abbreviation':abbreviation, 691 'conditionName':conditionName,'conditionJudge':conditionJudge,'conditionValue':conditionValue,} 692 }).then(function(response){ 693 //æåæ¶æ§è¡ 694 if(response.data.result == 'success'){ 695 var oldNewsGroup = response.data.data.data; 696 var classTagTemp = ""; 697 for(var i= 0;i < oldNewsGroup.length; i++){ 698 var news = oldNewsGroup[i]; 699 if(news.remark1 != null && news.remark1.indexOf(",") != -1){ 700 var classTagArr = news.remark1.split(","); 701 for(var j= 0;j < classTagArr.length; j++){ 702 if(classTagTemp.indexOf(classTagArr[j]) < 0){ 703 classTagTemp = classTagTemp + classTagArr[j] + ","; 704 } 705 } 706 }else{ 707 if(news.remark1 != null && classTagTemp.indexOf(news.remark1) < 0){ 708 classTagTemp = classTagTemp + news.remark1 + ","; 709 } 710 } 711 } 712 $scope.newsGroup = classTagTemp.split(","); 713 }else{ 714 console.log(response.data.message); 715 } 716 },function(response){ 717 //å¤±è´¥æ¶æ§è¡ 718 console.log(response.data.message); 719 }); 720 } 721 722}); 723 724app.controller('j-news-list2', function($scope, $http) { 725 //页é¢ç¬¬ä¸æ¬¡å è½½ 726 setTimeout(function() { 727 $scope.paginationData(0); 728 }); 729 //ç¹å»é¡µç å è½½ 730 $scope.gotopage = function(page) { 731 if(isNull(page)){ 732 $scope.paginationData(1); 733 }else{ 734 $('#pageNum').val(page) 735 $scope.paginationData(0); 736 } 737 } 738 //è¾å ¥é¡µç å è½½ 739 $scope.enterEvent = function (e) { 740 if(loadCommonPagesEnter(e)){ 741 $scope.paginationData(1); 742 } 743 }; 744 745 //enteræç´¢å¯¹åºæ ç®çæ°é» 746 $scope.enterEventSearch = function (e) { 747 var keycode = window.event ? e.keyCode : e.which; 748 if(keycode==13){ 749 if(!isNull($("#newsWord").val())){ 750 $scope.paginationData(0); 751 }else{ 752 if($("#language").val() == "cn"){ 753 alert("请è¾å ¥æ£ç´¢å 容ï¼"); 754 }else{ 755 alert("Please enter the search content!"); 756 } 757 } 758 } 759 }; 760 761 //ç¹å»æç´¢å¯¹åºæ ç®çæ°é» 762 $scope.searchNews = function () { 763 if(!isNull($("#newsWord").val())){ 764 $scope.paginationData(0); 765 }else{ 766 if($("#language").val() == "cn"){ 767 alert("请è¾å ¥æ£ç´¢å 容ï¼"); 768 }else{ 769 alert("Please enter the search content!"); 770 } 771 } 772 }; 773 774 $scope.paginationData = function(type) { 775 776 var newsWord = $("#newsWord").val(); 777 if(isNull(newsWord)){ 778 newsWord = ""; 779 } 780 781 var abbreviation = $('#abbreviation').val(); 782 if(isNull(abbreviation)){ 783 abbreviation = $('#pageViewId').val(); 784 } 785 786 var currentpage = ""; 787 if(type == 1){ 788 currentpage = $("input.inputpagenum").val(); 789 }else{ 790 currentpage = $('#pageNum').val(); 791 } 792 var limit = $('#limit').val(); 793 if(isNull(limit)){ 794 limit = 20; 795 } 796 797 $http({ 798 method:'post', 799 url:local_host +"data/news/news-list-data", 800 params:{'publisherId':$('#publisherId').val(),'abbreviation':abbreviation, 801 'newsWord':newsWord,'pageNum':currentpage,'limit':limit} 802 }).then(function(response){ 803 //æåæ¶æ§è¡ 804 if(response.data.result == 'success'){ 805 var newsList = new Array();
806 for(var i = 0;i< response.data.data.length;i++){ 807 var news = response.data.data[i]; 808 //å½ä¸è¯æ± 809 if(!isNull(news.keyWord)){ 810 news.keyWordArr = news.keyWord.split(","); 811 } 812 newsList.push(news); 813 } 814 $scope.newsList = newsList; 815 var count = response.data.count; 816 var totalpage = Math.ceil(count/limit); 817 $scope.count = count; 818 $scope.totalpage = totalpage; 819 $scope.currentpage = Number(currentpage); 820 $scope.pageList = new Array(); 821 $scope.pageList = loadCommonPages(count,totalpage,currentpage,limit); 822 823 $('#amount').val(count); 824 $('#totalpage').val(totalpage); 825 $('.loading-show').hide(); 826 }else{ 827 console.log(response.data.message); 828 } 829 },function(response){ 830 //å¤±è´¥æ¶æ§è¡ 831 console.log(response.data.message); 832 }); 833 } 834 835}); 836 837 838/** ************************************* å¾ä¹¦ - å¼å§ ************************************* **/ 839 840//å¾ä¹¦è¯¦æ å 容(个æ§å) 841app.controller('j-book-detail1', function($scope, $http) { 842 var bookId = $('#bookId').val(); 843 if(!isNull(bookId)){ 844 $http({ 845 method:'post', 846 url:local_host +"data/book/book-detail-data", 847 params:{'bookId':bookId} 848 }).then(function(response){ 849 //æåæ¶æ§è¡ 850 if(response.data.result == 'success'){ 851 $scope.book = response.data.data; 852 var catalogArr =response.data.data.catalog; 853 catalogArr =JSON.parse(catalogArr); 854 console.log(catalogArr); 855 $scope.catalogList = catalogArr; 856 857 }else{ 858 console.log(response.data.message); 859 } 860 },function(response){ 861 //å¤±è´¥æ¶æ§è¡ 862 console.log(response.data.message); 863 }); 864 } 865}); 866app.directive('finishBook',function(){ 867 return { 868 link: function(scope,element,attr){ 869 setTimeout(function() { 870 $(".ico-ca").each(function(){ 871 if($(this).parents(".catalogcon").length>0 && $(this).parent(".catalogcon").find(".catalogcon").length>0){ 872 $(this).addClass("icofile"); 873 } 874 }) 875 $(".mulu,.muluico").click(function(){ 876 $(".calatemp").toggle(); 877 }) 878 $(".catalog-first>.icofile").click(function(){ 879 $(this).toggleClass("active") 880 $(this).siblings(".catalog-second").toggle(); 881 }) 882 $(".catalog-second>.icofile").click(function(){ 883 $(this).toggleClass("active"); 884 $(this).siblings(".catalog-third").toggle(); 885 }) 886 $($(".catalog-first>.icofile:first-child")[0]).trigger("click"); 887 }, 300); 888 } 889 } 890}) 891 892/** *************************************å¾ä¹¦-ç»æ************************************* **/
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.