|
|
@@ -22,7 +22,7 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi', 'swiper'], function |
|
|
|
|
|
|
|
module.init = function (page) { |
|
|
|
//获取焦点图信息 |
|
|
|
//tools.doGet(websitePicture, {picType:1,status:0,orderByColumn:'picSort',isAsc:'desc'}, module.focusNewsTop , true); |
|
|
|
// tools.doGet(websitePicture, {picType:1,status:0,orderByColumn:'picSort',isAsc:'desc'}, module.focusNewsTop , true); |
|
|
|
//底部友情链接 |
|
|
|
tools.doGet(friendsLinks, {}, module.bottomFriendsLinks, true); |
|
|
|
|
|
|
@@ -154,6 +154,7 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi', 'swiper'], function |
|
|
|
//正在竞价 |
|
|
|
// console.log('正在竞价') |
|
|
|
module.data.biddingTimeType = 1; |
|
|
|
module.data.outProjectInformationDetail.projectShowStatus = '正在竞价'; |
|
|
|
// if(module.data.outProjectInformationDetail.biddingType == '自由竞价'){ |
|
|
|
// document.getElementById('biddingTable').style.display = 'none'; |
|
|
|
// document.getElementById('biddingTitle').style.display = 'block'; |
|
|
@@ -167,6 +168,9 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi', 'swiper'], function |
|
|
|
// console.log('<span>距竞价结束还有:'+d+'</span>天<span>'+h+'</span>时<span>'+m+'</span>分<span>'+s+'</span>秒') |
|
|
|
$('#countType').html('竞价中') |
|
|
|
$('#countDown').html('<span>距竞价结束还有:'+d+'</span>天<span>'+h+'</span>时<span>'+m+'</span>分<span>'+s+'</span>秒') |
|
|
|
if (module.data.outProjectInformationDetail.biddingType == '自由竞价'){ |
|
|
|
document.getElementById('biddingTitle').innerHTML = '自由竞价方式下,项目成交前不显示竞价记录!'; |
|
|
|
} |
|
|
|
if(module.data.outProjectInformationDetail.biddingType != '自由竞价' && module.data.biddingTimeType != 2){ |
|
|
|
document.getElementById('showNowMoney').style.display = 'table-row'; |
|
|
|
var timName = document.getElementById('timeDown'); |
|
|
@@ -185,12 +189,14 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi', 'swiper'], function |
|
|
|
//竞价结束 |
|
|
|
$('#countType').html('') |
|
|
|
$('#countDown').html('竞价结束') |
|
|
|
module.data.outProjectInformationDetail.projectShowStatus = '等待成交'; |
|
|
|
// document.getElementById('swiperType').style.display = 'none'; |
|
|
|
// document.getElementById('biddingTable').style.display = 'table'; |
|
|
|
// document.getElementById('biddingTitle').style.display = 'none'; |
|
|
|
module.data.biddingTimeType = 2; |
|
|
|
}else if (nowTime<Date.parse(biddingStartTime)){ |
|
|
|
leftTime = Date.parse(biddingStartTime)-nowTime; |
|
|
|
module.data.outProjectInformationDetail.projectShowStatus = '等待竞价'; |
|
|
|
d = Math.floor(leftTime/1000/60/60/24); |
|
|
|
h = Math.floor(leftTime/1000/60/60%24); |
|
|
|
m = Math.floor(leftTime/1000/60%60); |
|
|
@@ -198,7 +204,7 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi', 'swiper'], function |
|
|
|
$('#countType').html('未开始') |
|
|
|
$('#countDown').html('<span>距竞价开始还有:'+d+'</span>天<span>'+h+'</span>时<span>'+m+'</span>分<span>'+s+'</span>秒') |
|
|
|
//竞价暂未开始 |
|
|
|
document.getElementById('biddingTitle').innerHTML = '竞价暂未开始...'; |
|
|
|
// document.getElementById('biddingTitle').innerHTML = '竞价暂未开始...'; |
|
|
|
module.data.biddingTimeType = 3; |
|
|
|
} |
|
|
|
|
|
|
@@ -297,10 +303,10 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi', 'swiper'], function |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if(module.data.outProjectInformationDetail.biddingType != '自由竞价' && module.data.biddingTimeType != 2){ |
|
|
|
// document.getElementById('biddingTable').style.display = 'table'; |
|
|
|
// document.getElementById('biddingTitle').style.display = 'none'; |
|
|
|
} |
|
|
|
// if(module.data.outProjectInformationDetail.biddingType != '自由竞价' && module.data.biddingTimeType != 2){ |
|
|
|
// document.getElementById('biddingTable').style.display = 'table'; |
|
|
|
// document.getElementById('biddingTitle').style.display = 'none'; |
|
|
|
// } |
|
|
|
} |
|
|
|
|
|
|
|
module.projectNum = function(data){ |
|
|
@@ -467,6 +473,7 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi', 'swiper'], function |
|
|
|
// } |
|
|
|
// document.getElementById('swiperType').style.display = 'block'; |
|
|
|
module.data.biddingTimeType = 1; |
|
|
|
module.data.outProjectInformationDetail.projectShowStatus = '正在竞价'; |
|
|
|
$('#countType').html('竞价中') |
|
|
|
$('#countDown').html('<span>距竞价结束还有:0</span>天<span>0</span>时<span>'+m+'</span>分<span>'+s+'</span>秒') |
|
|
|
if(module.data.outProjectInformationDetail.biddingType != '自由竞价' && module.data.biddingTimeType != 2){ |
|
|
@@ -567,6 +574,15 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi', 'swiper'], function |
|
|
|
// document.getElementById('biddingTable').style.display = 'table'; |
|
|
|
// document.getElementById('biddingTitle').style.display = 'none'; |
|
|
|
module.data.biddingTimeType = 2; |
|
|
|
module.data.outProjectInformationDetail.projectShowStatus = '等待成交'; |
|
|
|
|
|
|
|
tools.doGet(biddinglist, {projectId: getQueryVariable('id')}, (data1)=>{ |
|
|
|
let content1 = data1.rows; |
|
|
|
module.data.biddinglistInformationDetail = content1; |
|
|
|
module.data.biddinglistInformationDetailLength = content1.length; |
|
|
|
var biddinglistInformationData = template('biddinglistInformationData', module.data); |
|
|
|
$("#tabDetail4").html(biddinglistInformationData); |
|
|
|
}, true); |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
@@ -684,7 +700,7 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi', 'swiper'], function |
|
|
|
$('#unit').html('出价价格【'+module.data.outProjectInformationDetail.unit+'】') |
|
|
|
if (content.length>0){ |
|
|
|
//console.log('abccba') |
|
|
|
$("#nowMoneyBlock").html('<span id="nowMoney">'+content[0].money+'</span> 元');} |
|
|
|
$("#nowMoneyBlock").html('<span id="nowMoney">'+content[0].money+'</span>'+module.data.outProjectInformationDetail.unit);} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
@@ -850,7 +866,10 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi', 'swiper'], function |
|
|
|
tools.doPost(biddingSubmit, data, module.biddingSubmitOpen); |
|
|
|
} |
|
|
|
|
|
|
|
module.biddingSubmitOpen = function(){ |
|
|
|
module.biddingSubmitOpen = function(data1){ |
|
|
|
if (data1.code == 200) { |
|
|
|
tools.initError('出价成功'); |
|
|
|
} |
|
|
|
tools.doGet(getBiddingStopTime+getQueryVariable('id'), {}, function(data){ |
|
|
|
if (data.code == 200) { |
|
|
|
var nowDate = Date.parse(new Date($.ajax({type:'HEAD',async:false,data:{i: Date.parse(new Date())}}).getResponseHeader("Date"))); |
|
|
@@ -871,7 +890,6 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi', 'swiper'], function |
|
|
|
module.data.biddingTimeType = 2; |
|
|
|
return; |
|
|
|
} |
|
|
|
tools.initError('出价成功'); |
|
|
|
} |
|
|
|
},true); |
|
|
|
// $('#money').val(0) |
|
|
@@ -1131,9 +1149,9 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi', 'swiper'], function |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
//登陆跳转 |
|
|
|
//登录跳转 |
|
|
|
goLogin = function(){ |
|
|
|
tools.initDialog('登陆提示', '登陆后可参与竞价,是否登录?', function () { |
|
|
|
tools.initDialog('登录提示', '登录后可参与竞价,是否登录?', function () { |
|
|
|
tools.skip('../login/login.html') |
|
|
|
}, '登录', function () { }, "取消") |
|
|
|
} |
|
|
|