document.write(''); var c = document.cookie + ";"; var re = /\s?(.*?)=(.*?);/g; while ((matches = re.exec(c)) != null) { if (matches[1] == 'usr') { document.form_wm.usr.value = matches[2]; } } function trimLeft(str, key) { if (!str) return ""; if (!key) key = ' '; var index = 0; for (var i = 0; i < str.length; i++) if (str.charAt(i) == key) { index = i; break; } return str.substring(index, str.length); } function trimRight(str, key) { if (!str) return ""; if (!key) key = ' '; var index = str.length - 1; for (var i = str.length - 1; i >= 0; i--) if (str.charAt(i) == key) { index = i; break; } return str.substring(0, index + 1); } function trim(str, key) { return trimLeft(trimRight(str, key), key); } var siteConfigs = [ {id: 1, domain: 'www.chinacoop.gov.cn', name: '涓崕鍚堜綔渚涢攢鎬荤ぞ'}, {id: 3, domain: 'www.bjbmc.com', name: '鍟嗕笟绠$悊骞查儴瀛﹂櫌'}, {id: 4, domain: 'www.chncc.com', name: '涓浗妫夎姳闆嗗洟'}, {id: 5, domain: 'www.chcoopco.com', name: '涓浗渚涢攢绮补鏈夐檺鍏徃'}, {id: 6, domain: 'www.coopcc.com', name: '涓浗渚涢攢鍐烽摼鐗╂祦鏈夐檺鍏徃'}, {id: 7, domain: '', name: '鍗椾含閲庣敓妞嶇墿缁煎悎鍒╃敤鐮旂┒鎵€'}, {id: 8, domain: '', name: '涓浗渚涢攢鍚堜綔缁忔祹瀛︿細'}, {id: 9, domain: '', name: '渚涢攢鍩洪噾瀹樼綉'}, ]; var Util = { getCookie: function (name) { var arr; var reg = new RegExp("(^| )" + name + "=([^;]*)(;|$)"); if (arr = document.cookie.match(reg)) return decodeURI(arr[2]); else return localStorage.getItem(name); }, //鐧诲綍鎴愬姛鍚庝繚瀛樼敤鎴蜂俊鎭埌鏈湴鏁版嵁搴 setCookie: function (name, value, day) { if (day !== 0) { //褰撹缃殑鏃堕棿绛変簬0鏃讹紝涓嶈缃甧xpires灞炴€э紝cookie鍦ㄦ祻瑙堝櫒鍏抽棴鍚庡垹闄 var expires = day * 24 * 60 * 60 * 1000; var date = new Date(+new Date() + expires); document.cookie = name + "=" + encodeURI(value) + ";expires=" + date.toUTCString() + ';path=/;domain=zgsyb.com'; localStorage.setItem(name, value); } else { document.cookie = name + "=" + encodeURI(value) + ';path=/;domain=zgsyb.com'; localStorage.setItem(name, value); } }, //鍒犻櫎cookie delCookie: function (name) { Util.setCookie(name, ' ', -1); localStorage.removeItem(name); }, //鎻愬彇url涓殑鍩熷悕 getDomain(url) { var domain = url.split('/'); if (domain[2]) { domain = domain[2]; } else { domain = ''; //濡傛灉url涓嶆纭氨鍙栫┖ } return domain; }, //澶勭悊绔欑偣璺宠浆 handleSiteJump(sid) { let url = window.location.href, obj = siteConfigs.find(item => item.id == sid), domain = Util.getDomain(url); if (url.indexOf(obj.domain) == -1) { let toUrl = url.replace(domain, obj.domain); if (url.indexOf('localhost') === -1) { window.location.href = toUrl; } } } } //瀵嗙爜鍔犲瘑鏂瑰紡 function ucode(s) { var len = s.length; var rs = ""; for (var i = 0; i < len; i++) { var k = s.substring(i, i + 1); rs += "$" + (s.charCodeAt(i) + "1") + ";"; } return rs; } //鐧诲綍鏂规硶 function login() { var form = document.form_wm; if (form.usr.value == "" || form.pass.value == "") { alert("鎮ㄧ殑鐢ㄦ埛鍚嶆垨瀵嗙爜涓嶈兘涓虹┖锛岃閲嶆柊杈撳叆"); return; } form.pass.value = ucode(form.pass.value);//瀵嗙爜鍔犲瘑 form.action = "https://mm.263.com/xmweb?host=mm.263.com&_t=" + (new Date()).getTime(); form.method = "post" form.submit(); } //鍏叡鐨勬爮鐩烦杞柟娉 var pageUtil = { //瀛愮珯鏍忕洰璺宠浆锛堥椤碉級 subColumnJump: function (id, data) { var url = './columnJumpSub.html?id=' + data.columnID + '&subId=' + id + '&t=' + new Date().getTime(); var openLink = $("#jumpA"); $("#jumpA").attr('href', ""); $("#jumpA").attr('target', '_blank'); $("#jumpA").attr('href', url); $("#jumpA")[0].click(); }, //瀛愮珯鏍忕洰璺宠浆锛堟爮鐩〉鍜岃鎯呴〉锛 sunColumnJump: function (id, data) { var url = './columnJumpSub.html?id=' + data.columnID + '&subId=' + id + '&t=' + new Date().getTime(); var openLink = $("#jumpA"); $("#jumpA").attr('href', ""); $("#jumpA").attr('target', '_blank'); $("#jumpA").attr('href', url); $("#jumpA")[0].click(); }, }; //椤堕儴 Vue.component('top-com', { template: '\n' + '
\n' + ' \n' + ' 涓崕鍏ㄥ浗渚涢攢鍚堜綔鎬荤ぞ涓诲姙\n' + ' \n' + ' \n' + '
\n' + ' \n' + ' \n' + ' \n' + ' \n' + ' 鐢ㄦ埛鍚岤\n' + ' 瀵嗐€€鐮?\n' + ' \n' + ' 瀹夊叏鐧诲綍\n' + ' \n' + ' \n' + '
\n' + '
' + '
\n' + '
', data: function () { return {} }, created: function () { }, methods: {} }) //logo Vue.component('logo-com', { template: '\n' + '
\n' + ' \n' + ' \n' + ' \n' + ' \n' + ' \n' + ' \n' + ' \n' + ' \n' + ' \n' + ' \n' + ' \n' + ' \n' + ' \n' + '
\n' + '
', data: function () { return { searchKey: '' } }, created: function () { }, methods: { //妫€绱 searchArticle: function () { var keyword = this.searchKey; //get璇锋眰杞爜涓ゆ锛岄槻姝腑鏂囦贡鐮侊紝鏈嶅姟鍣ㄧ浣跨敤decodeURIComponent keyword = encodeURI(keyword); keyword = encodeURI(keyword); if (keyword) { window.open("./searchColumn.html?search=" + keyword); } }, } }) //瀵艰埅 Vue.component('nav-com', { template: '\n' + '
\n' + ' \n' + '
\n' + '
', data: function () { return { activeJGSZId: 0,//鎬荤ぞ鏈哄叧缁戝畾 JGSZData: [],//鎬荤ぞ鏈哄叧鏁版嵁 columnsData: {},//鎬荤ぞ姒傚喌鏁版嵁 listContent: [],//棰嗗鐝瓙鎴愬憳鍒楄〃 status: true } }, created: function () { var _this = this; this.newsList(function () { _this.getJGSZData(function () { _this.getColumnsData(); }); }); }, mounted: function () { var _this = this; $("#zsgkLi").hover(function (e) { e.stopPropagation(); $("#messReportBox").find('.messPublish').hide(); $(this).find(".surveyBox").show(); //zsJGBox鍏冪礌鏄剧ず锛堢敓鎴愶級鐨勬椂鍊欏啀鍘荤粦瀹氭晥鏋 $(".zsJGBox").mouseenter(function (e) { e.stopPropagation(); var nowObj = this; if (_this.status) { _this.status = false; $(this).siblings('.zsJGBox').find("p").hide('normal', function () { $(nowObj).find("p").show(function () { _this.status = true; }); }); } }); }, function (e) { e.stopPropagation(); $(this).find(".surveyBox").hide(); }); $("#messReportBox").hover(function (e) { e.stopPropagation(); $(this).find(".messPublish").show(); }, function (e) { e.stopPropagation(); $(this).find(".messPublish").hide(); }) }, methods: { // 鑾峰彇棰嗗鐝瓙鏁版嵁鍒楄〃 newsList: function (callback) { var _this = this; var url = pageConfig.baseUrl + '/api/getArticles' + '?cid=' + 4878 + '&pageSize=10'; axios.get(url).then(function (result) { if (result && result.data && result.data.list.length > 0) { var list = result.data.list; if (list.length > 0) { _this.listContent = list; } } callback(); }).catch(function (error) { console.log(error); }); }, //鑾峰彇鏈烘瀯璁剧疆涓嬬殑鏍忕洰浠ュ強鏍忕洰淇℃伅 getJGSZData: function (callback) { var _this = this; var url = pageConfig.baseUrl + "/api/getSubColumns?cid=" + 4880 + "&type=3";//鑾峰彇鏉℃暟瀹氫箟锛 0锛?鏉★紱1锛 5鏉★紱2锛?0鏉★紱3锛?0鏉★紱4锛?00鏉 axios.get(url).then(function (results) { if (results.data && results.data.list && results.data.list.length > 0) { for (var i in results.data.list) { results.data.list[i].list = _this.processArticles(results.data.list[i].list); _this.activeJGSZId = results.data.list[0].column.columnID; } _this.JGSZData = results.data; } else { _this.$message.error(results.data.msg); } callback(); }).catch(function (error) { console.log(error); }); }, //鑾峰彇瀛愭爮鐩拰鏍忕洰绋夸欢 getColumnsData: function () { var _this = this; var url = pageConfig.baseUrl + "/api/getSubColumns?&cid=" + 4876 + "&type=2";//鑾峰彇鏉℃暟瀹氫箟锛 0锛?鏉★紱1锛 5鏉★紱2锛?0鏉★紱3锛?0鏉★紱4锛?00鏉 axios.get(url).then(function (results) { if (results.data && results.data.list && results.data.list.length > 0) { for (var i in results.data.list) { results.data.list[i].list = _this.processArticles(results.data.list[i].list); } _this.columnsData = results.data; } else { _this.$message.error(results.data.msg); } }).catch(function (error) { console.log(error); }); }, //绋夸欢鏁版嵁澶勭悊 processArticles: function (list) { for (var i in list) { if (list[i].articleType == 3) {//閾炬帴绋夸欢 list.articleUrl = list.articleUrl; } else if (list[i].articleType == 4) {//涓撻绋夸欢 list[i].articleUrl = './special.html?cid=' + list[i].linkID; } else {//鍏朵粬绋夸欢 list[i].articleUrl = './news.html?aid=' + list[i].fileID; } } return list; }, } }) //footer Vue.component('footer-com', { template: '\n' + '
\n' + '
\n' + ' \n' + '
\n' + '
\n' + '
\n' + '

{{ICPData[0].title}}

\n' + '

\n' + ' \n' + ' \n' + '

\n' + '

{{article.title}}

\n' + ' \n' + '
\n' + '
', data: function () { return { aboutUs: [], ICPData: [] } }, created: function () { this.getAboutUsData(); this.getICP(); }, methods: { //鑾峰彇鍙嬫儏閾炬帴 getAboutUsData: function () { var _this = this; var url = pageConfig.baseUrl + '/api/getArticles?cid=4948&pageSize=50'; axios.get(url).then(function (result) { if (result && result.data && result.data.list.length > 0) { _this.aboutUs = _this.processArticles(result.data.list); } }).catch(function (error) { console.log(error); }); }, //鑾峰彇澶囨鍙 getICP: function () { var _this = this; var url = pageConfig.baseUrl + '/api/getArticles?cid=4949&pageSize=50'; axios.get(url).then(function (result) { if (result && result.data && result.data.list.length > 0) { _this.ICPData = _this.processArticles(result.data.list); } }).catch(function (error) { console.log(error); }); }, processArticles: function (list) { for (var i in list) { if (list[i].articleType == 3) {//閾炬帴绋夸欢 list.articleUrl = list.articleUrl; } else if (list[i].articleType == 4) {//涓撻绋夸欢 list[i].articleUrl = './special.html?cid=' + list[i].linkID; } else {//鍏朵粬绋夸欢 list[i].articleUrl = './news.html?aid=' + list[i].fileID; } } return list; }, } }) //绾枃瀛 Vue.component('hot-news', { template: '
\n' + '
\n' + '
\n' + '

{{pointData.column.columnName}}\n' + '

\n' + ' 鏇村+' + '
\n' + ' \n' + '
\n' + '
', data: function () { return { pointData: [] } }, created: function () { this.getHotData(); }, methods: { getHotData: function () { var _this = this; var url = pageConfig.baseUrl + "/api/getArticles" + "?cid=" + 4829 + "&pageSize=10&containSubCols=1"; axios.get(url).then(function (results) { if (results.data && results.data.list && results.data.list.length > 0) { _this.pointData = results.data; _this.pointData.list = _this.processArticles(results.data.list); } }).catch(function (error) { console.log(error); }); }, processArticles: function (list) { for (var i in list) { if (list[i].articleType == 3) {//閾炬帴绋夸欢 list.articleUrl = list.articleUrl; } else if (list[i].articleType == 4) {//涓撻绋夸欢 list[i].articleUrl = './special.html?cid=' + list[i].linkID; } else {//鍏朵粬绋夸欢 list[i].articleUrl = './news.html?aid=' + list[i].fileID; } } return list; }, } }) //瑙嗛 Vue.component('video-news', { template: '
\n' + '
\n' + '
\n' + '

{{pointData.column.columnName}}\n' + '

\n' + ' 鏇村+' + '
\n' + '
' + ' \n' + ' ' + '
' + '
\n' + '
', data: function () { return { pointData: [], defaultImg: './images/default-bg-image169.png' } }, created: function () { this.getHotData(); }, methods: { getHotData: function () { var _this = this; var url = pageConfig.baseUrl + "/api/getArticles" + "?cid=" + 4875 + "&pageSize=10&containSubCols=1"; axios.get(url).then(function (results) { if (results.data && results.data.list && results.data.list.length > 0) { _this.pointData = results.data; _this.pointData.list = _this.processArticles(results.data.list); } }).catch(function (error) { console.log(error); }); }, processArticles: function (list) { for (var i in list) { if (list[i].articleType == 3) {//閾炬帴绋夸欢 list.articleUrl = list.articleUrl; } else if (list[i].articleType == 4) {//涓撻绋夸欢 list[i].articleUrl = './special.html?cid=' + list[i].linkID; } else {//鍏朵粬绋夸欢 list[i].articleUrl = './news.html?aid=' + list[i].fileID; } } return list; }, } }) //鍒楄〃甯﹀浘 Vue.component('images-news', { template: '
\n' + '
\n' + '
\n' + '

{{pointData.column.columnName}}\n' + '

\n' + ' 鏇村+' + '
\n' + ' \n' + '
\n' + '
', data: function () { return { pointData: [], defaultImg: './images/default-bg-image169.png' } }, created: function () { this.getHotData(); }, methods: { getHotData: function () { var _this = this; var url = pageConfig.baseUrl + "/api/getArticles" + "?cid=" + 4829 + "&pageSize=10&containSubCols=1"; axios.get(url).then(function (results) { if (results.data && results.data.list && results.data.list.length > 0) { _this.pointData = results.data; _this.pointData.list = _this.processArticles(results.data.list); } }).catch(function (error) { console.log(error); }); }, processArticles: function (list) { for (var i in list) { if (list[i].articleType == 3) {//閾炬帴绋夸欢 list.articleUrl = list.articleUrl; } else if (list[i].articleType == 4) {//涓撻绋夸欢 list[i].articleUrl = './special.html?cid=' + list[i].linkID; } else {//鍏朵粬绋夸欢 list[i].articleUrl = './news.html?aid=' + list[i].fileID; } } return list; }, } }) //绾枃瀛楀甫鏃堕棿 Vue.component('special-news', { template: '
\n' + '
\n' + '
\n' + '

{{pointData.column.columnName}}\n' + '

\n' + ' 鏇村+' + '
\n' + ' \n' + '
\n' + '
', data: function () { return { pointData: [] } }, created: function () { this.getHotData(); }, methods: { getHotData: function () { var _this = this; var url = pageConfig.baseUrl + "/api/getArticles" + "?cid=" + 4864 + "&pageSize=10&containSubCols=1"; axios.get(url).then(function (results) { if (results.data && results.data.list && results.data.list.length > 0) { _this.pointData = results.data; _this.pointData.list = _this.processArticles(results.data.list); } }).catch(function (error) { console.log(error); }); }, processArticles: function (list) { for (var i in list) { if (list[i].articleType == 3) {//閾炬帴绋夸欢 list.articleUrl = list.articleUrl; } else if (list[i].articleType == 4) {//涓撻绋夸欢 list[i].articleUrl = './special.html?cid=' + list[i].linkID; } else {//鍏朵粬绋夸欢 list[i].articleUrl = './news.html?aid=' + list[i].fileID; } } return list; }, } }) //瀛愮珯鐩稿叧妯$増 //妫€绱㈡ Vue.component('search-com', { template: ' \n' + ' \n' + ' \n' + ' \n' + ' ', data: function () { return { searchKey: '' } }, created: function () { }, methods: { //妫€绱 searchArticle: function () { var keyword = this.searchKey; //get璇锋眰杞爜涓ゆ锛岄槻姝腑鏂囦贡鐮侊紝鏈嶅姟鍣ㄧ浣跨敤decodeURIComponent keyword = encodeURI(keyword); keyword = encodeURI(keyword); if (keyword) { window.open("./../../searchColumn.html?search=" + keyword); } }, } }) //鍗曠嫭涓€涓猯ogo Vue.component('toplogo-com', { template: ' \n' + ' \n' + ' \n' + ' \n' + ' ', data: function () { return {} }, created: function () { }, methods: {} }) //footer Vue.component('footer-sub-com', { template: '\n' + '
\n' + '
\n' + ' \n' + '
\n' + '
\n' + '
\n' + '

{{ICPData[0].title}}

\n' + '

\n' + ' \n' + ' \n' + '

\n' + '

{{article.title}}

\n' + ' \n' + '
\n' + '
', data: function () { return { aboutUs: [], ICPData: [] } }, created: function () { this.getAboutUsData(); this.getICP(); }, methods: { //鑾峰彇鍙嬫儏閾炬帴 getAboutUsData: function () { var _this = this; var url = pageConfig.baseUrl + '/api/getArticles?cid=4948&pageSize=50&containSubCols=1'; axios.get(url).then(function (result) { if (result && result.data && result.data.list.length > 0) { _this.aboutUs = _this.processArticles(result.data.list); } }).catch(function (error) { console.log(error); }); }, //鑾峰彇澶囨鍙 getICP: function () { var _this = this; var url = pageConfig.baseUrl + '/api/getArticles?cid=4949&pageSize=10&containSubCols=1'; axios.get(url).then(function (result) { if (result && result.data && result.data.list.length > 0) { _this.ICPData = _this.processArticles(result.data.list); } }).catch(function (error) { console.log(error); }); }, processArticles: function (list) { for (var i in list) { if (list[i].articleType == 3) {//閾炬帴绋夸欢 list.articleUrl = list.articleUrl; } else if (list[i].articleType == 4) {//涓撻绋夸欢 list[i].articleUrl = './../../special.html?cid=' + list[i].linkID; } else {//鍏朵粬绋夸欢 list[i].articleUrl = './../../news.html?aid=' + list[i].fileID; } } return list; }, } })