网站
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

warrantDetail.js 5.9 KiB

3 jaren geleden
2 jaren geleden
3 jaren geleden
2 jaren geleden
3 jaren geleden
2 jaren geleden
3 jaren geleden
3 jaren geleden
2 jaren geleden
2 jaren geleden
2 jaren geleden
3 jaren geleden
3 jaren geleden
3 jaren geleden
3 jaren geleden
3 jaren geleden
3 jaren geleden
3 jaren geleden
3 jaren geleden
3 jaren geleden
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. /**
  2. * Created by Administrator on 2021/4/5.
  3. */
  4. define(['jquery', "template", "Tools", "announApi", "paging", 'swiper'], function ($, template, Tools ) {
  5. //数据存储
  6. var module = {
  7. data: {
  8. //焦点图数据
  9. focusListTop: [],
  10. announcementInformationDetail:'',
  11. },
  12. };
  13. var tools = new Tools();
  14. module.init = function (page) {
  15. //获取焦点图信息
  16. tools.doGet(websitePicture, {picType:1,status:0,orderByColumn:'picSort',isAsc:'desc'}, module.focusNewsTop , true);
  17. //底部友情链接
  18. tools.doGet(friendsLinks, {}, module.bottomFriendsLinks, true);
  19. //成交公告
  20. tools.doGet(jyqzSearch, {jyqzNum:getQueryVariable('searchKeyWord'),deptId:100}, module.announDetail,true);
  21. //网站配置信息(网站名称 底部联系方式 公安备案号 网站备案号)
  22. tools.getWebConfig();
  23. };
  24. //焦点图数据
  25. module.focusNewsTop = function (data) {
  26. if (data.code == 200) {
  27. let focusArray = [];
  28. if(data.data.length<1){
  29. focusArray.push({
  30. picUrl:'../../../static/images/banner1.png'
  31. },{
  32. picUrl:'../../../static/images/banner2.png'
  33. },{
  34. picUrl:'../../../static/images/banner3.png'
  35. })
  36. }else{
  37. data.data.forEach(res=>{
  38. focusArray.push({
  39. picUrl:'/api'+res.picUrl
  40. })
  41. })
  42. }
  43. module.data.focusListTop = focusArray;
  44. var bannerFocusDataTop = template('bannerFocusDataTop', module.data);
  45. $("#bannerFocusTopContent").html(bannerFocusDataTop);
  46. new Swiper('#bannerFocusWrapTop', {
  47. paginationClickable: true,
  48. autoplay : 4000,
  49. loop:true
  50. })
  51. }
  52. }
  53. //获取地址栏参数
  54. function getQueryVariable(variable){
  55. var query = window.location.search.substring(1);
  56. var vars = query.split("&");
  57. for (var i=0;i<vars.length;i++) {
  58. var pair = vars[i].split("=");
  59. if(pair[0] == variable){return pair[1];}
  60. }
  61. return(false);
  62. }
  63. //底部友情链接
  64. module.bottomFriendsLinks = function (data) {
  65. if (data.code == 200) {
  66. var content = data.data;
  67. //console.log(content)
  68. module.data.friendsLinksList = content;
  69. var friendsLinksData = template('friendsLinksData', module.data);
  70. $("#friendsLinksContent").html(friendsLinksData);
  71. }
  72. }
  73. module.announDetail = function(data){
  74. //console.log(data)
  75. module.data.jyqzNumOne = data.rows[0].jyqzNumOne
  76. module.data.jyqzNumTwo = data.rows[0].jyqzNumTwo
  77. tools.doGet(announDetail+'/'+data.rows[0].publicityId, {}, module.announInformation,true);
  78. }
  79. //项目公告数据
  80. module.announInformation = function (data) {
  81. if (data.code == 200) {
  82. var content = data.data;
  83. module.data.announcementInformationDetail = content;
  84. var announcementInformationData = template('announcementInformationData', module.data);
  85. $("#announcementInformationContent").html(announcementInformationData);
  86. //流转方向字典
  87. tools.doGet(Dictionaries+'/rollout_type', {}, module.circulationDictionaries,true);
  88. // //交易方式字典
  89. // tools.doGet(Dictionaries+'/deal_type', {}, module.transactionDictionaries,true);
  90. // //面积单位字典
  91. // tools.doGet(Dictionaries+'/area_unit', {}, module.areaDictionaries,true);
  92. // //成交价格字典
  93. // tools.doGet(Dictionaries+'/price_unit', {}, module.unitDictionaries,true);
  94. }
  95. }
  96. //流转方向
  97. module.circulationDictionaries = function (data) {
  98. if (data.code == 200) {
  99. var content = data.data;
  100. var rollout = content[(module.data.announcementInformationDetail.rollout-1)].dictLabel;
  101. module.data.announcementInformationDetail.rollout = rollout;
  102. var announcementInformationData = template('announcementInformationData', module.data);
  103. $("#announcementInformationContent").html(announcementInformationData);
  104. }
  105. }
  106. //交易方式
  107. module.transactionDictionaries = function (data) {
  108. if (data.code == 200) {
  109. var content = data.data;
  110. //console.log(content)
  111. var dealType = content[(module.data.announcementInformationDetail.dealType-1)].dictLabel;
  112. module.data.announcementInformationDetail.dealType = dealType;
  113. var announcementInformationData = template('announcementInformationData', module.data);
  114. $("#announcementInformationContent").html(announcementInformationData);
  115. }
  116. }
  117. //面积单位
  118. module.areaDictionaries = function (data) {
  119. if (data.code == 200) {
  120. var content = data.data;
  121. var allCountUnit = content[(module.data.announcementInformationDetail.allCountUnit-1)].dictLabel;
  122. module.data.announcementInformationDetail.allCountUnit = allCountUnit;
  123. var announcementInformationData = template('announcementInformationData', module.data);
  124. $("#announcementInformationContent").html(announcementInformationData);
  125. }
  126. }
  127. //成交价格单位
  128. module.unitDictionaries = function (data) {
  129. if (data.code == 200) {
  130. var content = data.data;
  131. var unit = content[(module.data.announcementInformationDetail.unit-1)].dictLabel;
  132. module.data.announcementInformationDetail.unit = unit;
  133. var announcementInformationData = template('announcementInformationData', module.data);
  134. $("#announcementInformationContent").html(announcementInformationData);
  135. }
  136. }
  137. return module;
  138. });