PageSourceSearch

https://www.chinacoop.gov.cn/js/column-video.js?t=2021028

js chinacoop.gov.cn collected 2026-10-02 16:46:39 UTC 5,679 bytes, 130 lines download raw bytes

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.