| @@ -101,9 +101,7 @@ | |||||
| } | } | ||||
| .top { | |||||
| } | |||||
| .top {} | |||||
| .top ul { | .top ul { | ||||
| padding-bottom: 5px; | padding-bottom: 5px; | ||||
| @@ -202,12 +200,11 @@ | |||||
| .bannerRight { | .bannerRight { | ||||
| width: 800px; | width: 800px; | ||||
| height: 300px; | |||||
| } | } | ||||
| /*内容区*/ | /*内容区*/ | ||||
| .centerLeft { | |||||
| } | |||||
| .centerLeft {} | |||||
| .centerLeft-top { | .centerLeft-top { | ||||
| border-bottom: 1px solid #adadad; | border-bottom: 1px solid #adadad; | ||||
| @@ -328,8 +325,7 @@ | |||||
| line-height: 40px; | line-height: 40px; | ||||
| } | } | ||||
| .centerRight { | |||||
| } | |||||
| .centerRight {} | |||||
| .centerRight-list0 { | .centerRight-list0 { | ||||
| padding: 26px 30px; | padding: 26px 30px; | ||||
| @@ -472,16 +468,17 @@ | |||||
| margin-top: 15px; | margin-top: 15px; | ||||
| } | } | ||||
| .centerRight-list1-form tr{ | |||||
| .centerRight-list1-form tr { | |||||
| display: block; | display: block; | ||||
| margin-bottom: 10px; | margin-bottom: 10px; | ||||
| } | } | ||||
| .centerRight-list1-form table{ | |||||
| .centerRight-list1-form table { | |||||
| margin: 0 auto; | margin: 0 auto; | ||||
| } | } | ||||
| .centerRight-list1-form input,select { | |||||
| .centerRight-list1-form input, | |||||
| select { | |||||
| background-color: transparent; | background-color: transparent; | ||||
| border: 1px solid #bfbfbf; | border: 1px solid #bfbfbf; | ||||
| height: 26px; | height: 26px; | ||||
| @@ -669,7 +666,7 @@ | |||||
| color: #007b76; | color: #007b76; | ||||
| } | } | ||||
| .bidding{ | |||||
| .bidding { | |||||
| overflow: hidden; | overflow: hidden; | ||||
| } | } | ||||
| @@ -678,7 +675,7 @@ | |||||
| margin-bottom: 18px; | margin-bottom: 18px; | ||||
| } | } | ||||
| .biddingTit p{ | |||||
| .biddingTit p { | |||||
| display: inline-block; | display: inline-block; | ||||
| } | } | ||||
| @@ -792,15 +789,15 @@ | |||||
| background-color: #007b76 !important; | background-color: #007b76 !important; | ||||
| } | } | ||||
| .el-tabs--card > .el-tabs__header .el-tabs__item:not(.is-disabled):hover { | |||||
| .el-tabs--card>.el-tabs__header .el-tabs__item:not(.is-disabled):hover { | |||||
| color: #007b76 !important; | color: #007b76 !important; | ||||
| } | } | ||||
| .el-tabs--card > .el-tabs__header { | |||||
| .el-tabs--card>.el-tabs__header { | |||||
| margin: 0 !important; | margin: 0 !important; | ||||
| } | } | ||||
| .el-tabs--card > .el-tabs__header .el-tabs__item.is-active { | |||||
| .el-tabs--card>.el-tabs__header .el-tabs__item.is-active { | |||||
| color: #007b76 !important; | color: #007b76 !important; | ||||
| background: #f6f5f5 !important; | background: #f6f5f5 !important; | ||||
| } | } | ||||
| @@ -809,15 +806,17 @@ | |||||
| box-shadow: none !important; | box-shadow: none !important; | ||||
| } | } | ||||
| .el-tabs--card > .el-tabs__content { | |||||
| .el-tabs--card>.el-tabs__content { | |||||
| padding: 0 !important; | padding: 0 !important; | ||||
| } | } | ||||
| .personalTit-Tab .el-table td, .el-table th { | |||||
| .personalTit-Tab .el-table td, | |||||
| .el-table th { | |||||
| padding: 10px 0px !important; | padding: 10px 0px !important; | ||||
| } | } | ||||
| .el-table td.gutter, .el-table th.gutter { | |||||
| .el-table td.gutter, | |||||
| .el-table th.gutter { | |||||
| background: #e4e4e4 !important; | background: #e4e4e4 !important; | ||||
| } | } | ||||
| @@ -861,10 +860,10 @@ | |||||
| } | } | ||||
| .interaction .seaBtn { | .interaction .seaBtn { | ||||
| color: #FFFFFF ; | |||||
| border: 1px solid #007b76 ; | |||||
| background-color: #007b76 ; | |||||
| padding: 0px 40px ; | |||||
| color: #FFFFFF; | |||||
| border: 1px solid #007b76; | |||||
| background-color: #007b76; | |||||
| padding: 0px 40px; | |||||
| border-radius: 16px; | border-radius: 16px; | ||||
| line-height: 32px; | line-height: 32px; | ||||
| height: 32px; | height: 32px; | ||||
| @@ -926,20 +925,20 @@ label { | |||||
| margin-right: 10px; | margin-right: 10px; | ||||
| } | } | ||||
| label input[type="radio"] + span { | |||||
| label input[type="radio"]+span { | |||||
| width: 12px; | width: 12px; | ||||
| height: 12px; | height: 12px; | ||||
| display: inline-block; | display: inline-block; | ||||
| border: 1px solid #007b76; | border: 1px solid #007b76; | ||||
| background:url('../images/check.png') no-repeat; | |||||
| background: url('../images/check.png') no-repeat; | |||||
| background-position: 0 0; | background-position: 0 0; | ||||
| position: relative; | position: relative; | ||||
| top: 2px; | top: 2px; | ||||
| margin-right: 5px; | margin-right: 5px; | ||||
| } | } | ||||
| label input[type="radio"]:checked + span { | |||||
| background-position:0 -12px | |||||
| label input[type="radio"]:checked+span { | |||||
| background-position: 0 -12px | |||||
| } | } | ||||
| .tableHead { | .tableHead { | ||||
| @@ -952,35 +951,35 @@ label input[type="radio"]:checked + span { | |||||
| margin-top: 10px; | margin-top: 10px; | ||||
| } | } | ||||
| .tableHead tr td{ | |||||
| .tableHead tr td { | |||||
| width: 12%; | width: 12%; | ||||
| } | } | ||||
| .tableHead tr td:last-child{ | |||||
| .tableHead tr td:last-child { | |||||
| width: 16%; | width: 16%; | ||||
| } | } | ||||
| .tableList{ | |||||
| .tableList { | |||||
| height: 198px; | height: 198px; | ||||
| overflow-y:auto; | |||||
| overflow-y: auto; | |||||
| width: 1218px; | width: 1218px; | ||||
| } | } | ||||
| .tableList table tr td{ | |||||
| .tableList table tr td { | |||||
| width: 12%; | width: 12%; | ||||
| text-align: center; | text-align: center; | ||||
| padding: 10px 0px; | padding: 10px 0px; | ||||
| } | } | ||||
| .tableList table tr td:last-child{ | |||||
| .tableList table tr td:last-child { | |||||
| width: 16%; | width: 16%; | ||||
| } | } | ||||
| .tableList table tr:nth-child(2n){ | |||||
| .tableList table tr:nth-child(2n) { | |||||
| background-color: #f6f5f5; | background-color: #f6f5f5; | ||||
| } | } | ||||
| .bidding input[type='button']{ | |||||
| .bidding input[type='button'] { | |||||
| border: 1px solid #a6a6a6; | border: 1px solid #a6a6a6; | ||||
| border-radius: 20px; | border-radius: 20px; | ||||
| padding: 4px 10px; | padding: 4px 10px; | ||||
| @@ -992,38 +991,38 @@ label input[type="radio"]:checked + span { | |||||
| background-color: #007b76 !important; | background-color: #007b76 !important; | ||||
| } | } | ||||
| .tabList table{ | |||||
| .tabList table { | |||||
| border: 1px solid #e3e3e3; | border: 1px solid #e3e3e3; | ||||
| border-top: none; | border-top: none; | ||||
| } | } | ||||
| .tabList table tr td{ | |||||
| .tabList table tr td { | |||||
| text-align: center; | text-align: center; | ||||
| padding: 10px; | padding: 10px; | ||||
| border-top: 1px solid #e3e3e3; | border-top: 1px solid #e3e3e3; | ||||
| border-right: 1px solid #e3e3e3; | border-right: 1px solid #e3e3e3; | ||||
| } | } | ||||
| .tabList table tr td:last-child{ | |||||
| .tabList table tr td:last-child { | |||||
| border-right: none; | border-right: none; | ||||
| } | } | ||||
| .tabList table tr:first-child td{ | |||||
| .tabList table tr:first-child td { | |||||
| padding: 12px 10px; | padding: 12px 10px; | ||||
| border-right: none; | border-right: none; | ||||
| } | } | ||||
| .tabList table tr:first-child{ | |||||
| .tabList table tr:first-child { | |||||
| background-color: #f6f5f5; | background-color: #f6f5f5; | ||||
| } | } | ||||
| .tabList p.active{ | |||||
| .tabList p.active { | |||||
| border: 1px solid #e3e3e3; | border: 1px solid #e3e3e3; | ||||
| border-bottom: none; | border-bottom: none; | ||||
| background-color: #f6f5f5; | background-color: #f6f5f5; | ||||
| } | } | ||||
| .tabList p{ | |||||
| .tabList p { | |||||
| display: inline-table; | display: inline-table; | ||||
| width: 128px; | width: 128px; | ||||
| height: 45px; | height: 45px; | ||||
| @@ -1031,15 +1030,15 @@ label input[type="radio"]:checked + span { | |||||
| text-align: center; | text-align: center; | ||||
| } | } | ||||
| .interactionTableLeft tr td{ | |||||
| .interactionTableLeft tr td { | |||||
| border-bottom: 1px dashed #e3e3e3; | border-bottom: 1px dashed #e3e3e3; | ||||
| padding: 10px 0px; | padding: 10px 0px; | ||||
| } | } | ||||
| .interactionTableLeft tr td:last-child{ | |||||
| .interactionTableLeft tr td:last-child { | |||||
| text-align: right; | text-align: right; | ||||
| } | } | ||||
| .interactionTableLeft tr:hover{ | |||||
| .interactionTableLeft tr:hover { | |||||
| color: #007b76; | color: #007b76; | ||||
| } | |||||
| } | |||||
| @@ -4,3 +4,21 @@ | |||||
| var captchaImage_get = '/captchaImage'; //图形验证码接口 | var captchaImage_get = '/captchaImage'; //图形验证码接口 | ||||
| var login_post = '/login'; //用户登录接口 | var login_post = '/login'; //用户登录接口 | ||||
| var getInfo_get = '/getInfo' //获取用户信息 | var getInfo_get = '/getInfo' //获取用户信息 | ||||
| /*-------------- | |||||
| * 首页 | |||||
| -----------------*/ | |||||
| /* | |||||
| @purl /transaction/website/news/{number}/{limit} | |||||
| @param | |||||
| number:新闻类型字典编号 | |||||
| limit: 要查询的数据条数 | |||||
| */ | |||||
| var websiteNew = '/transaction/website/news' //网站新闻类接口 | |||||
| /* | |||||
| @purl /transaction/website/news/{number} | |||||
| @param | |||||
| number:新闻类型字典编号 | |||||
| */ | |||||
| var websiteNewPage = '/transaction/website/news' | |||||
| @@ -15,6 +15,7 @@ requirejs.config({ | |||||
| popup: 'lib/dialog/popup', | popup: 'lib/dialog/popup', | ||||
| swiper: 'lib/swiper/swiper.min', //焦点图插件 | swiper: 'lib/swiper/swiper.min', //焦点图插件 | ||||
| nprogress: 'lib/nprogress/nprogress', //页面加载loading组件 | nprogress: 'lib/nprogress/nprogress', //页面加载loading组件 | ||||
| echarts: 'lib/echarts/echarts.min', //echarts组件 | |||||
| //自己写的路径配置 | //自己写的路径配置 | ||||
| Tools: 'common/tools', | Tools: 'common/tools', | ||||
| @@ -43,14 +44,17 @@ requirejs.config({ | |||||
| }); | }); | ||||
| //所有页面都需要的js,先行加载 | //所有页面都需要的js,先行加载 | ||||
| require(['jquery', 'nprogress', 'addressApi']); | |||||
| require(['jquery', 'addressApi']); | |||||
| require(["jquery", "nprogress"], function ($, nprogress) { | |||||
| require(["jquery"], function ($) { | |||||
| //ajax加载页面跳转 | //ajax加载页面跳转 | ||||
| $(document).ajaxStart(function () { | $(document).ajaxStart(function () { | ||||
| $('.loading').show(); | |||||
| // $('.loading').show(); | |||||
| nprogress.start(); | |||||
| }).ajaxStop(function () { | }).ajaxStop(function () { | ||||
| $('.loading').hide(); | |||||
| // $('.loading').hide(); | |||||
| nprogress.done(); | |||||
| }); | }); | ||||
| //根据条件加载不同js文件 | //根据条件加载不同js文件 | ||||
| var currentPage = $("#require-page").attr("current-page"); | var currentPage = $("#require-page").attr("current-page"); | ||||
| @@ -17,36 +17,36 @@ define(['jquery', 'dialog'], function ($, dialog) { | |||||
| doPost: function (url, data, cb, Bearer) { | doPost: function (url, data, cb, Bearer) { | ||||
| var _this = this; | var _this = this; | ||||
| var headAttribute = ''; | var headAttribute = ''; | ||||
| if(Bearer && Bearer==true || _this.getCookie('Admin-Token')==''){ | |||||
| headAttribute = function (xhr) { | |||||
| if (Bearer && Bearer == true || _this.getCookie('Admin-Token') == '') { | |||||
| headAttribute = function (xhr) { | |||||
| xhr.setRequestHeader("Content-Type", 'application/json;charset=utf-8'); | xhr.setRequestHeader("Content-Type", 'application/json;charset=utf-8'); | ||||
| } | } | ||||
| }else{ | |||||
| headAttribute = function (xhr) { | |||||
| } else { | |||||
| headAttribute = function (xhr) { | |||||
| xhr.setRequestHeader("Content-Type", 'application/json;charset=utf-8'); | xhr.setRequestHeader("Content-Type", 'application/json;charset=utf-8'); | ||||
| xhr.setRequestHeader('Authorization', 'Bearer ' + _this.getCookie('Admin-Token')) | xhr.setRequestHeader('Authorization', 'Bearer ' + _this.getCookie('Admin-Token')) | ||||
| } | } | ||||
| } | } | ||||
| $.ajax({ | $.ajax({ | ||||
| url: ajaxJsUrl+url + '?=' + Math.random(), | |||||
| url: ajaxJsUrl + url + '?=' + Math.random(), | |||||
| type: 'POST', | type: 'POST', | ||||
| data: JSON.stringify(data), | data: JSON.stringify(data), | ||||
| dataType:'json', | |||||
| contentType : "application/json", | |||||
| dataType: 'json', | |||||
| contentType: "application/json", | |||||
| beforeSend: headAttribute, | beforeSend: headAttribute, | ||||
| success: function (data) { | success: function (data) { | ||||
| var code = data.code; | var code = data.code; | ||||
| var msg = data.msg; | var msg = data.msg; | ||||
| if(code === 401){ | |||||
| _this.initDialog('系统提示','登录状态已过期,您可以继续留在该页面,或者重新登录',function () { | |||||
| if (code === 401) { | |||||
| _this.initDialog('系统提示', '登录状态已过期,您可以继续留在该页面,或者重新登录', function () { | |||||
| _this.skip('/user/login.html') | _this.skip('/user/login.html') | ||||
| },'重新登录',function () {},"取消") | |||||
| }else if(code === 500){ | |||||
| }, '重新登录', function () { }, "取消") | |||||
| } else if (code === 500) { | |||||
| _this.initError(msg) | _this.initError(msg) | ||||
| cb(data); | cb(data); | ||||
| }else if(code !=200){ | |||||
| } else if (code != 200) { | |||||
| _this.initError(msg) | _this.initError(msg) | ||||
| }else{ | |||||
| } else { | |||||
| cb(data); | cb(data); | ||||
| } | } | ||||
| } | } | ||||
| @@ -59,16 +59,16 @@ define(['jquery', 'dialog'], function ($, dialog) { | |||||
| * @param cb(Function) 回调函数 | * @param cb(Function) 回调函数 | ||||
| * @param noHead(Boolean) 是否需要Bearer,不需要传true | * @param noHead(Boolean) 是否需要Bearer,不需要传true | ||||
| */ | */ | ||||
| doGet: function (uri, data, cb , Bearer) { | |||||
| doGet: function (uri, data, cb, Bearer) { | |||||
| var _this = this; | var _this = this; | ||||
| var url = ajaxJsUrl+uri + '?'; | |||||
| var url = ajaxJsUrl + uri + '?'; | |||||
| var headAttribute = '' | var headAttribute = '' | ||||
| if(Bearer && Bearer==true || _this.getCookie('Admin-Token')==''){ | |||||
| headAttribute = function (xhr) { | |||||
| if (Bearer && Bearer == true || _this.getCookie('Admin-Token') == '') { | |||||
| headAttribute = function (xhr) { | |||||
| xhr.setRequestHeader("Content-Type", 'application/json;charset=utf-8'); | xhr.setRequestHeader("Content-Type", 'application/json;charset=utf-8'); | ||||
| } | } | ||||
| }else{ | |||||
| headAttribute = function (xhr) { | |||||
| } else { | |||||
| headAttribute = function (xhr) { | |||||
| xhr.setRequestHeader("Content-Type", 'application/json;charset=utf-8'); | xhr.setRequestHeader("Content-Type", 'application/json;charset=utf-8'); | ||||
| xhr.setRequestHeader('Authorization', 'Bearer ' + _this.getCookie('Admin-Token')) | xhr.setRequestHeader('Authorization', 'Bearer ' + _this.getCookie('Admin-Token')) | ||||
| } | } | ||||
| @@ -86,28 +86,28 @@ define(['jquery', 'dialog'], function ($, dialog) { | |||||
| $.ajax({ | $.ajax({ | ||||
| url: url, | url: url, | ||||
| type: 'GET', | type: 'GET', | ||||
| beforeSend:headAttribute, | |||||
| beforeSend: headAttribute, | |||||
| success: function (data) { | success: function (data) { | ||||
| var code = data.code; | var code = data.code; | ||||
| var msg = data.msg; | var msg = data.msg; | ||||
| if(code === 401){ | |||||
| _this.initDialog('系统提示','登录状态已过期,您可以继续留在该页面,或者重新登录',function () { | |||||
| if (code === 401) { | |||||
| _this.initDialog('系统提示', '登录状态已过期,您可以继续留在该页面,或者重新登录', function () { | |||||
| _this.skip('/user/login.html') | _this.skip('/user/login.html') | ||||
| },'重新登录',function () {},"取消") | |||||
| }else if(code === 500){ | |||||
| }, '重新登录', function () { }, "取消") | |||||
| } else if (code === 500) { | |||||
| _this.initError(msg) | _this.initError(msg) | ||||
| }else if(code !=200){ | |||||
| } else if (code != 200) { | |||||
| _this.initError(msg) | _this.initError(msg) | ||||
| }else{ | |||||
| } else { | |||||
| cb(data); | cb(data); | ||||
| } | } | ||||
| }, | }, | ||||
| error:function(data){ | |||||
| error: function (data) { | |||||
| console.log(data) | console.log(data) | ||||
| } | } | ||||
| }); | }); | ||||
| }, | }, | ||||
| /** | /** | ||||
| * 创建dialog | * 创建dialog | ||||
| * @param id(String) 创建的dialog的Id 用于分辨唯一的dialog | * @param id(String) 创建的dialog的Id 用于分辨唯一的dialog | ||||
| @@ -229,8 +229,8 @@ define(['jquery', 'dialog'], function ($, dialog) { | |||||
| * skip 页面跳转 | * skip 页面跳转 | ||||
| * @param url 跳转页面链接 | * @param url 跳转页面链接 | ||||
| */ | */ | ||||
| skip:function(url){ | |||||
| if(url!=''){ | |||||
| skip: function (url) { | |||||
| if (url != '') { | |||||
| window.location = url | window.location = url | ||||
| } | } | ||||
| } | } | ||||
| @@ -1,33 +1,181 @@ | |||||
| /** | /** | ||||
| * Created by Administrator on 2021/4/5. | * Created by Administrator on 2021/4/5. | ||||
| */ | */ | ||||
| define(['jquery', "template", "Tools"], function ($, template, Tools) { | |||||
| define(['jquery', "template", "Tools", "echarts", 'swiper'], function ($, template, Tools, echarts, swiper) { | |||||
| //数据存储 | //数据存储 | ||||
| var module = { | var module = { | ||||
| initData: { | |||||
| title: '例子', | |||||
| isAdmin: true, | |||||
| list: ['测试', '测试2', '测试3', '测试4', '测试4'] | |||||
| data: { | |||||
| //焦点图数据 | |||||
| focusList: [], | |||||
| //新闻资讯数据 | |||||
| newsInformationList: [], | |||||
| //政策法规数据 | |||||
| policiesRegulationsList: [], | |||||
| //交易规则数据 | |||||
| tradingRulesList: [] | |||||
| }, | }, | ||||
| userData: {} //用户信息 | |||||
| //柱状图参数 | |||||
| option: { | |||||
| xAxis: { | |||||
| type: 'category', | |||||
| axisLine: { | |||||
| show: true, | |||||
| lineStyle: { | |||||
| width: 1, | |||||
| type: "solid" | |||||
| } | |||||
| }, | |||||
| axisLabel: { //设置x轴的字 | |||||
| show: true, | |||||
| interval: 0,//使x轴横坐标全部显示 | |||||
| textStyle: {//x轴字体样式 | |||||
| margin: 15 | |||||
| } | |||||
| }, | |||||
| data: ['2014', '2015', '2016', '2017', '2018', '2019', '2020', '2021'] | |||||
| }, | |||||
| yAxis: { | |||||
| type: 'value', | |||||
| min: 400, | |||||
| max: 1000, | |||||
| splitNumber: 7, | |||||
| splitLine: { | |||||
| lineStyle: { | |||||
| type: 'dashed' | |||||
| } | |||||
| }, | |||||
| axisLine: { | |||||
| show: true, | |||||
| lineStyle: { | |||||
| width: 1, | |||||
| type: "solid" | |||||
| } | |||||
| }, | |||||
| }, | |||||
| series: [{ | |||||
| data: [490, 520, 650, 600, 700, 640, 680, 600, 660],//实际值减300 | |||||
| type: 'bar', | |||||
| itemStyle: { | |||||
| color: '#007b76' | |||||
| } | |||||
| }], | |||||
| grid: { | |||||
| height: 200, | |||||
| width: 280, | |||||
| top: '-5px' | |||||
| }, | |||||
| } | |||||
| }; | }; | ||||
| var tools = new Tools(); | var tools = new Tools(); | ||||
| module.init = function (page) { | module.init = function (page) { | ||||
| //template.js demo案例 | |||||
| var exampleMian = template('example-mian-dom', module.initData); | |||||
| $("#example-mian").html(exampleMian); | |||||
| //获取用户信息 | |||||
| tools.doGet(getInfo_get, {}, module.getInfoData) | |||||
| //获取焦点图信息 | |||||
| tools.doGet(websiteNew + '/1/4', {}, module.focusNews); | |||||
| //新闻资讯 | |||||
| tools.doGet(websiteNew + '/2/6', {}, module.NewsInformation); | |||||
| //政策法规 | |||||
| tools.doGet(websiteNew + '/3/6', {}, module.policiesRegulations); | |||||
| //交易规则 | |||||
| tools.doGet(websiteNew + '/4/6', {}, module.tradingRules); | |||||
| //竞价大厅-滚动 | |||||
| module.hallRolling(); | |||||
| // 柱状图绘制 | |||||
| var chartDom = document.getElementById('chart'); | |||||
| var myChart = echarts.init(chartDom); | |||||
| module.option && myChart.setOption(module.option); | |||||
| }; | }; | ||||
| //获取用户信息 | |||||
| module.getInfoData = function (data) { | |||||
| //焦点图数据 | |||||
| module.focusNews = function (data) { | |||||
| if (data.code == 200) { | |||||
| var content = data.data; | |||||
| var focusList = []; | |||||
| for (var i = 0; i < content.length; i++) { | |||||
| var imgStrs = content[i].content.match(/<img.*?>/g) | |||||
| if (imgStrs != null && imgStrs != '') { | |||||
| focusList.push(imgStrs[0]) | |||||
| } | |||||
| } | |||||
| module.data.focusList = focusList; | |||||
| var bannerFocusData = template('bannerFocusData', module.data); | |||||
| $("#bannerFocusContent").html(bannerFocusData); | |||||
| new Swiper('#bannerFocusWrap', { | |||||
| pagination: '.page-pagination', | |||||
| paginationClickable: true | |||||
| }) | |||||
| } | |||||
| } | |||||
| //新闻资讯数据 | |||||
| module.NewsInformation = function (data) { | |||||
| if (data.code == 200) { | |||||
| var content = data.data; | |||||
| module.data.newsInformationList = content; | |||||
| var NewsInformationData = template('NewsInformationData', module.data); | |||||
| $("#NewsInformationContent").html(NewsInformationData); | |||||
| } | |||||
| } | |||||
| //政策法规 | |||||
| module.policiesRegulations = function (data) { | |||||
| if (data.code == 200) { | |||||
| var content = data.data; | |||||
| module.data.policiesRegulationsList = content; | |||||
| var policiesRegulationsData = template('policiesRegulationsData', module.data); | |||||
| $("#policiesRegulationsContent").html(policiesRegulationsData); | |||||
| } | |||||
| } | |||||
| //交易规则 | |||||
| module.tradingRules = function (data) { | |||||
| if (data.code == 200) { | if (data.code == 200) { | ||||
| module.userData = data.user; | |||||
| var userInfoMian = template('userinfo-main-dom', module.userData); | |||||
| $("#userinfo-main").html(userInfoMian); | |||||
| var content = data.data; | |||||
| module.data.tradingRulesList = content; | |||||
| var tradingRulesData = template('tradingRulesData', module.data); | |||||
| $("#tradingRulesContent").html(tradingRulesData); | |||||
| } | } | ||||
| } | } | ||||
| ///竞价大厅-滚动 | |||||
| module.hallRolling = function () { | |||||
| var divScroll = document.getElementById('tableList'); | |||||
| window.onmousewheel = divScroll.onmousewheel = function () { return false } | |||||
| module.timeInter(divScroll); | |||||
| divScroll.onmouseover = function () { | |||||
| clearInterval(time); | |||||
| } | |||||
| divScroll.onmouseout = function () { | |||||
| module.timeInter(divScroll); | |||||
| } | |||||
| module.tabCheck('supply'); | |||||
| } | |||||
| module.timeInter = function (divScroll) { | |||||
| time = setInterval(function () { | |||||
| var oldTop = divScroll.scrollTop; | |||||
| var newTop = oldTop + 1; | |||||
| divScroll.scrollTop = newTop; | |||||
| var counst = divScroll.scrollHeight - divScroll.scrollTop - divScroll.clientHeight; | |||||
| if (1 > counst) { | |||||
| divScroll.scrollTop = 0; | |||||
| } | |||||
| }, 30) | |||||
| } | |||||
| //切换 | |||||
| module.tabCheck = function (type) { | |||||
| document.getElementById('supply').style.display = 'none'; | |||||
| document.getElementById('demand').style.display = 'none'; | |||||
| document.getElementById(type).style.display = 'inline-table'; | |||||
| } | |||||
| return module; | return module; | ||||
| }); | }); | ||||