|
@@ -216,6 +216,89 @@ function openUrl(url) {
|
|
|
window.open(url);
|
|
|
}
|
|
|
|
|
|
+function departments() {
|
|
|
+ // 渲染BoxNav
|
|
|
+ renderBoxNav();
|
|
|
+ // 获取今天数据
|
|
|
+ getNAFBData(new Date().format("yyyy-MM-dd"), 'init');
|
|
|
+ $.ajax({
|
|
|
+ type: 'GET',
|
|
|
+ url: '/article/getRegionAllOfficialAccount',
|
|
|
+ dataType: 'json',
|
|
|
+ data: {
|
|
|
+ 'type': 2,
|
|
|
+ 'official': regionModule[0]
|
|
|
+ },
|
|
|
+ success: function (json) {
|
|
|
+ if (json.data) {
|
|
|
+ var data = json.data;
|
|
|
+ ofaData = data.ofa;
|
|
|
+ departmentLoad(ofaData)
|
|
|
+ }
|
|
|
+ },
|
|
|
+ error: function (e) {
|
|
|
+ }
|
|
|
+ });
|
|
|
+}
|
|
|
+
|
|
|
+function departmentLoad(data) {
|
|
|
+ $('#department').empty();
|
|
|
+ var html = '';
|
|
|
+ var topHtml = '';
|
|
|
+ for (var i = 0; i < data.length; i++) {
|
|
|
+ if (data[i].wType != '微信公众号') {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ if (data[i].wName == regionModule[0]) {
|
|
|
+ topHtml = '<div class="gzh-item" onclick="departmentClick(this)">'
|
|
|
+ + ' <div class="gzh gzh-active">'
|
|
|
+ + ' <div class="gzhtitie">'
|
|
|
+ + ' <img src="' + data[i].wxHead + '" alt="' + data[i].wName + '图片">'
|
|
|
+ + data[i].wName
|
|
|
+ + ' </div>'
|
|
|
+ + ' <div>' + data[i].updateTime + '</div>'
|
|
|
+ + ' </div>'
|
|
|
+ + ' <div class="smgz-contanier smgz-active">'
|
|
|
+ + ' <div class="smgz">'
|
|
|
+ + ' <div class="ewm">'
|
|
|
+ + ' <img src="' + data[i].wxQrCode + '" alt="' + data[i].wName + '二维码">'
|
|
|
+ + ' </div>'
|
|
|
+ + ' 扫码关注'
|
|
|
+ + ' </div>'
|
|
|
+ + ' </div>'
|
|
|
+ + ' </div>';
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ html += '<div class="gzh-item" onclick="regionClick(this)">'
|
|
|
+ + ' <div class="gzh">'
|
|
|
+ + ' <div class="gzhtitie">'
|
|
|
+ + ' <img src="' + data[i].wxHead + '" alt="' + data[i].wName + '图片">'
|
|
|
+ + data[i].wName
|
|
|
+ + ' </div>'
|
|
|
+ + ' <div>' + data[i].updateTime + '</div>'
|
|
|
+ + ' </div>'
|
|
|
+ + ' <div class="smgz-contanier">'
|
|
|
+ + ' <div class="smgz">'
|
|
|
+ + ' <div class="ewm">'
|
|
|
+ + ' <img src="' + data[i].wxQrCode + '" alt="' + data[i].wName + '二维码">'
|
|
|
+ + ' </div>'
|
|
|
+ + ' 扫码关注'
|
|
|
+ + ' </div>'
|
|
|
+ + ' </div>'
|
|
|
+ + ' </div>';
|
|
|
+ }
|
|
|
+ $('#department').append(topHtml + html);
|
|
|
+ regionWeChartListByRight(regionModule[0]);
|
|
|
+}
|
|
|
+function departmentClick(){
|
|
|
+ page = 1;
|
|
|
+ regionWeChartListByRight($(that).find(".gzhtitie").text().trim())
|
|
|
+ $(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() {
|
|
|
// 渲染BoxNav
|
|
|
renderBoxNav();
|
|
@@ -240,6 +323,9 @@ function regionPage() {
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
function regionCenterByLeft(data) {
|
|
|
$('#regionchartList').empty();
|
|
|
var html = '';
|
|
@@ -305,7 +391,7 @@ function regionJrttList(data) {
|
|
|
}
|
|
|
function regionClick(that) {
|
|
|
page = 1;
|
|
|
- regionWeChartListByRight($(that).find(".gzhtitie").text().trim())
|
|
|
+ // regionWeChartListByRight($(that).find(".gzhtitie").text().trim())
|
|
|
$(that).find(".gzh").addClass("gzh-active");
|
|
|
$(that).find('.smgz-contanier').addClass('smgz-active');
|
|
|
$(that).siblings('div').find(".gzh").removeClass("gzh-active");
|
|
@@ -411,6 +497,8 @@ $(".content_gzh .layui-tab-title li").click(function(){
|
|
|
initPage();
|
|
|
}else if(tabText=="重庆区县新媒体矩阵"){
|
|
|
regionPage();
|
|
|
+ }else if(tabText=="重庆部门新媒体矩阵"){
|
|
|
+ departments();
|
|
|
}
|
|
|
})
|
|
|
|