|
|
@@ -9,6 +9,7 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi', 'swiper'], function |
|
|
|
focusListTop: [], |
|
|
|
showImgInformationDetail:'', |
|
|
|
loginNow:'', |
|
|
|
isFirst:'', |
|
|
|
timer:null, |
|
|
|
biddinglistInformationDetailLength:-1, |
|
|
|
biddingTimeType:0, |
|
|
@@ -211,6 +212,7 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi', 'swiper'], function |
|
|
|
module.signup = function(data){ |
|
|
|
console.log(data) |
|
|
|
module.data.signup = data.data; |
|
|
|
module.data.isFirst = data.signup.isFirst; |
|
|
|
var outProjectInformationData = template('outProjectInformationData', module.data); |
|
|
|
$("#outProjectInformationContent").html(outProjectInformationData); |
|
|
|
} |
|
|
@@ -513,9 +515,9 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi', 'swiper'], function |
|
|
|
//出价 |
|
|
|
module.biddingSubmitMethod = function (data) { |
|
|
|
let newMoney; |
|
|
|
if (data.msg&&data.code==200){ |
|
|
|
if (data.data&&data.code==200){ |
|
|
|
console.log(data) |
|
|
|
newMoney = data.msg; |
|
|
|
newMoney = data.data; |
|
|
|
}else{ |
|
|
|
newMoney = module.data.outProjectInformationDetail.price; |
|
|
|
} |
|
|
@@ -533,7 +535,7 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi', 'swiper'], function |
|
|
|
//判断当前竞价方式 |
|
|
|
if (module.data.outProjectInformationDetail.biddingType=='阶梯竞价' || module.data.outProjectInformationDetail.biddingType=='公开竞价'){ |
|
|
|
//判断当前是否有人出价 |
|
|
|
if (data.msg){ |
|
|
|
if (data.data){ |
|
|
|
//判断用户出价不能高于当前出价最低价格 |
|
|
|
if(newMoney < $('#money').val()){ |
|
|
|
tools.initError('出价不能高于当前出价最低价格'); |
|
|
@@ -550,7 +552,7 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi', 'swiper'], function |
|
|
|
//判断当前竞价方式 |
|
|
|
if (module.data.outProjectInformationDetail.biddingType=='阶梯竞价' || module.data.outProjectInformationDetail.biddingType=='公开竞价'){ |
|
|
|
//判断当前是否有人出价 |
|
|
|
if (data.msg){ |
|
|
|
if (data.data){ |
|
|
|
//判断用户出价不能低于当前出价最高价格 |
|
|
|
if(newMoney > $('#money').val()){ |
|
|
|
tools.initError('出价不能低于当前出价最高价格'); |
|
|
@@ -566,7 +568,7 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi', 'swiper'], function |
|
|
|
var userId = tools.getCookie('userId'); |
|
|
|
var userAccount = tools.getCookie('phone'); |
|
|
|
var userName = tools.getCookie('userName'); |
|
|
|
var money = $('#money').val().toFixed(2); |
|
|
|
var money = parseInt($('#money').val()).toFixed(2); |
|
|
|
// var loginTime = tools.getNowFormatDate(); |
|
|
|
data['projectId'] = projectId; |
|
|
|
data['memberId'] = memberId; |
|
|
@@ -580,7 +582,7 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi', 'swiper'], function |
|
|
|
|
|
|
|
module.biddingSubmitOpen = function(){ |
|
|
|
tools.initError('出价成功'); |
|
|
|
$('#money').val(0) |
|
|
|
// $('#money').val(0) |
|
|
|
} |
|
|
|
|
|
|
|
//经济类型 |
|
|
@@ -724,6 +726,41 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi', 'swiper'], function |
|
|
|
tools.doGet(projectNewBidMoney+getQueryVariable('id'), {}, module.biddingSubmitMethod); |
|
|
|
} |
|
|
|
|
|
|
|
changeProMoneyFirst = function(){ |
|
|
|
tools.doGet(projectNewBidMoney+getQueryVariable('id'), {}, module.biddingSubmitMethodFirst); |
|
|
|
} |
|
|
|
|
|
|
|
//系统是否 |
|
|
|
module.biddingSubmitMethodFirst = function (data) { |
|
|
|
if (data.code == 200) { |
|
|
|
let newMoney; |
|
|
|
if (data.data){ |
|
|
|
newMoney = data.data; |
|
|
|
}else{ |
|
|
|
newMoney = module.data.outProjectInformationDetail.price; |
|
|
|
} |
|
|
|
|
|
|
|
console.log(newMoney); |
|
|
|
var data = {}; |
|
|
|
var projectId = getQueryVariable('id'); |
|
|
|
var memberId = tools.getCookie('memberId'); |
|
|
|
var userId = tools.getCookie('userId'); |
|
|
|
var userAccount = tools.getCookie('phone'); |
|
|
|
var userName = tools.getCookie('userName'); |
|
|
|
var money = parseInt(newMoney).toFixed(2); |
|
|
|
// var loginTime = tools.getNowFormatDate(); |
|
|
|
data['projectId'] = projectId; |
|
|
|
data['memberId'] = memberId; |
|
|
|
data['userId'] = userId; |
|
|
|
data['userAccount'] = userAccount; |
|
|
|
data['userName'] = userName; |
|
|
|
data['money'] = money; |
|
|
|
// data['loginTime'] = loginTime; |
|
|
|
tools.doPost(biddingSubmit, data, module.biddingSubmitOpen); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
//向上加价 |
|
|
|
upMoney = function(){ |
|
|
|
if (module.data.outProjectInformationDetail.biddingDirect == '反向竞价'){ |
|
|
|