/** * Created by Administrator on 2021/4/5. */ define(['jquery', "template", "Tools", 'swiper', 'itemsApi',"cupload"], function ($, template, Tools, swiper) { //数据存储 var module = { data: { //焦点图数据 focusListTop: [], showImgInformationDetail:'' }, }; var tools = new Tools(); module.init = function (page) {//底部友情链接 //获取焦点图信息 tools.doGet(websitePicture, {picType:1,status:0,orderByColumn:'picSort',isAsc:'desc'}, module.focusNewsTop , true); tools.doGet(friendsLinks, {}, module.bottomFriendsLinks, true); document.getElementById('realName').value = tools.getCookie('userName'); document.getElementById('userNum').value = tools.getCookie('phone'); document.getElementById('userBank').value = tools.getCookie('bankAddress'); document.getElementById('bankId').value = tools.getCookie('bankCardNum'); document.getElementById('bankCardName').value = tools.getCookie('bankCardName'); document.getElementById('idCard').value = tools.getCookie('idCardNum'); document.getElementById('payeePaymentLines').value = tools.getCookie('payeePaymentLines'); tools.doGet(webDeptType+"/bank_account_type", {}, module.accountType, true); tools.doGet(webDeptType+"/bank_type_all", {}, module.bankType, true); //项目基本信息 tools.doGet(outProject + '/id/'+getQueryVariable('id'), {}, module.outProjectInformation,true); //网站配置信息(网站名称 底部联系方式 公安备案号 网站备案号) tools.getWebConfig(); }; //底部友情链接 module.bankType = function (data) { if (data.code == 200) { var content = data.data; if(tools.getCookie('bankType') != undefined){ var bankType = content.filter(function (e) { return e.dictValue == tools.getCookie('bankType'); })[0].dictLabel; document.getElementById('bankType').value = bankType; } } } //底部友情链接 module.accountType = function (data) { if (data.code == 200) { var content = data.data; if(tools.getCookie('accountType') != undefined){ var accountType = content.filter(function (e) { return e.dictValue == tools.getCookie('accountType'); })[0].dictLabel; document.getElementById('accountType').value = accountType; } } } //焦点图数据 module.focusNewsTop = function (data) { if (data.code == 200) { let focusArray = []; if(data.data.length<1){ focusArray.push({ picUrl:'../../../static/images/banner1.png' },{ picUrl:'../../../static/images/banner2.png' },{ picUrl:'../../../static/images/banner3.png' }) }else{ data.data.forEach(res=>{ focusArray.push({ picUrl:'/api'+res.picUrl }) }) } module.data.focusListTop = focusArray; var bannerFocusDataTop = template('bannerFocusDataTop', module.data); $("#bannerFocusTopContent").html(bannerFocusDataTop); new Swiper('#bannerFocusWrapTop', { paginationClickable: true, autoplay : 4000, loop:true }) } } //底部友情链接 module.bottomFriendsLinks = function (data) { if (data.code == 200) { var content = data.data; console.log(content) module.data.friendsLinksList = content; var friendsLinksData = template('friendsLinksData', module.data); $("#friendsLinksContent").html(friendsLinksData); } } //获取地址栏参数 function getQueryVariable(variable){ var query = window.location.search.substring(1); var vars = query.split("&"); for (var i=0;i