/**
 * Created by Administrator on 2021/4/5.
 */
define(['jquery', "template", "Tools", "echarts", 'swiper'], function ($, template, Tools, echarts, swiper) {
    //数据存储
    var module = {
        data: {
            //服务器地址
            serverApi:'',
            //焦点图数据
            focusList: [],
            communicateList: [],
            noticeList: [],
            policyList: [],
            newList: [],
        },
    };
    var tools = new Tools();

    module.init = function (page) {
        //新闻管理列表
        // tools.doGet(news + '/003//7', {}, module.focusNews , true);
        tools.doPost(financial, {}, module.financialList , true);
    };

    //新闻列表
    module.financialList = function (data) {
        if (data.code == 200) {
            var content = data.data;
            module.data.financialList = content;
            var financialData = template('financialData', module.data);
            $("#financialContent").html(financialData);
        }
    }

    goSearch = function(){
        var searchValue = $('#searchInput').val();
        tools.doPost(financial, {financialName:searchValue}, module.financialList , true);
        console.log(searchValue)
    }

    goDetail = function(id){
        tools.skip('/agriculturalLawEnforcement/view/workDynamics/workDetail.html?id='+id);
    }

    goNotice = function(id){
        tools.skip('/agriculturalLawEnforcement/view/noticeAnnouncement/noticeDetail.html?id='+id);
    }

    goScheme = function(id){
        tools.skip('/agriculturalLawEnforcement/view/schemeDisclosure/schemeDetail.html?id='+id);
    }

    goEnforcement = function(id){
        tools.skip('/agriculturalLawEnforcement/view/basis/basisDetail.html?id='+id);
    }

    goInteractSearch = function(){
        tools.skip('view/interact/interactList.html?keyWord='+$('#interactInput').val());
    }
    return module;
});