Bläddra i källkod

Merge branch 'newProperty' of http://116.255.223.226:3000/zhangzl/nsgk_web into newProperty

newProperty
张泽亮 1 år sedan
förälder
incheckning
33845e53a3
2 ändrade filer med 55 tillägg och 34 borttagningar
  1. +52
    -31
      static/js/project/listingItems/items2.js
  2. +3
    -3
      view/listingItems/itemsDetail.html

+ 52
- 31
static/js/project/listingItems/items2.js Visa fil

@@ -119,6 +119,8 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi', 'swiper'], function
$("#friendsLinksContent").html(friendsLinksData); $("#friendsLinksContent").html(friendsLinksData);
} }
} }

var t = 3;
module.dataCompare = function(signupStartTime,signupStopTime,biddingStartTime,biddingStopTime){ module.dataCompare = function(signupStartTime,signupStopTime,biddingStartTime,biddingStopTime){
// console.log('aaaaaaaaaaa') // console.log('aaaaaaaaaaa')
var signupStartTime = signupStartTime; var signupStartTime = signupStartTime;
@@ -165,6 +167,20 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi', 'swiper'], function
// console.log('<span>距竞价结束还有:'+d+'</span>天<span>'+h+'</span>时<span>'+m+'</span>分<span>'+s+'</span>秒') // console.log('<span>距竞价结束还有:'+d+'</span>天<span>'+h+'</span>时<span>'+m+'</span>分<span>'+s+'</span>秒')
$('#countType').html('竞价中') $('#countType').html('竞价中')
$('#countDown').html('<span>距竞价结束还有:'+d+'</span>天<span>'+h+'</span>时<span>'+m+'</span>分<span>'+s+'</span>秒') $('#countDown').html('<span>距竞价结束还有:'+d+'</span>天<span>'+h+'</span>时<span>'+m+'</span>分<span>'+s+'</span>秒')
if(module.data.outProjectInformationDetail.biddingType != '自由竞价' && module.data.biddingTimeType != 2){
document.getElementById('showNowMoney').style.display = 'table-row';
var timName = document.getElementById('timeDown');
if(timName) {
document.getElementById('timeDown').style.display = 'inline-block';
timName.innerHTML = t + '<b style="color: #666666">秒后自动刷新</b>';
}
t--;
if (t < 0) {
t = 3;
tools.doGet(biddinglist, {projectId: getQueryVariable('id')}, module.biddinglistInformation, true);
}
}

}else if (nowTime>Date.parse(biddingStopTime)){ }else if (nowTime>Date.parse(biddingStopTime)){
//竞价结束 //竞价结束
$('#countType').html('') $('#countType').html('')
@@ -347,33 +363,33 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi', 'swiper'], function
setTimeout(function(){ setTimeout(function(){
var outProjectInformationData = template('outProjectInformationData', module.data); var outProjectInformationData = template('outProjectInformationData', module.data);
$("#outProjectInformationContent").html(outProjectInformationData); $("#outProjectInformationContent").html(outProjectInformationData);
var timName = document.getElementById('timeDown');
if(timName){
var t = 3;
module.data.timeDown = setInterval(function(){
// console.log($('#countType').html())
// if ($('#countType').html()!='竞价中'){
// clearInterval(module.data.timeDown)
// document.getElementById('timeDown').style.display = 'none';
// return;
// }
timName.innerHTML = t+'<b style="color: #666666">秒后自动刷新</b>';
t--;
document.getElementById('timeDown').style.display = 'inline-block';
if(t<0){
t = 3;
let biddingStartTime = content.biddingStartTime;
let biddingStopTime = content.biddingStopTime;
var nowTime = Date.parse(new Date());
if(Date.parse(biddingStartTime)<nowTime&&nowTime<Date.parse(biddingStopTime)){
//正在竞价
//交易项目竞价记录
tools.doGet(biddinglist, {projectId:getQueryVariable('id')}, module.biddinglistInformation,true);
}
}
}, 1000)
}
// var timName = document.getElementById('timeDown');
// if(timName){
// var t = 3;
//
// module.data.timeDown = setInterval(function(){
// // console.log($('#countType').html())
// // if ($('#countType').html()!='竞价中'){
// // clearInterval(module.data.timeDown)
// // document.getElementById('timeDown').style.display = 'none';
// // return;
// // }
// timName.innerHTML = t+'<b style="color: #666666">秒后自动刷新</b>';
// t--;
// document.getElementById('timeDown').style.display = 'inline-block';
// if(t<0){
// t = 3;
// let biddingStartTime = content.biddingStartTime;
// let biddingStopTime = content.biddingStopTime;
// var nowTime = Date.parse(new Date());
// if(Date.parse(biddingStartTime)<nowTime&&nowTime<Date.parse(biddingStopTime)){
// //正在竞价
// //交易项目竞价记录
// tools.doGet(biddinglist, {projectId:getQueryVariable('id')}, module.biddinglistInformation,true);
// }
// }
// }, 1000)
// }
},2000) },2000)


$("#know").html(module.data.know); $("#know").html(module.data.know);
@@ -599,6 +615,12 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi', 'swiper'], function
module.biddinglistInformation = function (data) { module.biddinglistInformation = function (data) {
if (data.code == 200) { if (data.code == 200) {
var content = data.rows; var content = data.rows;
if (content.length>0){
console.log('abccba')
$("#nowMoneyBlock").html('<span id="nowMoney">'+content[0].money+'</span> 元');
}else{
$("#nowMoneyBlock").html('暂无出价');
}
if(module.data.biddinglistInformationDetailLength == content.length){ if(module.data.biddinglistInformationDetailLength == content.length){
return; return;
} }
@@ -637,10 +659,9 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi', 'swiper'], function
module.data.biddinglistInformationDetailLength = content.length; module.data.biddinglistInformationDetailLength = content.length;
var biddinglistInformationData = template('biddinglistInformationData', module.data); var biddinglistInformationData = template('biddinglistInformationData', module.data);
$("#tabDetail4").html(biddinglistInformationData); $("#tabDetail4").html(biddinglistInformationData);
if (content.length>0){$("#nowMoney").html(content[0].money);}



if (content.length>0){
console.log('abccba')
$("#nowMoneyBlock").html('<span id="nowMoney">'+content[0].money+'</span> 元');}
} }
} }




+ 3
- 3
view/listingItems/itemsDetail.html Visa fil

@@ -228,11 +228,11 @@
<td>保证金</td> <td>保证金</td>
<td><span>{{outProjectInformationDetail.deposit}}</span> 元</td> <td><span>{{outProjectInformationDetail.deposit}}</span> 元</td>
</tr> </tr>
{{if outProjectInformationDetail.biddingType != '自由竞价' && biddinglistInformationDetail.length>0}}
<tr>
{{if outProjectInformationDetail.biddingType != '自由竞价'}}
<tr id="showNowMoney" style="display: none;">
<td>当前价格</td> <td>当前价格</td>
<td> <td>
<span id="nowMoney">{{biddinglistInformationDetail[0].money}}</span> 元
<b id="nowMoneyBlock"></b>
<span style="display: none;" id="timeDown"></span> <span style="display: none;" id="timeDown"></span>
</td> </td>
</tr> </tr>


Laddar…
Avbryt
Spara