1var _defaultImg = './images/default-bg-image169.png'; 2var app = new Vue({ 3 el: "#app", 4 data: { 5 defaultImg: _defaultImg, 6 columnsData: [],//æ ç®æ°æ®å表 7 id: "", 8 columnName: "", 9 advRows: [],//广åä½ 10 hotData: [],//å½åæ ç®ä¸ççé¨ç¨¿ä»¶ï¼Top10ï¼ 11 gxlbData: [],//ä¾éèææ°æ® 12 }, 13 created: function () { 14 this.id = this.getUrlQueryPrams('id'); 15 if (this.id) { 16 this.getColumnsData(); 17 this.getHotData(); 18 this.getVideoAdvList();//è·å广åä½ 19 this.getGXLBList(); 20 } 21 }, 22 mounted: function () { 23 var status = this.getUrlQueryPrams('status'); 24 if (status) { 25 setTimeout(function () { 26 $('html').scrollTop(220); 27 }, 3000); 28 } 29 }, 30 methods: { 31 //è·ååæ ç®åæ ç®ç¨¿ä»¶ 32 getColumnsData: function () { 33 var url = pageConfig.baseUrl + "/api/getSubColumns?&cid=" + this.id + "&type=2&containSubCols=0";//è·åæ¡æ°å®ä¹ï¼ 0ï¼3æ¡ï¼1ï¼ 5æ¡ï¼2ï¼20æ¡ï¼3ï¼50æ¡ï¼4ï¼100æ¡ 34 axios.get(url).then(function (results) { 35 if (results.data && results.data.list && results.data.list.length > 0) { 36 for (var i in results.data.list) { 37 results.data.list[i].list = app.processArticles(results.data.list[i].list); 38 } 39 app.columnName = results.data.column.columnName; 40 document.title = app.columnName + '_ä¸å½ä¾éåä½ç½'; 41 app.columnsData = results.data.list; 42 } else { 43 app.$message.error(results.data.msg); 44 } 45 }).catch(function (error) { 46 console.log(error); 47 }); 48 }, 49 //è·å广åä½ 50 getVideoAdvList: function () { 51 var url = pageConfig.baseUrl + "/api/getArticles?cid=" + 4985 + "&rowNumber=0&lastFileID=0&pageSize=4&containSubCols=0"; 52 axios.get(url).then(function (result) { 53 if (result.data.list) { 54 app.advRows = app.processArticles(result.data.list); 55 } 56 }).catch(function (error) { 57 console.log(error); 58 }); 59 }, 60 //è·åä¾éèææ°æ® 61 getGXLBList: function () { 62 var url = pageConfig.baseUrl + "/api/getArticles?cid=" + 4873 + "&rowNumber=0&lastFileID=0&pageSize=4&containSubCols=1"; 63 axios.get(url).then(function (result) { 64 if (result.data.list) { 65 result.data.list = app.processArticlesGX(result.data.list); 66 app.gxlbData = result.data; 67 } 68 }).catch(function (error) { 69 console.log(error); 70 }); 71 }, 72 //è·åå½åæ ç®ä¸ççé¨ç¨¿ä»¶ 73 getHotData: function () { 74 // var url = pageConfig.baseUrl + '/api/getHotList?cid=' + this.id + '&type=5&pageSize=20&containSubCols=1'; 75 var url = pageConfig.baseUrl + '/api/getArticles?cid=' + this.id + '&containSubCols=1&type=4&aType=0&pageSize=20&rowNumber=0&lastFileID=0'; 76 axios.get(url).then(function (results) { 77 if (results.data && results.data.list && results.data.list.length > 0) { 78 app.hotData = app.unique(app.processArticles(results.data.list)); 79 } 80 }).catch(function (error) { 81 console.log(error); 82 }); 83 }, 84 //æç稿件å»é 85 unique: function (arr) { 86 for (var i = 0; i < arr.length; i++) { 87 for (var j = i + 1; j < arr.length; j++) { 88 if (arr[i].title == arr[j].title) { //第ä¸ä¸ªçåäºç¬¬äºä¸ªï¼spliceæ¹æ³å é¤ç¬¬äºä¸ª 89 arr.splice(j, 1); 90 j--; 91 } 92 } 93 } 94 return arr; 95 }, 96 //è·åurlåæ° 97 getUrlQueryPrams: function (name) { 98 var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); 99 var r = window.location.search.substr(1).match(reg); 100 if (r != null) return unescape(r[2]); 101 return null; 102 }, 103 //ç¨¿ä»¶æ°æ®å¤ç 104 processArticles: function (list) { 105 for (var i in list) { 106 if (list[i].articleType == 3) {//龿¥ç¨¿ä»¶ 107 list[i].articleUrl = list[i].articleUrl; 108 } else if (list[i].articleType == 4) {//ä¸é¢ç¨¿ä»¶ 109 list[i].articleUrl = './special.html?cid=' + list[i].linkID; 110 } else {//å ¶ä»ç¨¿ä»¶ 111 list[i].articleUrl = './news.html?aid=' + list[i].fileID; 112 } 113 } 114 return list; 115 }, 116 //ä¾éç跳转å°å 117 processArticlesGX: function (list) { 118 for (var i in list) { 119 if (list[i].articleType == 3) {//龿¥ç¨¿ä»¶ 120 list[i].articleUrl = list[i].articleUrl; 121 } else if (list[i].articleType == 4) {//ä¸é¢ç¨¿ä»¶ 122 list[i].articleUrl = 'http://www.zh-hz.com/news.html?aid=?cid=' + list[i].linkID + '&aid=' + list[i].fileID; 123 } else {//å ¶ä»ç¨¿ä»¶ 124 list[i].articleUrl = 'http://www.zh-hz.com/news.html?aid=' + list[i].fileID; 125 } 126 } 127 return list; 128 } 129 } 130})
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.