var type = subParams('type'); var columnId = subParams('col'); var diffStyle = { 'DZFPKSDY': { 'title': '全面数字化电子发票技术与应用可视答疑' }, 'XDZSJKSDY': { 'title': '新电子税局技术与应用可视答疑' } } function htmlContent(data) { var _htmlContent = ''; for (var i = 0; i < data.length; i++) { _htmlContent += '
  • ' + ' ' + '
    ' + '
    ' + '
    '+data[i]["CONTENTTITLE"]+'
    ' + '
    ' + '
    ' + '
    ' + '
  • ' } return _htmlContent } function htmlColumn(data) { var _htmlColumn = ''; for (var i = 0; i < data.length; i++) { _htmlColumn += '
  • ' _htmlColumn += ' ' _htmlColumn += '
    ' _htmlColumn += '
    ' _htmlColumn += '
    '+data[i]['ZQLMMC']+'
    ' _htmlColumn += '
    ' _htmlColumn += '
    ' _htmlColumn += '
    ' if (data[i]["CHILD"] || data[i]["CONTENT"]) { _htmlColumn += '' } _htmlColumn += '
  • ' } return _htmlColumn; } function toggleColumn(e) { if ($(e).hasClass('on')) { $(e).removeClass('on'); $(e).parent().find('.list-open-box').first().hide() } else { $(e).addClass('on'); $(e).parent().find('.list-open-box').first().show() } } function initBand() { $("#visual-list #showAll").off('click'); $("#visual-list #showAll").on("click", function () { $('.item-content').addClass('on'); $('.list-open-box').show(); }); $("#visual-list #closeAll").off("click") $("#visual-list #closeAll").on("click", function () { $('.item-content.on').removeClass('on'); $('.list-open-box').hide(); }); $("#visual-list .nbmesg_icon").off("click") // 回退绑定 $("#visual-list .nbmesg_icon").on("click", function (e) { location.href = './visual_search.html?type=' + type }); $(".back2index").off("click") // 回退绑定 $(".back2index").on("click", function (e) { location.href = './visual.html?type=' + type }); } $(document).on('pageInit', '#visual-list', function () { $('title').html(diffStyle[type]['title']); request({ type: 'get', url: 'taxspecial/special/column/info', data: { 'col': columnId } }, function (response) { var result = JSON.parse(response); if(result && result.data){ $('#visual-list .title').html(result.data.title); var _html = ''; if (result.data.hasChild) { // 有子栏目 $('#visual-list .bar-header-secondary').show(); _html += htmlColumn(result.data.content); } else { // 无子栏目,直接详情 _html += htmlContent(result.data.content); } $('#visual-list .list-block ul').html(_html); } }); initBand() // 日志埋点 data-module="栏目编号" data-tag="类别编码" data-id="数据id" data-title="数据标题" loadLogScript(jslog + "/js/arlog.js?time=" + new Date().getTime(), "arlogAnchor", { "data-module": type.toLowerCase()+"_list", "data-id": columnId, "data-tag": '', "data-title": '' }); }) $(function () { $.init(); });