|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473 |
- /**
- * Created by Administrator on 2021/4/5.
- */
- define(['jquery', "template", "Tools", "biddingApi", "itemsApi"], function ($, template, Tools ) {
- //数据存储
- var module = {
- data: {
- timeArray: {
- d: '',
- h: '',
- m: '',
- s: '',
- },
- timer:null,
- setimer:null,
- outProjectInformationDetail:{}
- },
- };
- var tools = new Tools();
-
- module.init = function (page) {
-
- tools.doGet(outProject + '/id/'+getQueryVariable('id'), {}, module.outProjectInformation,true);
-
- tools.doGet(webConfig, {}, module.webConfigInformation, true)
-
- var nowTime = new Date($.ajax({type:'HEAD',async:false,data:{i: Date.parse(new Date())}}).getResponseHeader("Date"));
-
- $("#nowDateNYR").html(nowTime.getFullYear()+'.'+(nowTime.getMonth()+1)+'.'+nowTime.getDate())
-
- setInterval(function () {
- var nowTime = new Date($.ajax({type:'HEAD',async:false,data:{i: Date.parse(new Date())}}).getResponseHeader("Date"));
- $("#nowDateSFM").html(nowTime.toLocaleTimeString());
- $("#nowTime").html('服务器时间:'+nowTime.getFullYear()+'.'+(nowTime.getMonth()+1)+'.'+nowTime.getDate()+' '+nowTime.toLocaleTimeString());
- },1000)
- tools.doGet(outProject + '/id/'+getQueryVariable('id'), {}, module.outProjectInformation,true);
-
- setInterval(function (){
- tools.doGet(biddinglist, {projectId:getQueryVariable('id')}, module.biddinglistInformation,true);
- tools.doGet(outProject + '/id/'+getQueryVariable('id'), {}, module.outProjectInformation2,true);
- },5000)
- };
-
- //获取地址栏参数
- function getQueryVariable(variable){
- var query = window.location.search.substring(1);
- var vars = query.split("&");
- for (var i=0;i<vars.length;i++) {
- var pair = vars[i].split("=");
- if(pair[0] == variable){return pair[1];}
- }
- return(false);
- }
-
- //获取地址栏参数
- rechSelect = function (){
- tools.doGet(outProject + '/id/'+getQueryVariable('id'), {}, module.outProjectInformation,true);
- }
-
- //项目基本信息
- module.outProjectInformation = function (data) {
- if (data.code == 200) {
- var content = data.data;
- module.data.outProjectInformationDetail = content;
- // var outProjectInformationData = template('outProjectInformationData', module.data);
- // $("#outProjectInformationContent").html(outProjectInformationData);
- //挂牌价格字典
- tools.doGet(Dictionaries+'/price_unit', {}, (data)=>{
- if (data.code == 200) {
- var unit = eval(data.data).filter(function (e) { return e.dictValue == content.unit;})[0].dictLabel;
- module.data.outProjectInformationDetail.unit = unit;
- var outProjectInformationData = template('outProjectInformationData', module.data);
- $("#outProjectInformationContent").html(outProjectInformationData);
- var outProjectInformationData2 = template('outProjectInformationData2', module.data);
- $("#outProjectInformationContent2").html(outProjectInformationData2);
- $('#unit').html('出价【'+unit+'】')
- }
- },true);
- //竞价方式字典
- tools.doGet(Dictionaries+'/bidding_type', {}, (data)=>{
- if (data.code == 200) {
- var biddingType = eval(data.data).filter(function (e) { return e.dictValue == content.biddingType;})[0].dictLabel;
- module.data.outProjectInformationDetail.biddingType = biddingType;
- var outProjectInformationData = template('outProjectInformationData', module.data);
- $("#outProjectInformationContent").html(outProjectInformationData);
- var outProjectInformationData2 = template('outProjectInformationData2', module.data);
- $("#outProjectInformationContent2").html(outProjectInformationData2);
- }
- },true);
- //期满处理字典
- tools.doGet(Dictionaries+'/bidding_direct', {}, (data)=>{
- if (data.code == 200) {
- var biddingDirect = eval(data.data).filter(function (e) { return e.dictValue == content.biddingDirect;})[0].dictLabel;
- module.data.outProjectInformationDetail.biddingDirect = biddingDirect;
- var outProjectInformationData = template('outProjectInformationData', module.data);
- $("#outProjectInformationContent").html(outProjectInformationData);
- var outProjectInformationData2 = template('outProjectInformationData2', module.data);
- $("#outProjectInformationContent2").html(outProjectInformationData2);
- }
- },true);
- //交易项目竞价记录
- tools.doGet(biddinglist, {projectId:getQueryVariable('id')}, module.biddinglistInformation,true);
-
- //倒计时
- module.data.timer = setInterval(function(){
- let signupStartTime = module.data.outProjectInformationDetail.signupStartTime;
- let signupStopTime = module.data.outProjectInformationDetail.signupStopTime;
- let biddingStartTime = module.data.outProjectInformationDetail.biddingStartTime;
- let biddingStopTime = module.data.outProjectInformationDetail.biddingStopTime;//延时后结束时间
- let biddingStopSetime = module.data.outProjectInformationDetail.biddingStopSetime;//原始结束时间
- var nowTime = Date.parse(new Date($.ajax({type:'HEAD',async:false,data:{i: Date.parse(new Date())}}).getResponseHeader("Date")));
-
- var difference = Date.parse(biddingStopTime)-nowTime;//延时后时间差
- var differenceSetime = Date.parse(biddingStopSetime)-nowTime;//原始时间差
-
- var centerTime = content.delayPeriod * 1000//延时周期
-
- var m,s;
- m = Math.floor(difference/1000/60%60);
- s = Math.floor(difference/1000%60);
- if(s%2 == 0&¢erTime!=0){
- tools.doGet(getBiddingStopTime+getQueryVariable('id'), {}, (data)=>{
- if (data.code == 200) {
- module.data.outProjectInformationDetail.biddingStopTime = data.data
- }
- },true);
- }
- if ( differenceSetime <= 0 && difference >= 0 && difference <= centerTime){
- module.dataCompare(signupStartTime,signupStopTime,biddingStartTime,biddingStopTime);
- if (s < 1 && m < 1){
- console.log("竞价结束22222222222")
- tools.doGet(getBiddingStopTime+getQueryVariable('id'), {}, function(data){
- if (data.code == 200) {
- module.data.outProjectInformationDetail.biddingStopTime = data.data
- let timeNew = Date.parse(data.data) + 0 - nowTime;
- if (timeNew > 0) {
- module.data.outProjectInformationDetail.biddingStopTime = data.data;
- }else{
- $('#countDown').html('竞价结束')
- return;
- }
- }
- },true);
- }else if(s%2 == 0&¢erTime!=0){
- tools.doGet(getBiddingStopTime+getQueryVariable('id'), {}, (data)=>{
- if (data.code == 200) {
- module.data.outProjectInformationDetail.biddingStopTime = data.data
- }
- },true);
- }
- }else{
- module.dataCompare(signupStartTime,signupStopTime,biddingStartTime,biddingStopSetime);
- }
- },1000);
- }
- }
-
- //项目基本信息
- module.outProjectInformation2 = function (data) {
- if (data.code == 200) {
- var content = data.data;
-
- $("#bmrs").html(content.bidderNum);
- $("#cjcs").html(content.bidPriceNum);
- }
- }
-
- //竞价记录
- module.biddinglistInformation = function (data) {
- if (data.code == 200) {
- //console.log(data)
- var content = data.rows;
- // for (var i = 0; i < content.length-1; i++) {
- // for (var j = 0; j < content.length - 1 - i; j++) {
- // // 相邻元素两两对比,元素交换,大的元素交换到后面
- // if (content[j].money < content[j + 1].money) {
- // var temp = content[j];
- // content[j] = content[j+1];
- // content[j+1] = temp;
- // }
- // }
- // }
- //console.log(content)
- module.data.biddinglistInformationDetail = content;
- var biddingInformationData = template('biddingInformationData', module.data);
- $("#biddingInformationContent").html(biddingInformationData);
- if (content.length > 0){
- if((module.data.outProjectInformationDetail.biddingType=='自由竞价'||module.data.outProjectInformationDetail.biddingType=='1')&&module.data.outProjectInformationDetail.projectShowStatus=='正在竞价'){
- $("#biddingMoney").html('*');
- $("#biddingPeople").html('*');
- }else{
- $("#biddingMoney").html(content[0].money+module.data.outProjectInformationDetail.unit);
- $("#biddingPeople").html(content[0].memberId);
- }
- }else{
- $("#biddingPeople").html('无');
- $("#biddingMoney").html('无');
- }
- }
- }
-
- module.dataCompare = function(signupStartTime,signupStopTime,biddingStartTime,biddingStopTime){
- var signupStartTime = signupStartTime;
- var signupStopTime = signupStopTime;
- var biddingStartTime = biddingStartTime;
- var biddingStopTime = biddingStopTime;
- var nowTime = Date.parse(new Date($.ajax({type:'HEAD',async:false,data:{i: Date.parse(new Date())}}).getResponseHeader("Date")));
-
- var beginTimes=signupStartTime.substring(0,10).split('-');
- var endTimes=signupStopTime.substring(0,10).split('-');
-
- var biddingBeginTimes=biddingStartTime.substring(0,10).split('-');
- var biddingEndTimes=biddingStopTime.substring(0,10).split('-');
-
- signupStartTime=beginTimes[1]+'/'+beginTimes[2]+'/'+beginTimes[0]+' '+signupStartTime.substring(10,19);
- signupStopTime=endTimes[1]+'/'+endTimes[2]+'/'+endTimes[0]+' '+signupStopTime.substring(10,19);
-
- biddingStartTime=biddingBeginTimes[1]+'/'+biddingBeginTimes[2]+'/'+biddingBeginTimes[0]+' '+biddingStartTime.substring(10,19);
- biddingStopTime=biddingEndTimes[1]+'/'+biddingEndTimes[2]+'/'+biddingEndTimes[0]+' '+biddingStopTime.substring(10,19);
-
-
- //时间差
- var leftTime = Date.parse(biddingStopTime)-nowTime;
- //报名开始时间差
- var signupLeftTime = Date.parse(signupStartTime)-nowTime;
- //报名结束时间差
- var signDownLeftTime = Date.parse(signupStopTime)-nowTime;
-
- var centerTime = module.data.delayPeriod * 1000//延时周期
-
- //定义变量 d,h,m,s保存倒计时的时间
- var d,h,m,s;
- if(Date.parse(biddingStartTime)<nowTime&&nowTime<Date.parse(biddingStopTime)){
- //正在竞价
- module.data.biddingTimeType = 1;
-
- $('#d0').html(
- (
- (Math.floor(leftTime / 1000 / 60 / 60 / 24) + '').length < 2 ?
- '00' + Math.floor(leftTime / 1000 / 60 / 60 / 24) :
- (Math.floor(leftTime / 1000 / 60 / 60 / 24) + '').length < 3 ?
- '0' + Math.floor(leftTime / 1000 / 60 / 60 / 24) :
- Math.floor(leftTime / 1000 / 60 / 60 / 24) + ''
- )[0]
- );
- $('#d1').html(
- (
- (Math.floor(leftTime / 1000 / 60 / 60 / 24) + '').length < 2 ?
- '00' + Math.floor(leftTime / 1000 / 60 / 60 / 24) :
- (Math.floor(leftTime / 1000 / 60 / 60 / 24) + '').length < 3 ?
- '0' + Math.floor(leftTime / 1000 / 60 / 60 / 24) :
- Math.floor(leftTime / 1000 / 60 / 60 / 24) + ''
- )[1]
- );
- $('#d2').html(
- (
- (Math.floor(leftTime / 1000 / 60 / 60 / 24) + '').length < 2 ?
- '00' + Math.floor(leftTime / 1000 / 60 / 60 / 24) :
- (Math.floor(leftTime / 1000 / 60 / 60 / 24) + '').length < 3 ?
- '0' + Math.floor(leftTime / 1000 / 60 / 60 / 24) :
- Math.floor(leftTime / 1000 / 60 / 60 / 24) + ''
- )[2]
- );
-
- $('#h0').html(((Math.floor(leftTime / 1000 / 60 / 60 % 24) + '').length < 2 ? '0' + Math.floor(leftTime / 1000 / 60 / 60 % 24) : Math.floor(leftTime / 1000 / 60 / 60 % 24) + '')[0]);
- $('#h1').html(((Math.floor(leftTime / 1000 / 60 / 60 % 24) + '').length < 2 ? '0' + Math.floor(leftTime / 1000 / 60 / 60 % 24) : Math.floor(leftTime / 1000 / 60 / 60 % 24) + '')[1]);
-
- $('#m0').html(((Math.floor(leftTime / 1000 / 60 % 60) + '').length < 2 ? '0' + Math.floor(leftTime / 1000 / 60 % 60) : Math.floor(leftTime / 1000 / 60 % 60) + '')[0]);
- $('#m1').html(((Math.floor(leftTime / 1000 / 60 % 60) + '').length < 2 ? '0' + Math.floor(leftTime / 1000 / 60 % 60) : Math.floor(leftTime / 1000 / 60 % 60) + '')[1]);
-
- $('#s0').html(((Math.floor(leftTime / 1000 % 60) + '').length < 2 ? '0' + Math.floor(leftTime / 1000 % 60) : Math.floor(leftTime / 1000 % 60) + '')[0]);
- $('#s1').html(((Math.floor(leftTime / 1000 % 60) + '').length < 2 ? '0' + Math.floor(leftTime / 1000 % 60) : Math.floor(leftTime / 1000 % 60) + '')[1]);
-
- //tools.doGet(biddinglist, {projectId:getQueryVariable('id')}, module.biddinglistInformation,true);
-
- $('#countType').html('距竞价结束还有')
- }else if (nowTime>Date.parse(biddingStopTime)){
- //竞价结束
- $('#d0').html('0')
- $('#d1').html('0')
- $('#d2').html('0')
-
- $('#h0').html('0')
- $('#h1').html('0')
-
- $('#m0').html('0')
- $('#m1').html('0')
-
- $('#s0').html('0')
- $('#s1').html('0')
- $('#countType').html('竞价结束')
- module.data.biddingTimeType = 2;
- }else if (nowTime<Date.parse(biddingStartTime)){
- //竞价暂未开始
- $('#d0').html('0')
- $('#d1').html('0')
- $('#d2').html('0')
-
- $('#h0').html('0')
- $('#h1').html('0')
-
- $('#m0').html('0')
- $('#m1').html('0')
-
- $('#s0').html('0')
- $('#s1').html('0')
- $('#countType').html('暂未开始')
- module.data.biddingTimeType = 3;
- }
-
- if(Date.parse(signupStartTime)<nowTime&&nowTime<Date.parse(signupStopTime)){
- //正在报名
- module.data.signupTimeType = 1;
- $('#d0').html(((Math.floor(signDownLeftTime / 1000 / 60 / 60 / 24) + '').length < 2 ? '0' + Math.floor(leftTime / 1000 / 60 / 60 / 24) : Math.floor(leftTime / 1000 / 60 / 60 / 24) + '')[0]);
- $('#d1').html(((Math.floor(signDownLeftTime / 1000 / 60 / 60 / 24) + '').length < 2 ? '0' + Math.floor(leftTime / 1000 / 60 / 60 / 24) : Math.floor(leftTime / 1000 / 60 / 60 / 24) + '')[1]);
- $('#d2').html(((Math.floor(signDownLeftTime / 1000 / 60 / 60 / 24) + '').length < 2 ? '0' + Math.floor(leftTime / 1000 / 60 / 60 / 24) : Math.floor(leftTime / 1000 / 60 / 60 / 24) + '')[2]);
-
- $('#h0').html(((Math.floor(signDownLeftTime / 1000 / 60 / 60 % 24) + '').length < 2 ? '0' + Math.floor(leftTime / 1000 / 60 / 60 % 24) : Math.floor(leftTime / 1000 / 60 / 60 % 24) + '')[0]);
- $('#h1').html(((Math.floor(signDownLeftTime / 1000 / 60 / 60 % 24) + '').length < 2 ? '0' + Math.floor(leftTime / 1000 / 60 / 60 % 24) : Math.floor(leftTime / 1000 / 60 / 60 % 24) + '')[1]);
-
- $('#m0').html(((Math.floor(signDownLeftTime / 1000 / 60 % 60) + '').length < 2 ? '0' + Math.floor(leftTime / 1000 / 60 % 60) : Math.floor(leftTime / 1000 / 60 % 60) + '')[0]);
- $('#m1').html(((Math.floor(signDownLeftTime / 1000 / 60 % 60) + '').length < 2 ? '0' + Math.floor(leftTime / 1000 / 60 % 60) : Math.floor(leftTime / 1000 / 60 % 60) + '')[1]);
-
- $('#s0').html(((Math.floor(signDownLeftTime / 1000 % 60) + '').length < 2 ? '0' + Math.floor(leftTime / 1000 % 60) : Math.floor(leftTime / 1000 % 60) + '')[0]);
- $('#s1').html(((Math.floor(signDownLeftTime / 1000 % 60) + '').length < 2 ? '0' + Math.floor(leftTime / 1000 % 60) : Math.floor(leftTime / 1000 % 60) + '')[1]);
-
- $('#countType').html('距报名结束还有')
- }else if (nowTime>Date.parse(signupStopTime)){
- //报名结束
- module.data.signupTimeType = 2;
- }else if (nowTime<Date.parse(signupStartTime)){
- //报名暂未开始
- module.data.signupTimeType = 3;
- $('#d0').html(((Math.floor(signupLeftTime / 1000 / 60 / 60 / 24) + '').length < 2 ? '0' + Math.floor(leftTime / 1000 / 60 / 60 / 24) : Math.floor(leftTime / 1000 / 60 / 60 / 24) + '')[0]);
- $('#d1').html(((Math.floor(signupLeftTime / 1000 / 60 / 60 / 24) + '').length < 2 ? '0' + Math.floor(leftTime / 1000 / 60 / 60 / 24) : Math.floor(leftTime / 1000 / 60 / 60 / 24) + '')[1]);
- $('#d2').html(((Math.floor(signupLeftTime / 1000 / 60 / 60 / 24) + '').length < 2 ? '0' + Math.floor(leftTime / 1000 / 60 / 60 / 24) : Math.floor(leftTime / 1000 / 60 / 60 / 24) + '')[2]);
-
- $('#h0').html(((Math.floor(signupLeftTime / 1000 / 60 / 60 % 24) + '').length < 2 ? '0' + Math.floor(leftTime / 1000 / 60 / 60 % 24) : Math.floor(leftTime / 1000 / 60 / 60 % 24) + '')[0]);
- $('#h1').html(((Math.floor(signupLeftTime / 1000 / 60 / 60 % 24) + '').length < 2 ? '0' + Math.floor(leftTime / 1000 / 60 / 60 % 24) : Math.floor(leftTime / 1000 / 60 / 60 % 24) + '')[1]);
-
- $('#m0').html(((Math.floor(signupLeftTime / 1000 / 60 % 60) + '').length < 2 ? '0' + Math.floor(leftTime / 1000 / 60 % 60) : Math.floor(leftTime / 1000 / 60 % 60) + '')[0]);
- $('#m1').html(((Math.floor(signupLeftTime / 1000 / 60 % 60) + '').length < 2 ? '0' + Math.floor(leftTime / 1000 / 60 % 60) : Math.floor(leftTime / 1000 / 60 % 60) + '')[1]);
-
- $('#s0').html(((Math.floor(signupLeftTime / 1000 % 60) + '').length < 2 ? '0' + Math.floor(leftTime / 1000 % 60) : Math.floor(leftTime / 1000 % 60) + '')[0]);
- $('#s1').html(((Math.floor(signupLeftTime / 1000 % 60) + '').length < 2 ? '0' + Math.floor(leftTime / 1000 % 60) : Math.floor(leftTime / 1000 % 60) + '')[1]);
-
- $('#countType').html('距报名开始还有')
- }
- // if(module.data.outProjectInformationDetail.biddingType != '拍卖' && module.data.biddingTimeType != 2){
- // document.getElementById('biddingTable').style.display = 'none';
- // document.getElementById('biddingTitle').style.display = 'block';
- // }
- }
-
- module.setimeDataCompare = function(){
- tools.doGet(getBiddingStopTime+getQueryVariable('id'), {}, (data)=>{
- if (data.code == 200) {
- module.data.outProjectInformationDetail.biddingStopTime = data.data
- }
- },true);
- var biddingStartTime = module.data.outProjectInformationDetail.biddingStartTime
- var biddingStopTime = module.data.outProjectInformationDetail.biddingStopTime;
- var nowTime = Date.parse(new Date($.ajax({type:'HEAD',async:false,data:{i: Date.parse(new Date())}}).getResponseHeader("Date")));
-
- var biddingBeginTimes=biddingStartTime.substring(0,10).split('-');
- var biddingEndTimes=biddingStopTime.substring(0,10).split('-');
-
- biddingStartTime=biddingBeginTimes[1]+'/'+biddingBeginTimes[2]+'/'+biddingBeginTimes[0]+' '+biddingStartTime.substring(10,19);
- biddingStopTime=biddingEndTimes[1]+'/'+biddingEndTimes[2]+'/'+biddingEndTimes[0]+' '+biddingStopTime.substring(10,19);
-
- //时间差
- var leftTime = Date.parse(biddingStopTime)-nowTime;
-
- //定义变量 d,h,m,s保存倒计时的时间
- var d,h,m,s;
- if(Date.parse(biddingStartTime)<nowTime&&nowTime<Date.parse(biddingStopTime)){
- //正在竞价
- module.data.biddingTimeType = 1;
-
- $('#d0').html(
- (
- (Math.floor(leftTime / 1000 / 60 / 60 / 24) + '').length < 2 ?
- '00' + Math.floor(leftTime / 1000 / 60 / 60 / 24) :
- (Math.floor(leftTime / 1000 / 60 / 60 / 24) + '').length < 3 ?
- '0' + Math.floor(leftTime / 1000 / 60 / 60 / 24) :
- Math.floor(leftTime / 1000 / 60 / 60 / 24) + ''
- )[0]
- );
- $('#d1').html(
- (
- (Math.floor(leftTime / 1000 / 60 / 60 / 24) + '').length < 2 ?
- '00' + Math.floor(leftTime / 1000 / 60 / 60 / 24) :
- (Math.floor(leftTime / 1000 / 60 / 60 / 24) + '').length < 3 ?
- '0' + Math.floor(leftTime / 1000 / 60 / 60 / 24) :
- Math.floor(leftTime / 1000 / 60 / 60 / 24) + ''
- )[1]
- );
- $('#d2').html(
- (
- (Math.floor(leftTime / 1000 / 60 / 60 / 24) + '').length < 2 ?
- '00' + Math.floor(leftTime / 1000 / 60 / 60 / 24) :
- (Math.floor(leftTime / 1000 / 60 / 60 / 24) + '').length < 3 ?
- '0' + Math.floor(leftTime / 1000 / 60 / 60 / 24) :
- Math.floor(leftTime / 1000 / 60 / 60 / 24) + ''
- )[2]
- );
-
- $('#h0').html(((Math.floor(leftTime / 1000 / 60 / 60 % 24) + '').length < 2 ? '0' + Math.floor(leftTime / 1000 / 60 / 60 % 24) : Math.floor(leftTime / 1000 / 60 / 60 % 24) + '')[0]);
- $('#h1').html(((Math.floor(leftTime / 1000 / 60 / 60 % 24) + '').length < 2 ? '0' + Math.floor(leftTime / 1000 / 60 / 60 % 24) : Math.floor(leftTime / 1000 / 60 / 60 % 24) + '')[1]);
-
- $('#m0').html(((Math.floor(leftTime / 1000 / 60 % 60) + '').length < 2 ? '0' + Math.floor(leftTime / 1000 / 60 % 60) : Math.floor(leftTime / 1000 / 60 % 60) + '')[0]);
- $('#m1').html(((Math.floor(leftTime / 1000 / 60 % 60) + '').length < 2 ? '0' + Math.floor(leftTime / 1000 / 60 % 60) : Math.floor(leftTime / 1000 / 60 % 60) + '')[1]);
-
- $('#s0').html(((Math.floor(leftTime / 1000 % 60) + '').length < 2 ? '0' + Math.floor(leftTime / 1000 % 60) : Math.floor(leftTime / 1000 % 60) + '')[0]);
- $('#s1').html(((Math.floor(leftTime / 1000 % 60) + '').length < 2 ? '0' + Math.floor(leftTime / 1000 % 60) : Math.floor(leftTime / 1000 % 60) + '')[1]);
-
- let d,h,m,s;
- d = Math.floor(leftTime / 1000 / 60 / 60 / 24);
- h = Math.floor(leftTime / 1000 / 60 / 60 % 24);
- m = Math.floor(leftTime / 1000 / 60 % 60);
- s = Math.floor(leftTime / 1000 % 60);
-
- if (d<1&&h<1&&m<1&&s<1){
- console.log('竞价结束')
- clearInterval(module.data.setimer)
- }
- //tools.doGet(biddinglist, {projectId:getQueryVariable('id')}, module.biddinglistInformation,true);
-
- $('#countType').html('距竞价结束还有')
- }
- }
-
- //网站配置信息
- module.webConfigInformation = function (data) {
- if (data.code == 200) {
- var content = data.data;
- //console.log(content)
- //document.getElementById('time').innerHTML = '延时周期:'+content[8].configValue+content[8].remark+'<i class="wh">?</i>'
- module.data.timeConfig = content[8].configValue;
- module.data.titleConfig = content[9].configValue;
- module.data.importantTitle = content[7].configName+':'+ content[7].configValue.substr(3).substr(0,(content[7].configValue.substr(3).length-4));
- module.data.know = content[6].configValue;
- $("#know").html(content[6].configValue + '<span style="margin-left: 10px;"></span>' + content[6].configValue);
- }
- }
-
- module.biddingDirectDictionaries = function (data) {
- if (data.code == 200 && module.data.outProjectInformationDetail.biddingDirect!='') {
- var content = data.data;
- var biddingDirect = eval(content).filter(function (e) { return e.dictValue == module.data.outProjectInformationDetail.biddingDirect;})[0].dictLabel;
- module.data.outProjectInformationDetail.biddingDirect = biddingDirect;
- }
- }
-
- module.unitDictionaries = function (data) {
- if (data.code == 200 && module.data.outProjectInformationDetail.unit!='') {
- var content = data.data;
- var unit = eval(content).filter(function (e) { return e.dictValue == module.data.outProjectInformationDetail.unit;})[0].dictLabel;
- module.data.outProjectInformationDetail.unit = unit;
- }
- }
-
- module.biddingTypeDictionaries = function (data) {
- if (data.code == 200 && module.data.outProjectInformationDetail.biddingType!='') {
- var content = data.data;
- console.log(eval(content).filter(function (e) { return e.dictValue == module.data.outProjectInformationDetail.biddingType;}))
- var biddingType = eval(content).filter(function (e) { return e.dictValue == module.data.outProjectInformationDetail.biddingType;})[0].dictLabel;
- module.data.outProjectInformationDetail.biddingType = biddingType;
- }
- }
-
- return module;
- });
|