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' +
' ',
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' +
' - \n' +
' 鎬荤ぞ姒傚喌\n' +
'
\n' +
'
\n' +
' \n' +
' \n' +
'
\n' +
' \n' +
'
\n' +
' \n' +
' \n' +
'
\n' +
' \n' +
'
\n' +
' \n' +
'
\n' +
' \n' +
' \n' +
'
\n' +
' \n' +
'
\n' +
' \n' +
' - \n' +
' 淇℃伅鍙戝竷\n' +
' \n' +
'
\n' +
' - 鏀跨瓥娉曡
\n' +
' - 鏂囦欢閫氱煡
\n' +
' - 鏁版嵁缁熻
\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: '',
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' +
'
\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' +
'
\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' +
'
\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' +
'
\n' +
'
鏇村+' +
'
\n' +
'
\n' +
' - \n' +
' ' +
' \n' +
' {{article.title}}\n' +
' {{article.publishTime?article.publishTime.substring(0,11):\'\'}}' +
'
\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: '',
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;
},
}
})