|
@@ -4,7 +4,7 @@ layui.use('laydate', function () {
|
|
|
|
|
|
// var topModule = ["重庆市南岸区人民政府", "南岸健康卫士", "南岸人力社保", "南岸公安", "南岸智慧城管", "遇见南坪"];
|
|
|
var topModule = ['重庆市南岸区人民政府', '广阳湾智创生态城', '南岸文旅', '南岸健康卫士', '南岸公安', '重庆南岸消防'];
|
|
|
-var regionModule = ['重庆市政府网', '合川区人民政府', '黔江区人民政府', '大足区政府网', '重庆市北碚区人民政府', '重庆市江北区人民政府', '渝北政府网','巴南区政府网','重庆忠县政府网','渝中政府','巫山政务'];
|
|
|
+var regionModule = ['重庆市政府网','中新互联互通项目','合川区人民政府', '黔江区人民政府', '大足区政府网', '重庆市北碚区人民政府', '重庆市江北区人民政府', '渝北政府网','巴南区政府网','重庆忠县政府网','渝中政府','巫山政务'];
|
|
|
var page = 1, limit = 12, regionlimit = 10;
|
|
|
var topData = [];
|
|
|
var ofaData = [];
|
|
@@ -216,7 +216,7 @@ function openUrl(url) {
|
|
|
window.open(url);
|
|
|
}
|
|
|
|
|
|
-function departments() {
|
|
|
+function departments(index) {
|
|
|
// 渲染BoxNav
|
|
|
renderBoxNav();
|
|
|
// 获取今天数据
|
|
@@ -227,13 +227,13 @@ function departments() {
|
|
|
dataType: 'json',
|
|
|
data: {
|
|
|
'type': 2,
|
|
|
- 'official': regionModule[0]
|
|
|
+ 'official': regionModule[1]
|
|
|
},
|
|
|
success: function (json) {
|
|
|
if (json.data) {
|
|
|
var data = json.data;
|
|
|
ofaData = data.ofa;
|
|
|
- departmentLoad(ofaData)
|
|
|
+ departmentLoad(ofaData,index);
|
|
|
}
|
|
|
},
|
|
|
error: function (e) {
|
|
@@ -241,7 +241,7 @@ function departments() {
|
|
|
});
|
|
|
}
|
|
|
|
|
|
-function departmentLoad(data) {
|
|
|
+function departmentLoad(data,index) {
|
|
|
$('#department').empty();
|
|
|
var html = '';
|
|
|
var topHtml = '';
|
|
@@ -249,8 +249,11 @@ function departmentLoad(data) {
|
|
|
if (data[i].wType != '微信公众号') {
|
|
|
continue;
|
|
|
}
|
|
|
- if (data[i].wName == regionModule[0]) {
|
|
|
- topHtml = '<div class="gzh-item" onclick="departmentClick(this)">'
|
|
|
+ // console.log(data[i],regionModule[0])
|
|
|
+ // if (data[i].wName == regionModule[0]) {
|
|
|
+ if (data[i].wName == regionModule[1]) {
|
|
|
+
|
|
|
+ topHtml = '<div class="gzh-item" onclick="departmentClick(this,1)">'
|
|
|
+ ' <div class="gzh gzh-active">'
|
|
|
+ ' <div class="gzhtitie">'
|
|
|
+ ' <img src="' + data[i].wxHead + '" alt="' + data[i].wName + '图片">'
|
|
@@ -269,7 +272,7 @@ function departmentLoad(data) {
|
|
|
+ ' </div>';
|
|
|
continue;
|
|
|
}
|
|
|
- html += '<div class="gzh-item" onclick="regionClick(this)">'
|
|
|
+ html += '<div class="gzh-item" onclick="departmentClick(this,1)">'
|
|
|
+ ' <div class="gzh">'
|
|
|
+ ' <div class="gzhtitie">'
|
|
|
+ ' <img src="' + data[i].wxHead + '" alt="' + data[i].wName + '图片">'
|
|
@@ -288,18 +291,21 @@ function departmentLoad(data) {
|
|
|
+ ' </div>';
|
|
|
}
|
|
|
$('#department').append(topHtml + html);
|
|
|
- regionWeChartListByRight(regionModule[0]);
|
|
|
+ regionWeChartListByRight(regionModule[1],index);
|
|
|
}
|
|
|
-function departmentClick(){
|
|
|
+function departmentClick(that,index){
|
|
|
page = 1;
|
|
|
- regionWeChartListByRight($(that).find(".gzhtitie").text().trim())
|
|
|
+
|
|
|
+ regionWeChartListByRight($(that).find(".gzhtitie").text().trim(),index)
|
|
|
$(that).find(".gzh").addClass("gzh-active");
|
|
|
$(that).find('.smgz-contanier').addClass('smgz-active');
|
|
|
$(that).siblings('div').find(".gzh").removeClass("gzh-active");
|
|
|
$(that).siblings('div').find(".smgz-contanier").removeClass("smgz-active");
|
|
|
}
|
|
|
|
|
|
-function regionPage() {
|
|
|
+
|
|
|
+
|
|
|
+function regionPage(index) {
|
|
|
// 渲染BoxNav
|
|
|
renderBoxNav();
|
|
|
// 获取今天数据
|
|
@@ -316,7 +322,7 @@ function regionPage() {
|
|
|
if (json.data) {
|
|
|
var data = json.data;
|
|
|
ofaData = data.ofa;
|
|
|
- regionCenterByLeft(data.ofa);
|
|
|
+ regionCenterByLeft(data.ofa,index);
|
|
|
}
|
|
|
},
|
|
|
error: function (e) {
|
|
@@ -326,7 +332,7 @@ function regionPage() {
|
|
|
|
|
|
|
|
|
|
|
|
-function regionCenterByLeft(data) {
|
|
|
+function regionCenterByLeft(data,index) {
|
|
|
$('#regionchartList').empty();
|
|
|
var html = '';
|
|
|
var topHtml = '';
|
|
@@ -335,7 +341,7 @@ function regionCenterByLeft(data) {
|
|
|
continue;
|
|
|
}
|
|
|
if (data[i].wName == regionModule[0]) {
|
|
|
- topHtml = '<div class="gzh-item" onclick="regionClick(this)">'
|
|
|
+ topHtml = '<div class="gzh-item" onclick="regionClick(this,2)">'
|
|
|
+ ' <div class="gzh gzh-active">'
|
|
|
+ ' <div class="gzhtitie">'
|
|
|
+ ' <img src="' + data[i].wxHead + '" alt="' + data[i].wName + '图片">'
|
|
@@ -354,7 +360,7 @@ function regionCenterByLeft(data) {
|
|
|
+ ' </div>';
|
|
|
continue;
|
|
|
}
|
|
|
- html += '<div class="gzh-item" onclick="regionClick(this)">'
|
|
|
+ html += '<div class="gzh-item" onclick="regionClick(this,2)">'
|
|
|
+ ' <div class="gzh">'
|
|
|
+ ' <div class="gzhtitie">'
|
|
|
+ ' <img src="' + data[i].wxHead + '" alt="' + data[i].wName + '图片">'
|
|
@@ -373,7 +379,7 @@ function regionCenterByLeft(data) {
|
|
|
+ ' </div>';
|
|
|
}
|
|
|
$('#regionchartList').append(topHtml + html);
|
|
|
- regionWeChartListByRight(regionModule[0]);
|
|
|
+ regionWeChartListByRight(regionModule[0],index);
|
|
|
}
|
|
|
function regionJrttList(data) {
|
|
|
$('#jrttList').empty();
|
|
@@ -391,13 +397,13 @@ function regionJrttList(data) {
|
|
|
}
|
|
|
function regionClick(that) {
|
|
|
page = 1;
|
|
|
- // regionWeChartListByRight($(that).find(".gzhtitie").text().trim())
|
|
|
+ regionWeChartListByRight($(that).find(".gzhtitie").text().trim(),2)
|
|
|
$(that).find(".gzh").addClass("gzh-active");
|
|
|
$(that).find('.smgz-contanier').addClass('smgz-active');
|
|
|
$(that).siblings('div').find(".gzh").removeClass("gzh-active");
|
|
|
$(that).siblings('div').find(".smgz-contanier").removeClass("smgz-active");
|
|
|
}
|
|
|
-function regionWeChartListByRight(name) {
|
|
|
+function regionWeChartListByRight(name,index) {
|
|
|
$.ajax({
|
|
|
type: 'GET',
|
|
|
url: '/article/getRegionOfficialAccountByPaging',
|
|
@@ -410,8 +416,13 @@ function regionWeChartListByRight(name) {
|
|
|
success: function (json) {
|
|
|
var more = '';
|
|
|
if (page == 1) {
|
|
|
- $('#regionRightList').empty();
|
|
|
+ if(index==1){
|
|
|
+ $('#departmentRight').empty();
|
|
|
+ }else if(index==2){
|
|
|
+ $('#regionRightList').empty();
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
if (json.data) {
|
|
|
var data = json.data;
|
|
|
if ((page * regionlimit) < json.count) {
|
|
@@ -425,7 +436,12 @@ function regionWeChartListByRight(name) {
|
|
|
+ '<span>' + data[i].nowTime + '</span>'
|
|
|
+ '</div>';
|
|
|
}
|
|
|
- $('#regionRightList').append(html + more);
|
|
|
+ if(index==1){
|
|
|
+ $('#departmentRight').append(html);
|
|
|
+ }else if(index==2){
|
|
|
+ $('#regionRightList').append(html);
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
},
|
|
|
error: function (e) {
|
|
@@ -496,9 +512,9 @@ $(".content_gzh .layui-tab-title li").click(function(){
|
|
|
if (tabText=="重庆南岸区新媒体矩阵"){
|
|
|
initPage();
|
|
|
}else if(tabText=="重庆区县新媒体矩阵"){
|
|
|
- regionPage();
|
|
|
+ regionPage(2);
|
|
|
}else if(tabText=="重庆部门新媒体矩阵"){
|
|
|
- departments();
|
|
|
+ departments(1);
|
|
|
}
|
|
|
})
|
|
|
|