网站
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 
 

464 lignes
25 KiB

  1. /**
  2. * Created by Administrator on 2021/4/5.
  3. */
  4. define(['jquery', "template", "Tools", "biddingApi", "itemsApi"], function ($, template, Tools ) {
  5. //数据存储
  6. var module = {
  7. data: {
  8. timeArray: {
  9. d: '',
  10. h: '',
  11. m: '',
  12. s: '',
  13. },
  14. timer:null,
  15. setimer:null,
  16. outProjectInformationDetail:{}
  17. },
  18. };
  19. var tools = new Tools();
  20. module.init = function (page) {
  21. tools.doGet(outProject + '/id/'+getQueryVariable('id'), {}, module.outProjectInformation,true);
  22. tools.doGet(webConfig, {}, module.webConfigInformation, true)
  23. var nowTime = new Date($.ajax({type:'HEAD',async:false,data:{i: Date.parse(new Date())}}).getResponseHeader("Date"));
  24. $("#nowDateNYR").html(nowTime.getFullYear()+'.'+(nowTime.getMonth()+1)+'.'+nowTime.getDate())
  25. setInterval(function () {
  26. var nowTime = new Date($.ajax({type:'HEAD',async:false,data:{i: Date.parse(new Date())}}).getResponseHeader("Date"));
  27. $("#nowDateSFM").html(nowTime.toLocaleTimeString());
  28. $("#nowTime").html('服务器时间:'+nowTime.getFullYear()+'.'+(nowTime.getMonth()+1)+'.'+nowTime.getDate()+' '+nowTime.toLocaleTimeString());
  29. },1000)
  30. tools.doGet(outProject + '/id/'+getQueryVariable('id'), {}, module.outProjectInformation,true);
  31. if (getQueryVariable('type') == 'Y'){
  32. setInterval(function (){
  33. tools.doGet(biddinglist, {projectId:getQueryVariable('id')}, module.biddinglistInformation,true);
  34. tools.doGet(outProject + '/id/'+getQueryVariable('id'), {}, module.outProjectInformation2,true);
  35. },5000)
  36. }
  37. };
  38. //获取地址栏参数
  39. function getQueryVariable(variable){
  40. var query = window.location.search.substring(1);
  41. var vars = query.split("&");
  42. for (var i=0;i<vars.length;i++) {
  43. var pair = vars[i].split("=");
  44. if(pair[0] == variable){return pair[1];}
  45. }
  46. return(false);
  47. }
  48. //获取地址栏参数
  49. rechSelect = function (){
  50. tools.doGet(outProject + '/id/'+getQueryVariable('id'), {}, module.outProjectInformation,true);
  51. }
  52. //项目基本信息
  53. module.outProjectInformation = function (data) {
  54. if (data.code == 200) {
  55. var content = data.data;
  56. module.data.outProjectInformationDetail = content;
  57. // var outProjectInformationData = template('outProjectInformationData', module.data);
  58. // $("#outProjectInformationContent").html(outProjectInformationData);
  59. //挂牌价格字典
  60. tools.doGet(Dictionaries+'/price_unit', {}, (data)=>{
  61. if (data.code == 200) {
  62. var unit = eval(data.data).filter(function (e) { return e.dictValue == content.unit;})[0].dictLabel;
  63. module.data.outProjectInformationDetail.unit = unit;
  64. var outProjectInformationData = template('outProjectInformationData', module.data);
  65. $("#outProjectInformationContent").html(outProjectInformationData);
  66. var outProjectInformationData2 = template('outProjectInformationData2', module.data);
  67. $("#outProjectInformationContent2").html(outProjectInformationData2);
  68. }
  69. },true);
  70. //竞价方式字典
  71. tools.doGet(Dictionaries+'/bidding_type', {}, (data)=>{
  72. if (data.code == 200) {
  73. var biddingType = eval(data.data).filter(function (e) { return e.dictValue == content.biddingType;})[0].dictLabel;
  74. module.data.outProjectInformationDetail.biddingType = biddingType;
  75. var outProjectInformationData = template('outProjectInformationData', module.data);
  76. $("#outProjectInformationContent").html(outProjectInformationData);
  77. var outProjectInformationData2 = template('outProjectInformationData2', module.data);
  78. $("#outProjectInformationContent2").html(outProjectInformationData2);
  79. }
  80. },true);
  81. //期满处理字典
  82. tools.doGet(Dictionaries+'/bidding_direct', {}, (data)=>{
  83. if (data.code == 200) {
  84. var biddingDirect = eval(data.data).filter(function (e) { return e.dictValue == content.biddingDirect;})[0].dictLabel;
  85. module.data.outProjectInformationDetail.biddingDirect = biddingDirect;
  86. var outProjectInformationData = template('outProjectInformationData', module.data);
  87. $("#outProjectInformationContent").html(outProjectInformationData);
  88. var outProjectInformationData2 = template('outProjectInformationData2', module.data);
  89. $("#outProjectInformationContent2").html(outProjectInformationData2);
  90. }
  91. },true);
  92. //交易项目竞价记录
  93. tools.doGet(biddinglist, {projectId:getQueryVariable('id')}, module.biddinglistInformation,true);
  94. //倒计时
  95. module.data.timer = setInterval(function(){
  96. let signupStartTime = module.data.outProjectInformationDetail.signupStartTime;
  97. let signupStopTime = module.data.outProjectInformationDetail.signupStopTime;
  98. let biddingStartTime = module.data.outProjectInformationDetail.biddingStartTime;
  99. let biddingStopTime = module.data.outProjectInformationDetail.biddingStopTime;//延时后结束时间
  100. let biddingStopSetime = module.data.outProjectInformationDetail.biddingStopSetime;//原始结束时间
  101. var nowTime = Date.parse(new Date($.ajax({type:'HEAD',async:false,data:{i: Date.parse(new Date())}}).getResponseHeader("Date")));
  102. var difference = Date.parse(biddingStopTime)-nowTime;//延时后时间差
  103. var differenceSetime = Date.parse(biddingStopSetime)-nowTime;//原始时间差
  104. var centerTime = content.delayPeriod * 1000//延时周期
  105. var m,s;
  106. m = Math.floor(difference/1000/60%60);
  107. s = Math.floor(difference/1000%60);
  108. if ( differenceSetime <= 0 && difference >= 0 && difference <= centerTime){
  109. module.dataCompare(signupStartTime,signupStopTime,biddingStartTime,biddingStopTime);
  110. if (s < 2 && m < 1){
  111. console.log("竞价结束22222222222")
  112. tools.doGet(getBiddingStopTime+getQueryVariable('id'), {}, function(data){
  113. if (data.code == 200) {
  114. module.data.outProjectInformationDetail.biddingStopTime = data.data
  115. let timeNew = Date.parse(data.data) + 0 - nowTime;
  116. if (timeNew > 0) {
  117. module.data.outProjectInformationDetail.biddingStopTime = data.data;
  118. }else{
  119. $('#countDown').html('竞价结束')
  120. return;
  121. }
  122. }
  123. },true);
  124. }else if(s%2 == 0&&centerTime!=0){
  125. tools.doGet(getBiddingStopTime+getQueryVariable('id'), {}, (data)=>{
  126. if (data.code == 200) {
  127. module.data.outProjectInformationDetail.biddingStopTime = data.data
  128. }
  129. },true);
  130. }
  131. }else{
  132. module.dataCompare(signupStartTime,signupStopTime,biddingStartTime,biddingStopSetime);
  133. }
  134. },1000);
  135. }
  136. }
  137. //项目基本信息
  138. module.outProjectInformation2 = function (data) {
  139. if (data.code == 200) {
  140. var content = data.data;
  141. $("#bmrs").html(content.bidderNum);
  142. $("#cjcs").html(content.bidPriceNum);
  143. $("#jssj").html(content.biddingStopTime);
  144. }
  145. }
  146. //竞价记录
  147. module.biddinglistInformation = function (data) {
  148. if (data.code == 200) {
  149. //console.log(data)
  150. var content = data.rows;
  151. // for (var i = 0; i < content.length-1; i++) {
  152. // for (var j = 0; j < content.length - 1 - i; j++) {
  153. // // 相邻元素两两对比,元素交换,大的元素交换到后面
  154. // if (content[j].money < content[j + 1].money) {
  155. // var temp = content[j];
  156. // content[j] = content[j+1];
  157. // content[j+1] = temp;
  158. // }
  159. // }
  160. // }
  161. //console.log(content)
  162. module.data.biddinglistInformationDetail = content;
  163. var biddingInformationData = template('biddingInformationData', module.data);
  164. $("#biddingInformationContent").html(biddingInformationData);
  165. if (content.length > 0){
  166. $("#biddingPeople").html(content[0].memberId);
  167. $("#biddingMoney").html(content[0].money+module.data.outProjectInformationDetail.unit);
  168. }else{
  169. $("#biddingPeople").html('无');
  170. $("#biddingMoney").html('无');
  171. }
  172. }
  173. }
  174. module.dataCompare = function(signupStartTime,signupStopTime,biddingStartTime,biddingStopTime){
  175. var signupStartTime = signupStartTime;
  176. var signupStopTime = signupStopTime;
  177. var biddingStartTime = biddingStartTime;
  178. var biddingStopTime = biddingStopTime;
  179. var nowTime = Date.parse(new Date($.ajax({type:'HEAD',async:false,data:{i: Date.parse(new Date())}}).getResponseHeader("Date")));
  180. var beginTimes=signupStartTime.substring(0,10).split('-');
  181. var endTimes=signupStopTime.substring(0,10).split('-');
  182. var biddingBeginTimes=biddingStartTime.substring(0,10).split('-');
  183. var biddingEndTimes=biddingStopTime.substring(0,10).split('-');
  184. signupStartTime=beginTimes[1]+'/'+beginTimes[2]+'/'+beginTimes[0]+' '+signupStartTime.substring(10,19);
  185. signupStopTime=endTimes[1]+'/'+endTimes[2]+'/'+endTimes[0]+' '+signupStopTime.substring(10,19);
  186. biddingStartTime=biddingBeginTimes[1]+'/'+biddingBeginTimes[2]+'/'+biddingBeginTimes[0]+' '+biddingStartTime.substring(10,19);
  187. biddingStopTime=biddingEndTimes[1]+'/'+biddingEndTimes[2]+'/'+biddingEndTimes[0]+' '+biddingStopTime.substring(10,19);
  188. //时间差
  189. var leftTime = Date.parse(biddingStopTime)-nowTime;
  190. //报名开始时间差
  191. var signupLeftTime = Date.parse(signupStartTime)-nowTime;
  192. //报名结束时间差
  193. var signDownLeftTime = Date.parse(signupStopTime)-nowTime;
  194. var centerTime = module.data.delayPeriod * 1000//延时周期
  195. //定义变量 d,h,m,s保存倒计时的时间
  196. var d,h,m,s;
  197. if(Date.parse(biddingStartTime)<nowTime&&nowTime<Date.parse(biddingStopTime)){
  198. //正在竞价
  199. module.data.biddingTimeType = 1;
  200. $('#d0').html(
  201. (
  202. (Math.floor(leftTime / 1000 / 60 / 60 / 24) + '').length < 2 ?
  203. '00' + Math.floor(leftTime / 1000 / 60 / 60 / 24) :
  204. (Math.floor(leftTime / 1000 / 60 / 60 / 24) + '').length < 3 ?
  205. '0' + Math.floor(leftTime / 1000 / 60 / 60 / 24) :
  206. Math.floor(leftTime / 1000 / 60 / 60 / 24) + ''
  207. )[0]
  208. );
  209. $('#d1').html(
  210. (
  211. (Math.floor(leftTime / 1000 / 60 / 60 / 24) + '').length < 2 ?
  212. '00' + Math.floor(leftTime / 1000 / 60 / 60 / 24) :
  213. (Math.floor(leftTime / 1000 / 60 / 60 / 24) + '').length < 3 ?
  214. '0' + Math.floor(leftTime / 1000 / 60 / 60 / 24) :
  215. Math.floor(leftTime / 1000 / 60 / 60 / 24) + ''
  216. )[1]
  217. );
  218. $('#d2').html(
  219. (
  220. (Math.floor(leftTime / 1000 / 60 / 60 / 24) + '').length < 2 ?
  221. '00' + Math.floor(leftTime / 1000 / 60 / 60 / 24) :
  222. (Math.floor(leftTime / 1000 / 60 / 60 / 24) + '').length < 3 ?
  223. '0' + Math.floor(leftTime / 1000 / 60 / 60 / 24) :
  224. Math.floor(leftTime / 1000 / 60 / 60 / 24) + ''
  225. )[2]
  226. );
  227. $('#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]);
  228. $('#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]);
  229. $('#m0').html(((Math.floor(leftTime / 1000 / 60 % 60) + '').length < 2 ? '0' + Math.floor(leftTime / 1000 / 60 % 60) : Math.floor(leftTime / 1000 / 60 % 60) + '')[0]);
  230. $('#m1').html(((Math.floor(leftTime / 1000 / 60 % 60) + '').length < 2 ? '0' + Math.floor(leftTime / 1000 / 60 % 60) : Math.floor(leftTime / 1000 / 60 % 60) + '')[1]);
  231. $('#s0').html(((Math.floor(leftTime / 1000 % 60) + '').length < 2 ? '0' + Math.floor(leftTime / 1000 % 60) : Math.floor(leftTime / 1000 % 60) + '')[0]);
  232. $('#s1').html(((Math.floor(leftTime / 1000 % 60) + '').length < 2 ? '0' + Math.floor(leftTime / 1000 % 60) : Math.floor(leftTime / 1000 % 60) + '')[1]);
  233. //tools.doGet(biddinglist, {projectId:getQueryVariable('id')}, module.biddinglistInformation,true);
  234. $('#countType').html('距竞价结束还有')
  235. }else if (nowTime>Date.parse(biddingStopTime)){
  236. //竞价结束
  237. $('#d0').html('0')
  238. $('#d1').html('0')
  239. $('#d2').html('0')
  240. $('#h0').html('0')
  241. $('#h1').html('0')
  242. $('#m0').html('0')
  243. $('#m1').html('0')
  244. $('#s0').html('0')
  245. $('#s1').html('0')
  246. $('#countType').html('竞价结束')
  247. module.data.biddingTimeType = 2;
  248. }else if (nowTime<Date.parse(biddingStartTime)){
  249. //竞价暂未开始
  250. $('#d0').html('0')
  251. $('#d1').html('0')
  252. $('#d2').html('0')
  253. $('#h0').html('0')
  254. $('#h1').html('0')
  255. $('#m0').html('0')
  256. $('#m1').html('0')
  257. $('#s0').html('0')
  258. $('#s1').html('0')
  259. $('#countType').html('暂未开始')
  260. module.data.biddingTimeType = 3;
  261. }
  262. if(Date.parse(signupStartTime)<nowTime&&nowTime<Date.parse(signupStopTime)){
  263. //正在报名
  264. module.data.signupTimeType = 1;
  265. $('#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]);
  266. $('#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]);
  267. $('#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]);
  268. $('#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]);
  269. $('#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]);
  270. $('#m0').html(((Math.floor(signDownLeftTime / 1000 / 60 % 60) + '').length < 2 ? '0' + Math.floor(leftTime / 1000 / 60 % 60) : Math.floor(leftTime / 1000 / 60 % 60) + '')[0]);
  271. $('#m1').html(((Math.floor(signDownLeftTime / 1000 / 60 % 60) + '').length < 2 ? '0' + Math.floor(leftTime / 1000 / 60 % 60) : Math.floor(leftTime / 1000 / 60 % 60) + '')[1]);
  272. $('#s0').html(((Math.floor(signDownLeftTime / 1000 % 60) + '').length < 2 ? '0' + Math.floor(leftTime / 1000 % 60) : Math.floor(leftTime / 1000 % 60) + '')[0]);
  273. $('#s1').html(((Math.floor(signDownLeftTime / 1000 % 60) + '').length < 2 ? '0' + Math.floor(leftTime / 1000 % 60) : Math.floor(leftTime / 1000 % 60) + '')[1]);
  274. $('#countType').html('距报名结束还有')
  275. }else if (nowTime>Date.parse(signupStopTime)){
  276. //报名结束
  277. module.data.signupTimeType = 2;
  278. }else if (nowTime<Date.parse(signupStartTime)){
  279. //报名暂未开始
  280. module.data.signupTimeType = 3;
  281. $('#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]);
  282. $('#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]);
  283. $('#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]);
  284. $('#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]);
  285. $('#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]);
  286. $('#m0').html(((Math.floor(signupLeftTime / 1000 / 60 % 60) + '').length < 2 ? '0' + Math.floor(leftTime / 1000 / 60 % 60) : Math.floor(leftTime / 1000 / 60 % 60) + '')[0]);
  287. $('#m1').html(((Math.floor(signupLeftTime / 1000 / 60 % 60) + '').length < 2 ? '0' + Math.floor(leftTime / 1000 / 60 % 60) : Math.floor(leftTime / 1000 / 60 % 60) + '')[1]);
  288. $('#s0').html(((Math.floor(signupLeftTime / 1000 % 60) + '').length < 2 ? '0' + Math.floor(leftTime / 1000 % 60) : Math.floor(leftTime / 1000 % 60) + '')[0]);
  289. $('#s1').html(((Math.floor(signupLeftTime / 1000 % 60) + '').length < 2 ? '0' + Math.floor(leftTime / 1000 % 60) : Math.floor(leftTime / 1000 % 60) + '')[1]);
  290. $('#countType').html('距报名开始还有')
  291. }
  292. // if(module.data.outProjectInformationDetail.biddingType != '拍卖' && module.data.biddingTimeType != 2){
  293. // document.getElementById('biddingTable').style.display = 'none';
  294. // document.getElementById('biddingTitle').style.display = 'block';
  295. // }
  296. }
  297. module.setimeDataCompare = function(){
  298. tools.doGet(getBiddingStopTime+getQueryVariable('id'), {}, (data)=>{
  299. if (data.code == 200) {
  300. module.data.outProjectInformationDetail.biddingStopTime = data.data
  301. }
  302. },true);
  303. var biddingStartTime = module.data.outProjectInformationDetail.biddingStartTime
  304. var biddingStopTime = module.data.outProjectInformationDetail.biddingStopTime;
  305. var nowTime = Date.parse(new Date($.ajax({type:'HEAD',async:false,data:{i: Date.parse(new Date())}}).getResponseHeader("Date")));
  306. var biddingBeginTimes=biddingStartTime.substring(0,10).split('-');
  307. var biddingEndTimes=biddingStopTime.substring(0,10).split('-');
  308. biddingStartTime=biddingBeginTimes[1]+'/'+biddingBeginTimes[2]+'/'+biddingBeginTimes[0]+' '+biddingStartTime.substring(10,19);
  309. biddingStopTime=biddingEndTimes[1]+'/'+biddingEndTimes[2]+'/'+biddingEndTimes[0]+' '+biddingStopTime.substring(10,19);
  310. //时间差
  311. var leftTime = Date.parse(biddingStopTime)-nowTime;
  312. //定义变量 d,h,m,s保存倒计时的时间
  313. var d,h,m,s;
  314. if(Date.parse(biddingStartTime)<nowTime&&nowTime<Date.parse(biddingStopTime)){
  315. //正在竞价
  316. module.data.biddingTimeType = 1;
  317. $('#d0').html(
  318. (
  319. (Math.floor(leftTime / 1000 / 60 / 60 / 24) + '').length < 2 ?
  320. '00' + Math.floor(leftTime / 1000 / 60 / 60 / 24) :
  321. (Math.floor(leftTime / 1000 / 60 / 60 / 24) + '').length < 3 ?
  322. '0' + Math.floor(leftTime / 1000 / 60 / 60 / 24) :
  323. Math.floor(leftTime / 1000 / 60 / 60 / 24) + ''
  324. )[0]
  325. );
  326. $('#d1').html(
  327. (
  328. (Math.floor(leftTime / 1000 / 60 / 60 / 24) + '').length < 2 ?
  329. '00' + Math.floor(leftTime / 1000 / 60 / 60 / 24) :
  330. (Math.floor(leftTime / 1000 / 60 / 60 / 24) + '').length < 3 ?
  331. '0' + Math.floor(leftTime / 1000 / 60 / 60 / 24) :
  332. Math.floor(leftTime / 1000 / 60 / 60 / 24) + ''
  333. )[1]
  334. );
  335. $('#d2').html(
  336. (
  337. (Math.floor(leftTime / 1000 / 60 / 60 / 24) + '').length < 2 ?
  338. '00' + Math.floor(leftTime / 1000 / 60 / 60 / 24) :
  339. (Math.floor(leftTime / 1000 / 60 / 60 / 24) + '').length < 3 ?
  340. '0' + Math.floor(leftTime / 1000 / 60 / 60 / 24) :
  341. Math.floor(leftTime / 1000 / 60 / 60 / 24) + ''
  342. )[2]
  343. );
  344. $('#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]);
  345. $('#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]);
  346. $('#m0').html(((Math.floor(leftTime / 1000 / 60 % 60) + '').length < 2 ? '0' + Math.floor(leftTime / 1000 / 60 % 60) : Math.floor(leftTime / 1000 / 60 % 60) + '')[0]);
  347. $('#m1').html(((Math.floor(leftTime / 1000 / 60 % 60) + '').length < 2 ? '0' + Math.floor(leftTime / 1000 / 60 % 60) : Math.floor(leftTime / 1000 / 60 % 60) + '')[1]);
  348. $('#s0').html(((Math.floor(leftTime / 1000 % 60) + '').length < 2 ? '0' + Math.floor(leftTime / 1000 % 60) : Math.floor(leftTime / 1000 % 60) + '')[0]);
  349. $('#s1').html(((Math.floor(leftTime / 1000 % 60) + '').length < 2 ? '0' + Math.floor(leftTime / 1000 % 60) : Math.floor(leftTime / 1000 % 60) + '')[1]);
  350. let d,h,m,s;
  351. d = Math.floor(leftTime / 1000 / 60 / 60 / 24);
  352. h = Math.floor(leftTime / 1000 / 60 / 60 % 24);
  353. m = Math.floor(leftTime / 1000 / 60 % 60);
  354. s = Math.floor(leftTime / 1000 % 60);
  355. if (d<1&&h<1&&m<1&&s<1){
  356. console.log('竞价结束')
  357. clearInterval(module.data.setimer)
  358. }
  359. //tools.doGet(biddinglist, {projectId:getQueryVariable('id')}, module.biddinglistInformation,true);
  360. $('#countType').html('距竞价结束还有')
  361. }
  362. }
  363. //网站配置信息
  364. module.webConfigInformation = function (data) {
  365. if (data.code == 200) {
  366. var content = data.data;
  367. //console.log(content)
  368. //document.getElementById('time').innerHTML = '延时周期:'+content[8].configValue+content[8].remark+'<i class="wh">?</i>'
  369. module.data.timeConfig = content[8].configValue;
  370. module.data.titleConfig = content[9].configValue;
  371. module.data.importantTitle = content[7].configName+':'+ content[7].configValue.substr(3).substr(0,(content[7].configValue.substr(3).length-4));
  372. module.data.know = content[6].configValue;
  373. $("#know").html(content[6].configValue + '<span style="margin-left: 10px;"></span>' + content[6].configValue);
  374. }
  375. }
  376. module.biddingDirectDictionaries = function (data) {
  377. if (data.code == 200 && module.data.outProjectInformationDetail.biddingDirect!='') {
  378. var content = data.data;
  379. var biddingDirect = eval(content).filter(function (e) { return e.dictValue == module.data.outProjectInformationDetail.biddingDirect;})[0].dictLabel;
  380. module.data.outProjectInformationDetail.biddingDirect = biddingDirect;
  381. }
  382. }
  383. module.unitDictionaries = function (data) {
  384. if (data.code == 200 && module.data.outProjectInformationDetail.unit!='') {
  385. var content = data.data;
  386. var unit = eval(content).filter(function (e) { return e.dictValue == module.data.outProjectInformationDetail.unit;})[0].dictLabel;
  387. module.data.outProjectInformationDetail.unit = unit;
  388. }
  389. }
  390. module.biddingTypeDictionaries = function (data) {
  391. if (data.code == 200 && module.data.outProjectInformationDetail.biddingType!='') {
  392. var content = data.data;
  393. console.log(eval(content).filter(function (e) { return e.dictValue == module.data.outProjectInformationDetail.biddingType;}))
  394. var biddingType = eval(content).filter(function (e) { return e.dictValue == module.data.outProjectInformationDetail.biddingType;})[0].dictLabel;
  395. module.data.outProjectInformationDetail.biddingType = biddingType;
  396. }
  397. }
  398. return module;
  399. });