ソースを参照

产权交易

newProperty
庞东旭 1年前
コミット
4ebf42cd48
2個のファイルの変更32行の追加29行の削除
  1. +9
    -9
      static/js/project/bidding/biddingBigDataDetail.js
  2. +23
    -20
      static/js/project/listingItems/items2.js

+ 9
- 9
static/js/project/bidding/biddingBigDataDetail.js ファイルの表示

@@ -24,11 +24,14 @@ define(['jquery', "template", "Tools", "biddingApi", "itemsApi"], function ($, t


tools.doGet(webConfig, {}, module.webConfigInformation, true) tools.doGet(webConfig, {}, module.webConfigInformation, true)


$("#nowDateNYR").html(new Date().getFullYear()+'.'+(new Date().getMonth()+1)+'.'+new Date().getDate())
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 () { setInterval(function () {
$("#nowDateSFM").html(new Date().toLocaleTimeString());
$("#nowTime").html('服务器时间:'+new Date().getFullYear()+'.'+(new Date().getMonth()+1)+'.'+new Date().getDate()+' '+new Date().toLocaleTimeString());
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) },1000)
tools.doGet(outProject + '/id/'+getQueryVariable('id'), {}, module.outProjectInformation,true); tools.doGet(outProject + '/id/'+getQueryVariable('id'), {}, module.outProjectInformation,true);


@@ -99,9 +102,6 @@ define(['jquery', "template", "Tools", "biddingApi", "itemsApi"], function ($, t
//交易项目竞价记录 //交易项目竞价记录
tools.doGet(biddinglist, {projectId:getQueryVariable('id')}, module.biddinglistInformation,true); tools.doGet(biddinglist, {projectId:getQueryVariable('id')}, module.biddinglistInformation,true);





//倒计时 //倒计时
module.data.timer = setInterval(function(){ module.data.timer = setInterval(function(){
let signupStartTime = module.data.outProjectInformationDetail.signupStartTime; let signupStartTime = module.data.outProjectInformationDetail.signupStartTime;
@@ -109,7 +109,7 @@ define(['jquery', "template", "Tools", "biddingApi", "itemsApi"], function ($, t
let biddingStartTime = module.data.outProjectInformationDetail.biddingStartTime; let biddingStartTime = module.data.outProjectInformationDetail.biddingStartTime;
let biddingStopTime = module.data.outProjectInformationDetail.biddingStopTime;//延时后结束时间 let biddingStopTime = module.data.outProjectInformationDetail.biddingStopTime;//延时后结束时间
let biddingStopSetime = module.data.outProjectInformationDetail.biddingStopSetime;//原始结束时间 let biddingStopSetime = module.data.outProjectInformationDetail.biddingStopSetime;//原始结束时间
var nowTime = Date.parse(new Date());
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 difference = Date.parse(biddingStopTime)-nowTime;//延时后时间差
var differenceSetime = Date.parse(biddingStopSetime)-nowTime;//原始时间差 var differenceSetime = Date.parse(biddingStopSetime)-nowTime;//原始时间差
@@ -194,7 +194,7 @@ define(['jquery', "template", "Tools", "biddingApi", "itemsApi"], function ($, t
var signupStopTime = signupStopTime; var signupStopTime = signupStopTime;
var biddingStartTime = biddingStartTime; var biddingStartTime = biddingStartTime;
var biddingStopTime = biddingStopTime; var biddingStopTime = biddingStopTime;
var nowTime = Date.parse(new Date());
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 beginTimes=signupStartTime.substring(0,10).split('-');
var endTimes=signupStopTime.substring(0,10).split('-'); var endTimes=signupStopTime.substring(0,10).split('-');
@@ -350,7 +350,7 @@ define(['jquery', "template", "Tools", "biddingApi", "itemsApi"], function ($, t
},true); },true);
var biddingStartTime = module.data.outProjectInformationDetail.biddingStartTime var biddingStartTime = module.data.outProjectInformationDetail.biddingStartTime
var biddingStopTime = module.data.outProjectInformationDetail.biddingStopTime; var biddingStopTime = module.data.outProjectInformationDetail.biddingStopTime;
var nowTime = Date.parse(new Date());
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 biddingBeginTimes=biddingStartTime.substring(0,10).split('-');
var biddingEndTimes=biddingStopTime.substring(0,10).split('-'); var biddingEndTimes=biddingStopTime.substring(0,10).split('-');


+ 23
- 20
static/js/project/listingItems/items2.js ファイルの表示

@@ -99,7 +99,7 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi', 'swiper'], function
module.webConfigInformation = function (data) { module.webConfigInformation = function (data) {
if (data.code == 200) { if (data.code == 200) {
var content = data.data; var content = data.data;
console.log(content)
//console.log(content)
//document.getElementById('time').innerHTML = '延时周期:'+content[8].configValue+content[8].remark+'<i class="wh">?</i>' //document.getElementById('time').innerHTML = '延时周期:'+content[8].configValue+content[8].remark+'<i class="wh">?</i>'
module.data.timeConfig = parseFloat(content[8].configValue); module.data.timeConfig = parseFloat(content[8].configValue);
module.data.titleConfig = content[9].configValue; module.data.titleConfig = content[9].configValue;
@@ -113,7 +113,7 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi', 'swiper'], function
module.bottomFriendsLinks = function (data) { module.bottomFriendsLinks = function (data) {
if (data.code == 200) { if (data.code == 200) {
var content = data.data; var content = data.data;
console.log(content)
//console.log(content)
module.data.friendsLinksList = content; module.data.friendsLinksList = content;
var friendsLinksData = template('friendsLinksData', module.data); var friendsLinksData = template('friendsLinksData', module.data);
$("#friendsLinksContent").html(friendsLinksData); $("#friendsLinksContent").html(friendsLinksData);
@@ -122,7 +122,7 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi', 'swiper'], function


var t = 3; 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;
var signupStopTime = signupStopTime; var signupStopTime = signupStopTime;
var biddingStartTime = biddingStartTime; var biddingStartTime = biddingStartTime;
@@ -489,6 +489,7 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi', 'swiper'], function


document.getElementById('moneyText').style.display = 'table-row'; document.getElementById('moneyText').style.display = 'table-row';
document.getElementById('moneyBtn').style.display = 'flex'; document.getElementById('moneyBtn').style.display = 'flex';
$('.swiperInput').css('display','block')
}else if( module.data.biddingTimeType == 3 ){ //判断当前竞价状态(竞价未开始) }else if( module.data.biddingTimeType == 3 ){ //判断当前竞价状态(竞价未开始)
document.getElementById('moneyText').style.display = 'none'; document.getElementById('moneyText').style.display = 'none';
document.getElementById('moneyBtn').style.display = 'none'; document.getElementById('moneyBtn').style.display = 'none';
@@ -540,8 +541,8 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi', 'swiper'], function
document.getElementById('signBtn2').style.display = 'block'; document.getElementById('signBtn2').style.display = 'block';
} }
} }
console.log(s+'-------------'+m)
if (s < 2 && m < 1){
//console.log(s+'-------------'+m)
if (s < 1 && m < 1){
console.log("竞价结束22222222222") console.log("竞价结束22222222222")
tools.doGet(getBiddingStopTime+getQueryVariable('id'), {}, function(data){ tools.doGet(getBiddingStopTime+getQueryVariable('id'), {}, function(data){
if (data.code == 200) { if (data.code == 200) {
@@ -551,11 +552,13 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi', 'swiper'], function
let timeNew = Date.parse(data.data) + 0 - nowDate; let timeNew = Date.parse(data.data) + 0 - nowDate;
if (timeNew > 0) { if (timeNew > 0) {
module.data.outProjectInformationDetail.biddingStopTime = data.data; module.data.outProjectInformationDetail.biddingStopTime = data.data;
// module.dataCompare(signupStartTime,signupStopTime,biddingStartTime,data.data);
$('.swiperInput').css('display','block')
// module.data.biddingTimeType = 1;
}else{ }else{
$('#countType').html('') $('#countType').html('')
$('#countDown').html('竞价结束') $('#countDown').html('竞价结束')
$('#timeDown').css('display','none'); $('#timeDown').css('display','none');
$('.swiperInput').css('display','none');
// document.getElementById('swiperType').style.display = 'none'; // document.getElementById('swiperType').style.display = 'none';
document.getElementById('biddingTable').style.display = 'table'; document.getElementById('biddingTable').style.display = 'table';
document.getElementById('biddingTitle').style.display = 'none'; document.getElementById('biddingTitle').style.display = 'none';
@@ -631,7 +634,7 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi', 'swiper'], function
if (data.code == 200) { if (data.code == 200) {
var content = data.rows; var content = data.rows;
if (content.length>0){ if (content.length>0){
console.log('abccba')
//console.log('abccba')
$("#nowMoneyBlock").html('<span id="nowMoney">'+content[0].money+'</span> 元'); $("#nowMoneyBlock").html('<span id="nowMoney">'+content[0].money+'</span> 元');
}else{ }else{
$("#nowMoneyBlock").html('暂无出价'); $("#nowMoneyBlock").html('暂无出价');
@@ -639,8 +642,8 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi', 'swiper'], function
if(module.data.biddinglistInformationDetailLength == content.length){ if(module.data.biddinglistInformationDetailLength == content.length){
return; return;
} }
console.log(module.data.outProjectInformationDetail.biddingDirect)
console.log(module.data.outProjectInformationDetail.biddingType)
//console.log(module.data.outProjectInformationDetail.biddingDirect)
//console.log(module.data.outProjectInformationDetail.biddingType)
setTimeout(function(){ setTimeout(function(){


if(module.data.outProjectInformationDetail.biddingType == '阶梯竞价'||module.data.outProjectInformationDetail.biddingType == '2'){ if(module.data.outProjectInformationDetail.biddingType == '阶梯竞价'||module.data.outProjectInformationDetail.biddingType == '2'){
@@ -675,7 +678,7 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi', 'swiper'], function
var biddinglistInformationData = template('biddinglistInformationData', module.data); var biddinglistInformationData = template('biddinglistInformationData', module.data);
$("#tabDetail4").html(biddinglistInformationData); $("#tabDetail4").html(biddinglistInformationData);
if (content.length>0){ if (content.length>0){
console.log('abccba')
//console.log('abccba')
$("#nowMoneyBlock").html('<span id="nowMoney">'+content[0].money+'</span> 元');} $("#nowMoneyBlock").html('<span id="nowMoney">'+content[0].money+'</span> 元');}
} }
} }
@@ -684,7 +687,7 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi', 'swiper'], function
module.biddinglistInformationNew = function (data) { module.biddinglistInformationNew = function (data) {
if (data.code == 200) { if (data.code == 200) {
var content = data.rows; var content = data.rows;
console.log(module.data.biddinglistInformationDetail.length+'----------------------'+content.length)
//console.log(module.data.biddinglistInformationDetail.length+'----------------------'+content.length)
if (module.data.biddinglistInformationDetailLength<content.length){ if (module.data.biddinglistInformationDetailLength<content.length){
let time = new Date(Date.parse(new Date())+(2 * 60 * 1000)); let time = new Date(Date.parse(new Date())+(2 * 60 * 1000));
const Y = time.getFullYear() const Y = time.getFullYear()
@@ -702,7 +705,7 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi', 'swiper'], function


//焦点图滚动 //焦点图滚动
module.swiperBanner = function (type) { module.swiperBanner = function (type) {
console.log('aaaa')
//console.log('aaaa')
var viewSwiper = new Swiper('.view .swiper-container', { var viewSwiper = new Swiper('.view .swiper-container', {
onSlideChangeStart: function() { onSlideChangeStart: function() {
updateNavPosition() updateNavPosition()
@@ -710,7 +713,7 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi', 'swiper'], function
}) })


$('.view .arrow-left,.preview .arrow-left').on('click', function(e) { $('.view .arrow-left,.preview .arrow-left').on('click', function(e) {
console.log('abc')
//console.log('abc')
e.preventDefault() e.preventDefault()
if (viewSwiper.activeIndex == 0) { if (viewSwiper.activeIndex == 0) {
viewSwiper.swipeTo(viewSwiper.slides.length - 1, 1000); viewSwiper.swipeTo(viewSwiper.slides.length - 1, 1000);
@@ -720,7 +723,7 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi', 'swiper'], function
}) })


$('.view .arrow-right,.preview .arrow-right').on('click', function(e) { $('.view .arrow-right,.preview .arrow-right').on('click', function(e) {
console.log('abc')
//console.log('abc')
e.preventDefault() e.preventDefault()
if (viewSwiper.activeIndex == viewSwiper.slides.length - 1) { if (viewSwiper.activeIndex == viewSwiper.slides.length - 1) {
viewSwiper.swipeTo(0, 1000); viewSwiper.swipeTo(0, 1000);
@@ -778,7 +781,7 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi', 'swiper'], function
module.biddingSubmitMethod = function (data2) { module.biddingSubmitMethod = function (data2) {
let newMoney; let newMoney;
if (data2.data&&data2.code==200){ if (data2.data&&data2.code==200){
console.log(data2)
//console.log(data2)
newMoney = data2.data; newMoney = data2.data;
}else{ }else{
newMoney = module.data.outProjectInformationDetail.price; newMoney = module.data.outProjectInformationDetail.price;
@@ -863,9 +866,9 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi', 'swiper'], function
module.data.biddingTimeType = 2; module.data.biddingTimeType = 2;
return; return;
} }
tools.initError('出价成功');
} }
},true); },true);
tools.initError('出价成功');
// $('#money').val(0) // $('#money').val(0)
} }


@@ -897,8 +900,8 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi', 'swiper'], function
module.projectTypeDictionaries = function (data) { module.projectTypeDictionaries = function (data) {
if (data.code == 200 && module.data.outProjectInformationDetail.projectType!='') { if (data.code == 200 && module.data.outProjectInformationDetail.projectType!='') {
var content = data.data; var content = data.data;
console.log(content)
console.log((module.data.outProjectInformationDetail.projectType-1))
//console.log(content)
//console.log((module.data.outProjectInformationDetail.projectType-1))
var projectType = content[(module.data.outProjectInformationDetail.projectType-1)].dictLabel; var projectType = content[(module.data.outProjectInformationDetail.projectType-1)].dictLabel;
module.data.outProjectInformationDetail.projectType = projectType; module.data.outProjectInformationDetail.projectType = projectType;
var outProjectInformationData = template('outProjectInformationData', module.data); var outProjectInformationData = template('outProjectInformationData', module.data);
@@ -1023,7 +1026,7 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi', 'swiper'], function
newMoney = module.data.outProjectInformationDetail.price; newMoney = module.data.outProjectInformationDetail.price;
} }


console.log(newMoney);
//console.log(newMoney);
var data = {}; var data = {};
var projectId = getQueryVariable('id'); var projectId = getQueryVariable('id');
var memberId = tools.getCookie('memberId'); var memberId = tools.getCookie('memberId');
@@ -1075,7 +1078,7 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi', 'swiper'], function


$('#money').val() == null||$('#money').val() == ''?$('#money').val(0):''; $('#money').val() == null||$('#money').val() == ''?$('#money').val(0):'';


console.log($('#money').val())
//console.log($('#money').val())


module.data.outProjectInformationDetail.ladderPrice?$('#money').val((parseFloat($('#money').val())+parseFloat(module.data.outProjectInformationDetail.ladderPrice)).toFixed(2)):document.getElementById('money').value += 1 module.data.outProjectInformationDetail.ladderPrice?$('#money').val((parseFloat($('#money').val())+parseFloat(module.data.outProjectInformationDetail.ladderPrice)).toFixed(2)):document.getElementById('money').value += 1




読み込み中…
キャンセル
保存