1var app = angular.module('index',['ngSanitize','infinite-scroll','wui.date']); 2var app2 = angular.module('app2',['ngSanitize','infinite-scroll','wui.date']); 3$(function(){ 4 if($('#app2').length>0){ 5 angular.bootstrap(document.getElementById("app2"), ['app2']); 6 } 7}) 8 9app2.filter('trustHtml', function ($sce) { 10 return function (text,max,omit) { 11 if(!isNull(text)){ 12 if(max == 0){ 13 return $sce.trustAsHtml(text); 14 }else{ 15 if(text.length < max){ 16 return $sce.trustAsHtml(text.substring(0,max)); 17 }else{ 18 return $sce.trustAsHtml(text.substring(0,max)+omit); 19 } 20 21 } 22 23 } 24 } 25}); 26 27 28app2.controller('j-all-news2', function($scope, $http) { 29 var publisherId = "index"; 30 //åå°ææéè¦æ¸²æçæ°é»ç®ç§°,newsShowæ¯ä¸ä¸ªé½æ¯éè¦æ¸²æçæ°é»æ¨¡å 31 var abbreviations = ''; 32 $(".newsShow").each(function(i,e){ 33 if(isNull(abbreviations)){ 34 abbreviations = $(e).val(); 35 }else{ 36 abbreviations += ","+$(e).val(); 37 } 38 }) 39 $http({ 40 method:'post', 41 url:local_host +"data/news/news-list-abbrs-data", 42 params:{'publisherId':publisherId,'abbreviations':abbreviations,'a':'a'} 43 }).then(function(response){ 44 //æåæ¶æ§è¡ 45 $scope.newsColumns = response.data.data; 46 if(!isNull($scope.newsColumns)){ 47 for(var i = 0; i < $scope.newsColumns.length; i++){ 48 var newsColumn = $scope.newsColumns[i]; 49 var newsList = new Array(); 50 for(var j = 0;j< newsColumn.news.length;j++){ 51 var news = newsColumn.news[j]; 52 53 //å½ä¸è¯æ± 54 if(!isNull(news.keyWord)){ 55 news.keyWordArr = news.keyWord.split(","); 56 } 57 newsList.push(news); 58 } 59 $scope.newsColumns[i].news = newsList 60 } 61 } 62 //$('.loading-show').hide(); 63 },function(response){ 64 //å¤±è´¥æ¶æ§è¡ 65 console.log(response.data.message); 66 }); 67}); 68 69app2.controller('j-all-news', function($scope, $http) { 70 var publisherId = $('#publisherId').val(); 71 if(isNull(publisherId)){ 72 publisherId = "index"; 73 } 74 //åå°ææéè¦æ¸²æçæ°é»ç®ç§°,newsShowæ¯ä¸ä¸ªé½æ¯éè¦æ¸²æçæ°é»æ¨¡å 75 var abbreviations = ''; 76 $(".newsShow").each(function(i,e){ 77 if(isNull(abbreviations)){ 78 abbreviations = $(e).val(); 79 }else{ 80 abbreviations += ","+$(e).val(); 81 } 82 }) 83 $http({ 84 method:'post', 85 url:local_host +"data/news/news-list-abbrs-data", 86 params:{'publisherId':publisherId,'abbreviations':abbreviations} 87 }).then(function(response){ 88 //æåæ¶æ§è¡ 89 $scope.newsColumns = response.data.data; 90 if(!isNull($scope.newsColumns)){ 91 for(var i = 0; i < $scope.newsColumns.length; i++){ 92 var newsColumn = $scope.newsColumns[i]; 93 if(newsColumn.abbreviation == "banner"){ 94 $scope.bannerNews = newsColumn.news; 95 } 96 var newsList = new Array(); 97 for(var j = 0;j< newsColumn.news.length;j++){ 98 var news = newsColumn.news[j]; 99 100 //å½ä¸è¯æ± 101 if(!isNull(news.keyWord)){ 102 news.keyWordArr = news.keyWord.split(","); 103 } 104 newsList.push(news); 105 } 106 $scope.newsColumns[i].news = newsList 107 } 108 } 109 $('.loading-show').hide(); 110 },function(response){ 111 //å¤±è´¥æ¶æ§è¡ 112 console.log(response.data.message); 113 }); 114}); 115 116app2.controller('j-bottom-menu', function($scope, $http, $rootScope) { 117 $http({ 118 method:'post', 119 url:local_host +"journal/bottom-news-cols/index", 120 data:'' 121 }).then(function(response){ 122 //æåæ¶æ§è¡ 123 if(response.data.result == 'success'){ 124 $scope.newsColumns = response.data.data; 125 $('.loading-show').hide(); 126 if($('#pageViewId').val() == "article"){ 127 setTimeout(function() { 128 if($("#publisherId").val() != "jaac"){ 129 $(".combtm-top,.footer .top").show() 130 } 131 if($("#publisherId").val() == "jaac") $(".combtm-publish").show(); 132 //$('#common-bottom').html($('.common-bottom').html()); 133 134 }, 100); 135 } 136 }else{ 137 console.log(response.data.message); 138 } 139 },function(response){ 140 //å¤±è´¥æ¶æ§è¡ 141 console.log(response.data.message); 142 }); 143}); 144 145 146app2.controller('j-newscolumn-list-child', function($scope,$element,$http) { 147 148 var limit = $(".j-newscolumn-list-child").attr("data"); 149 var abbrs = $element.attr('type'); 150 console.log( abbrs) 151 $http({ 152 method:'post', 153 url:local_host +"data/news/newscolumn-list-parentAbbrs-data", 154 params:{'publisherId':$('#publisherId').val(),'parentAbbrs':abbrs,'limit':limit} 155 }).then(function(response){ 156 //æåæ¶æ§è¡ 157 if(response.data.result == 'success'){ 158 $scope.newscolumnList = response.data.data; 159 }else{ 160 console.log(response.data.message); 161 } 162 },function(response){ 163 //å¤±è´¥æ¶æ§è¡ 164 console.log(response.data.message); 165 }); 166 167}); 168 169app2.controller('j-newscolumn-list-child2', function($scope,$element,$http) { 170 171 var limit = $(".j-newscolumn-list-child2").attr("data"); 172 var abbrs = $element.attr('type'); 173 console.log( abbrs) 174 $http({ 175 method:'post', 176 url:local_host +"data/news/newscolumn-list-parentAbbrs-data", 177 params:{'publisherId':'index','parentAbbrs':abbrs,'limit':limit} 178 }).then(function(response){ 179 //æåæ¶æ§è¡ 180 if(response.data.result == 'success'){ 181 $scope.newscolumnList = response.data.data; 182 }else{ 183 console.log(response.data.message); 184 } 185 },function(response){ 186 //å¤±è´¥æ¶æ§è¡ 187 console.log(response.data.message); 188 }); 189 190}); 191 192 193 194//ç¨äºæ°é»åæåä¿¡æ¯ç渲æ 195/** 196 * é群é¦é¡µæ°é»æ¸²æ 197 */ 198app.controller('j-all-news', function($scope, $http) { 199 var publisherId = $('#publisherId').val(); 200 if(isNull(publisherId)){ 201 publisherId = "index"; 202 } 203 //åå°ææéè¦æ¸²æçæ°é»ç®ç§°,newsShowæ¯ä¸ä¸ªé½æ¯éè¦æ¸²æçæ°é»æ¨¡å 204 var abbreviations = ''; 205 $(".newsShow").each(function(i,e){ 206 if(isNull(abbreviations)){ 207 abbreviations = $(e).val(); 208 }else{ 209 abbreviations += ","+$(e).val(); 210 } 211 }) 212 $http({ 213 method:'post', 214 url:local_host +"data/news/news-list-abbrs-data", 215 params:{'publisherId':publisherId,'abbreviations':abbreviations} 216 }).then(function(response){ 217 //æåæ¶æ§è¡ 218 $scope.newsColumns = response.data.data; 219 if(!isNull($scope.newsColumns)){ 220 for(var i = 0; i < $scope.newsColumns.length; i++){ 221 var newsColumn = $scope.newsColumns[i]; 222 if(newsColumn.abbreviation == "banner"){ 223 $scope.bannerNews = newsColumn.news; 224 } 225 var newsList = new Array();
226 for(var j = 0;j< newsColumn.news.length;j++){ 227 var news = newsColumn.news[j]; 228 229 //å½ä¸è¯æ± 230 if(!isNull(news.keyWord)){ 231 news.keyWordArr = news.keyWord.split(","); 232 } 233 newsList.push(news); 234 } 235 $scope.newsColumns[i].news = newsList 236 } 237 } 238 $('.loading-show').hide(); 239 },function(response){ 240 //å¤±è´¥æ¶æ§è¡ 241 console.log(response.data.message); 242 }); 243}); 244 245/** 246 * 头é¨èå 247 */ 248app.controller('j-top-menu', function($scope, $http) { 249 var publisherId = $('#publisherId').val(); 250 if(isNull(publisherId)){ 251 publisherId = "index"; 252 } 253 $http({ 254 method:'post', 255 url:local_host +"data/news/menus-news-cols/"+publisherId, 256 data:'' 257 }).then(function(response){ 258 //æåæ¶æ§è¡ 259 $scope.topMenus = response.data.data; 260 },function(response){ 261 //å¤±è´¥æ¶æ§è¡ 262 console.log(response.data.message); 263 }); 264}); 265/** 266 * å¤çé群é¦é¡µèåé«äº® 267 * @returns 268 */ 269app.directive('repeatFinishLight',function(){ 270 var flag = true; 271 var flagJournal = true; 272 return { 273 link: function(scope,element,attr){ 274 if(flag){ 275 flag = false; 276 //$emitè°ç¨ç¶çº§Controllerå çæ¹æ³,$broadcastä¸$emitç¸å 277 //scope.$emit('repeatFinishCallback'); 278 setTimeout(function() { 279 lightMenu(); 280 }, 100); 281 } 282 if($(".top-menu>li[type='journals']").length > 0 && flagJournal){ 283 flagJournal = false; 284// setTimeout(function() { 285// loadTopMenuJournals(); 286// }, 100); 287 } 288 if($(".top-menu2").length > 0 && flagJournal){ 289 flagJournal = false; 290// setTimeout(function() { 291// loadTopMenuJournals(); 292// }, 100); 293 } 294 295 $(".header-nav ul > li").on("mouseenter",function () { 296 if($(this).children().hasClass("data-show")) { 297 $(this).children("a").addClass("active"); 298 $(this).find(".data-show").stop().slideDown(200); 299 } 300 }); 301 $(".header-nav ul > li").on("mouseleave",function () { 302 if($(this).children().hasClass("data-show")) { 303 $(this).children("a").removeClass("active"); 304 $(this).find(".data-show").stop().slideUp(200); 305 } 306 }); 307 308 309 } 310 } 311}) 312 313/** 314 * å¤çæåé¦é¡µé«äº® 315 * @returns 316 */ 317app.directive('repeatFinishLightJournal',function(){ 318 var flag = 0; 319 return { 320 link: function(scope,element,attr){ 321 if(flag == 0){ 322 flag ++; 323 setTimeout(function() { 324 lightMenu(); 325 }, 100); 326 } 327 } 328 } 329}) 330 331/** 332 * å ¬å ±åºé¨æ°é» 333 * @param $scope 334 * @param $http 335 * @param $rootScope 336 * @returns 337 */ 338app.controller('j-bottom-menu', function($scope, $http, $rootScope) { 339 $http({ 340 method:'post', 341 url:local_host +"journal/bottom-news-cols/index", 342 data:'' 343 }).then(function(response){ 344 //æåæ¶æ§è¡ 345 if(response.data.result == 'success'){ 346 $scope.newsColumns = response.data.data; 347 $('.loading-show').hide(); 348 if($('#pageViewId').val() == "article"){ 349 setTimeout(function() { 350 if($("#publisherId").val() != "jaac"){ 351 $(".combtm-top,.footer .top").show() 352 } 353 if($("#publisherId").val() == "jaac") $(".combtm-publish").show(); 354 //$('#common-bottom').html($('.common-bottom').html()); 355 356 }, 100); 357 } 358 }else{ 359 console.log(response.data.message); 360 } 361 },function(response){ 362 //å¤±è´¥æ¶æ§è¡ 363 console.log(response.data.message); 364 }); 365}); 366 367/** 368 * å ¬å ±æ°é»å表 369 * @param $scope 370 * @param $http 371 * @returns 372 */ 373app.controller('j-news-list', function($scope, $http) { 374 //页é¢ç¬¬ä¸æ¬¡å è½½ 375 setTimeout(function() { 376 $scope.paginationData(0); 377 }); 378 //ç¹å»é¡µç å è½½ 379 $scope.gotopage = function(page) { 380 if(isNull(page)){ 381 $scope.paginationData(1); 382 }else{ 383 $('#pageNum').val(page) 384 $scope.paginationData(0); 385 } 386 } 387 //è¾å ¥é¡µç å è½½ 388 $scope.enterEvent = function (e) { 389 if(loadCommonPagesEnter(e)){ 390 $scope.paginationData(1); 391 } 392 }; 393 394 //enteræç´¢å¯¹åºæ ç®çæ°é» 395 $scope.enterEventSearch = function (e) { 396 var keycode = window.event ? e.keyCode : e.which; 397 if(keycode==13){ 398 if(!isNull($("#newsWord").val())){ 399 $scope.paginationData(0); 400 }else{ 401 if($("#language").val() == "cn"){ 402 alert("请è¾å ¥æ£ç´¢å 容ï¼"); 403 }else{ 404 alert("Please enter the search content!"); 405 } 406 } 407 } 408 }; 409 410 //ç¹å»æç´¢å¯¹åºæ ç®çæ°é» 411 $scope.searchNews = function () { 412 if(!isNull($("#newsWord").val())){ 413 $scope.paginationData(0); 414 }else{ 415 if($("#language").val() == "cn"){ 416 alert("请è¾å ¥æ£ç´¢å 容ï¼"); 417 }else{ 418 alert("Please enter the search content!"); 419 } 420 } 421 }; 422 423 $scope.paginationData = function(type) { 424 425 var newsWord = $("#newsWord").val(); 426 if(isNull(newsWord)){ 427 newsWord = ""; 428 } 429 430 var abbreviation = $('#abbreviation').val(); 431 if(isNull(abbreviation)){ 432 abbreviation = $('#pageViewId').val(); 433 } 434 435 var currentpage = ""; 436 if(type == 1){ 437 currentpage = $("input.inputpagenum").val(); 438 }else{ 439 currentpage = $('#pageNum').val(); 440 } 441 var limit = $('#limit').val(); 442 if(isNull(limit)){ 443 limit = 20; 444 } 445 446 $http({ 447 method:'post', 448 url:local_host +"data/news/news-list-data", 449 params:{'publisherId':$('#publisherId').val(),'abbreviation':abbreviation, 450 'newsWord':newsWord,'pageNum':currentpage,'limit':limit} 451 }).then(function(response){ 452 //æåæ¶æ§è¡ 453 if(response.data.result == 'success'){ 454 var newsList = new Array();
455 for(var i = 0;i< response.data.data.length;i++){ 456 var news = response.data.data[i]; 457 newsStr = news.releaseTime.replace(/-/g, '/').replace(/T/g, ' '); 458 newsStr = news.releaseTime.substr(0, newsStr.indexOf('.')); 459 newsStr = new Date(new Date(newsStr).getTime() + 3600 * 1000 * 8); 460 var releaseTime = new Date(newsStr); 461 news.releaseTimeEn = formatDateEn(releaseTime); 462 var monthNum = releaseTime.getMonth() + 1; 463 if(monthNum < 10){ 464 monthNum = "0"+monthNum; 465 } 466 var dayNum = releaseTime.getDate(); 467 if(dayNum < 10){ 468 dayNum = "0"+dayNum; 469 } 470 news.releaseTime = releaseTime.getFullYear() + '-' + monthNum + 471 '-' + dayNum; 472 473 //å½ä¸è¯æ± 474 if(!isNull(news.keyWord)){ 475 news.keyWordArr = news.keyWord.split(","); 476 } 477 newsList.push(news); 478 } 479 $scope.newsList = newsList; 480 var count = response.data.count; 481 var totalpage = Math.ceil(count/limit); 482 $scope.count = count; 483 $scope.totalpage = totalpage; 484 $scope.currentpage = Number(currentpage); 485 $scope.pageList = new Array(); 486 $scope.pageList = loadCommonPages(count,totalpage,currentpage,limit); 487 488 $('#amount').val(count); 489 $('#totalpage').val(totalpage); 490 $('.loading-show').hide(); 491 }else{ 492 console.log(response.data.message); 493 } 494 },function(response){ 495 //å¤±è´¥æ¶æ§è¡ 496 console.log(response.data.message); 497 }); 498 } 499 500}); 501 502/** 503 * å ¬å ±æ°é»è¯¦æ 504 * @param $scope 505 * @param $http 506 * @returns 507 */ 508app.controller('j-news-content', function($scope, $http) { 509 $http({ 510 method:'post', 511 url:local_host +"data/news/news-detail-data", 512 params:{'newsId':$('#newsId').val()} 513 }).then(function(response){ 514 if(response.data.result == 'success'){ 515 var befor_data = new Date(response.data.data.news.createTime); 516 var befor_data_rel = new Date(response.data.data.news.releaseTime); 517 var cur_data = new Date('2021-12-1'); 518 if( cur_data.getTime() < befor_data.getTime() || cur_data.getTime() < befor_data_rel.getTime() ){ 519 $('.j-news-content').html('<div class="news-detail-con">'+response.data.data.news.content+"</div>"); 520 }else{ 521 $('.j-news-content').html(response.data.data.news.content); 522 } 523 $('.j-news-title').html(response.data.data.news.title); 524 $scope.news = response.data.data.news; 525 $scope.newsColumn = response.data.data.newsColumn; 526 //å½ä¸è¯æ± 527 if(!isNull($scope.news.keyWord)){ 528 $scope.news.keyWordArr = $scope.news.keyWord.split(","); 529 } 530 $('.loading-show').hide(); 531 console.log(response.data); 532 }else{ 533 console.log(response.data.message); 534 } 535 },function(response){ 536 //å¤±è´¥æ¶æ§è¡ 537 console.log(response.data.message); 538 }); 539}); 540 541/** 542 * éè¿æ ç®æ¥è¯¢åç§°åæ ç®æ°é» 543 * @param $scope 544 * @param $http 545 * @returns 546 */ 547app.controller('j-news-list-abbrs', function($scope, $http) { 548 //页é¢ç¬¬ä¸æ¬¡å è½½ 549 setTimeout(function() { 550 $scope.paginationData(0); 551 }); 552 $scope.paginationData = function(type) { 553 554 var limit = $(".j-news-list-abbrs").attr("data"); 555 var abbrs = $(".j-news-list-abbrs").attr("type"); 556 $http({ 557 method:'post', 558 url:local_host +"data/news/news-list-parentAbbrs-data", 559 params:{'publisherId':$('#publisherId').val(),'parentAbbrs':abbrs,'limit':limit} 560 }).then(function(response){ 561 //æåæ¶æ§è¡ 562 if(response.data.result == 'success'){ 563 var newsList = new Array(); 564 for(var i = 0;i< response.data.data.length;i++){ 565 var news = response.data.data[i]; 566 var releaseTime = new Date(news.releaseTime); 567 news.releaseTimeEn = formatDateEn(releaseTime); 568 var monthNum = releaseTime.getMonth() + 1; 569 if(monthNum < 10){ 570 monthNum = "0"+monthNum; 571 } 572 var dayNum = releaseTime.getDate(); 573 if(dayNum < 10){ 574 dayNum = "0"+dayNum; 575 } 576 news.releaseTime = releaseTime.getFullYear() + '-' + monthNum + 577 '-' + dayNum; 578 newsList.push(news); 579 } 580 $scope.newsList = newsList; 581 }else{ 582 console.log(response.data.message); 583 } 584 },function(response){ 585 //å¤±è´¥æ¶æ§è¡ 586 console.log(response.data.message); 587 }); 588 } 589 590}); 591 592/** 593 * éè¿æ ç®æ¥è¯¢åç§°åæ ç®ï¼ä¸æ¯æ°é»ï¼ 594 * @param $scope 595 * @param $http 596 * @returns 597 */ 598app.controller('j-newscolumn-list-child', function($scope,$element,$http) { 599 600 var limit = $(".j-newscolumn-list-child").attr("data"); 601 var abbrs = $element.attr('type'); 602 console.log( abbrs) 603 $http({ 604 method:'post', 605 url:local_host +"data/news/newscolumn-list-parentAbbrs-data", 606 params:{'publisherId':$('#publisherId').val(),'parentAbbrs':abbrs,'limit':limit} 607 }).then(function(response){ 608 //æåæ¶æ§è¡ 609 if(response.data.result == 'success'){ 610 $scope.newscolumnList = response.data.data; 611 }else{ 612 console.log(response.data.message); 613 } 614 },function(response){ 615 //å¤±è´¥æ¶æ§è¡ 616 console.log(response.data.message); 617 }); 618 619}); 620 621app.controller('j-newscolumn-list-child2', function($scope,$element,$http) { 622 623 var limit = $(".j-newscolumn-list-child2").attr("data"); 624 var abbrs = $element.attr('type'); 625 console.log( abbrs) 626 $http({ 627 method:'post', 628 url:local_host +"data/news/newscolumn-list-parentAbbrs-data", 629 params:{'publisherId':'index','parentAbbrs':abbrs,'limit':limit} 630 }).then(function(response){ 631 //æåæ¶æ§è¡ 632 if(response.data.result == 'success'){ 633 $scope.newscolumnList = response.data.data; 634 }else{ 635 console.log(response.data.message); 636 } 637 },function(response){ 638 //å¤±è´¥æ¶æ§è¡ 639 console.log(response.data.message); 640 }); 641 642}); 643 644 645app.controller('j-news-list-condition', function($scope, $http) { 646 647 //页é¢ç¬¬ä¸æ¬¡å è½½ 648 setTimeout(function() { 649 $scope.paginationData(0); 650 }); 651 //ç¹å»é¡µç å è½½ 652 $scope.gotopage = function(page) { 653 if(isNull(page)){ 654 $scope.paginationData(1); 655 }else{ 656 $('#pageNum').val(page) 657 $scope.paginationData(0); 658 } 659 } 660 //è¾å ¥é¡µç å è½½ 661 $scope.enterEvent = function (e) { 662 if(loadCommonPagesEnter(e)){ 663 $scope.paginationData(1); 664 } 665 }; 666 667 //enteræç´¢å¯¹åºæ ç®çæ°é» 668 $scope.enterEventSearch = function (e) { 669 var keycode = window.event ? e.keyCode : e.which; 670 if(keycode==13){ 671 if(!isNull($("#newsWord").val())){ 672 $scope.paginationData(0); 673 }else{ 674 if($("#language").val() == "cn"){ 675 alert("请è¾å ¥æ£ç´¢å 容ï¼"); 676 }else{ 677 alert("Please enter the search content!"); 678 } 679 } 680 } 681 }; 682 683 //ç¹å»æç´¢å¯¹åºæ ç®çæ°é» 684 $scope.searchNews = function () { 685 if(!isNull($("#newsWord").val())){ 686 $scope.paginationData(0); 687 }else{ 688 if($("#language").val() == "cn"){ 689 alert("请è¾å ¥æ£ç´¢å 容ï¼"); 690 }else{ 691 alert("Please enter the search content!"); 692 } 693 } 694 }; 695 696 //ç¹å»æç´¢å¯¹åºæ ç¾ 697 $scope.searchTag = function(e) { 698 $(e.target).addClass("showTag").parents(".tag-span").siblings().find("a").removeClass("showTag"); 699 $('#pageNum').val(1); 700 var conditionValue = $(e.target).attr("data"); 701 $('.conditionValue').val(conditionValue); 702 $scope.paginationData(0); 703 } 704 705 $scope.paginationData = function(type) { 706 707 var newsWord = $("#newsWord").val(); 708 if(isNull(newsWord)){ 709 newsWord = ""; 710 } 711 712 var abbreviation = $('#abbreviation').val(); 713 if(isNull(abbreviation)){ 714 abbreviation = $('#pageViewId').val(); 715 } 716 717 var currentpage = ""; 718 if(type == 1){ 719 currentpage = $("input.inputpagenum").val(); 720 }else{ 721 currentpage = $('#pageNum').val(); 722 } 723 var limit = $('#limit').val(); 724 if(isNull(limit)){ 725 limit = 20; 726 } 727 728 //èªå®ä¹æ¡ä»¶æç´¢ 729// var conditionName = "remark1"; 730// var conditionJudge = "="; 731// var conditionValue = $("#videoTag").val(); 732 var conditionList = new Array(); 733 var condition = {}; 734 var conditionName = $(".conditionName").val(); 735 var conditionJudge = $(".conditionJudge").val(); 736 var conditionValue = $(".conditionValue").val(); 737 var conditionOrderName = $(".conditionOrderName").val(); 738 var conditionOrder = $(".conditionOrder").val(); 739 //var conditionValue = "人工æºè½"; 740 if(!isNull(conditionName) && !isNull(conditionJudge) && !isNull(conditionValue)){
741 condition.conditionName = conditionName; 742 condition.conditionJudge = conditionJudge; 743 condition.conditionValue = conditionValue; 744 } 745 if(!isNull(conditionOrderName)){ 746 condition.orderName = conditionOrderName; 747 } 748 if(!isNull(conditionOrder)){ 749 condition.order = conditionOrder; 750 } 751 conditionList.push(condition); 752 753 $http({ 754 method:'post', 755 url:local_host +"data/news/news-list-condition-data", 756 params:{'publisherId':$('#publisherId').val(),'abbreviation':abbreviation, 757 'customConditions':JSON.stringify(conditionList), 758 'newsWord':newsWord,'pageNum':currentpage,'limit':limit} 759 }).then(function(response){ 760 //æåæ¶æ§è¡ 761 if(response.data.result == 'success'){ 762 var newsList = new Array(); 763 for(var i = 0;i< response.data.data.data.length;i++){ 764 var news = response.data.data.data[i]; 765 var releaseTime = new Date(news.releaseTime); 766 news.releaseTimeEn = formatDateEn(releaseTime); 767 var monthNum = releaseTime.getMonth() + 1; 768 if(monthNum < 10){ 769 monthNum = "0"+monthNum; 770 } 771 var dayNum = releaseTime.getDate(); 772 if(dayNum < 10){ 773 dayNum = "0"+dayNum; 774 } 775 news.releaseTime = releaseTime.getFullYear() + '-' + monthNum + 776 '-' + dayNum; 777 778 //å½ä¸è¯æ± 779 if(!isNull(news.keyWord)){ 780 news.keyWordArr = news.keyWord.split(","); 781 } 782 newsList.push(news); 783 } 784 $scope.newsList = newsList; 785 var count = response.data.data.count; 786 var totalpage = Math.ceil(count/limit); 787 $scope.count = count; 788 $scope.totalpage = totalpage; 789 $scope.currentpage = Number(currentpage); 790 $scope.pageList = new Array(); 791 $scope.pageList = loadCommonPages(count,totalpage,currentpage,limit); 792 793 $('#amount').val(count); 794 $('#totalpage').val(totalpage); 795 $('.loading-show').hide(); 796 }else{ 797 console.log(response.data.message); 798 } 799 },function(response){ 800 //å¤±è´¥æ¶æ§è¡ 801 console.log(response.data.message); 802 }); 803 } 804 805}); 806 807/** 808 * èªå®ä¹å段 èç±»æ¹æ³ 809 * @param $scope 810 * @param $http 811 * @returns 812 */ 813app.controller('j-news-list-group', function($scope, $http) { 814 815 var abbreviation = $('#abbreviation').val(); 816 if(isNull(abbreviation)){ 817 abbreviation = $('#pageViewId').val(); 818 } 819 820 var conditionName = $(".conditionName").val(); 821 var conditionJudge = $(".conditionJudge").val(); 822 var conditionValue = $(".conditionValue").val(); 823 if(isNull(conditionJudge)){ 824 conditionJudge = ""; 825 } 826 if(isNull(conditionValue)){ 827 conditionValue = ""; 828 } 829 if(!isNull(conditionName)){ 830 $http({ 831 method:'post', 832 url:local_host +"data/news/news-list-group-data", 833 params:{'publisherId':$('#publisherId').val(),'abbreviation':abbreviation, 834 'conditionName':conditionName,'conditionJudge':conditionJudge,'conditionValue':conditionValue,} 835 }).then(function(response){ 836 //æåæ¶æ§è¡ 837 if(response.data.result == 'success'){ 838 $scope.newsGroup = response.data.data.data; 839 }else{ 840 console.log(response.data.message); 841 } 842 },function(response){ 843 //å¤±è´¥æ¶æ§è¡ 844 console.log(response.data.message); 845 }); 846 } 847 848});
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.