网站
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.

index.js 27 KiB

il y a 4 ans
il y a 4 ans
il y a 4 ans
il y a 4 ans
il y a 4 ans
il y a 4 ans
il y a 4 ans
il y a 4 ans
il y a 4 ans
il y a 4 ans
il y a 2 ans
il y a 4 ans
il y a 4 ans
il y a 4 ans
il y a 4 ans
il y a 4 ans
il y a 4 ans
il y a 4 ans
il y a 4 ans
il y a 4 ans
il y a 2 ans
il y a 4 ans
il y a 2 ans
il y a 4 ans
il y a 4 ans
il y a 4 ans
il y a 4 ans
il y a 4 ans
il y a 4 ans
il y a 2 ans
il y a 2 ans
il y a 2 ans
il y a 4 ans
il y a 4 ans
il y a 4 ans
il y a 4 ans
il y a 4 ans
il y a 2 ans
il y a 4 ans
il y a 2 ans
il y a 4 ans
il y a 4 ans
il y a 4 ans
il y a 2 ans
il y a 4 ans
il y a 2 ans
il y a 4 ans
il y a 2 ans
il y a 4 ans
il y a 2 ans
il y a 4 ans
il y a 2 ans
il y a 4 ans
il y a 4 ans
il y a 4 ans
il y a 4 ans
il y a 2 ans
il y a 4 ans
il y a 4 ans
il y a 2 ans
il y a 4 ans
il y a 4 ans
il y a 4 ans
il y a 4 ans
il y a 4 ans
il y a 2 ans
il y a 2 ans
il y a 4 ans
il y a 4 ans
il y a 4 ans
il y a 4 ans
il y a 4 ans
il y a 4 ans
il y a 4 ans
il y a 4 ans
il y a 4 ans
il y a 4 ans
il y a 4 ans
il y a 4 ans
il y a 4 ans
il y a 4 ans
il y a 4 ans
il y a 2 ans
il y a 4 ans
il y a 3 ans
il y a 4 ans
il y a 4 ans
il y a 4 ans
il y a 2 ans
il y a 4 ans
il y a 4 ans
il y a 4 ans
il y a 4 ans
il y a 4 ans
il y a 4 ans
il y a 4 ans
il y a 4 ans
il y a 2 ans
il y a 4 ans
il y a 4 ans
il y a 4 ans
il y a 4 ans
il y a 4 ans
il y a 4 ans
il y a 4 ans
il y a 4 ans
il y a 3 ans
il y a 4 ans
il y a 3 ans
il y a 3 ans
il y a 3 ans
il y a 3 ans
il y a 3 ans
il y a 4 ans
il y a 4 ans
il y a 4 ans
il y a 4 ans
il y a 4 ans
il y a 4 ans
il y a 3 ans
il y a 4 ans
il y a 3 ans
il y a 3 ans
il y a 3 ans
il y a 3 ans
il y a 4 ans
il y a 4 ans
il y a 4 ans
il y a 3 ans
il y a 4 ans
il y a 4 ans
il y a 4 ans
il y a 4 ans
il y a 4 ans
il y a 4 ans
il y a 4 ans
il y a 2 ans
il y a 4 ans
il y a 3 ans
il y a 4 ans
il y a 3 ans
il y a 4 ans
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727
  1. /**
  2. * Created by Administrator on 2021/4/5.
  3. */
  4. define(['jquery', "template", "Tools", "echarts", 'swiper'], function ($, template, Tools, echarts, swiper) {
  5. //数据存储
  6. var module = {
  7. data: {
  8. //服务器地址
  9. serverApi:'',
  10. //焦点图数据
  11. focusList: [],
  12. //焦点图数据
  13. focusListTop: [],
  14. //底部焦点图
  15. focusListNext:[],
  16. //新闻资讯数据
  17. newsInformationList: [],
  18. //政策法规数据
  19. policiesRegulationsList: [],
  20. //交易规则数据
  21. tradingRulesList: [],
  22. //资料下载数据
  23. dataDownloadList: [],
  24. //标的物所在地
  25. deptLocationList:[],
  26. //标的物类型
  27. deptTypeList:[],
  28. //网站配置信息
  29. webConfigInformationList:[],
  30. //底部友情链接
  31. friendsLinksList:[],
  32. //土地林地四荒地数据
  33. landListList:[],
  34. //集体资产数据
  35. collectiveAssetsList:[],
  36. //小型水利设施数据
  37. waterConservancyFacilitiesList:[],
  38. //农业生产设备数据
  39. productionEquipmentList:[],
  40. //挂牌项目总浏览次数
  41. allViewCountList:[],
  42. //成交公示数据
  43. announcementListList:[],
  44. //鉴证公告数据
  45. attestationList:[]
  46. },
  47. //柱状图参数
  48. option: {
  49. xAxis: {
  50. type: 'category',
  51. axisLine: {
  52. show: true,
  53. lineStyle: {
  54. width: 1,
  55. type: "solid"
  56. }
  57. },
  58. axisLabel: { //设置x轴的字
  59. show: true,
  60. interval: 0,//使x轴横坐标全部显示
  61. textStyle: {//x轴字体样式
  62. margin: 15
  63. }
  64. },
  65. data: []
  66. },
  67. yAxis: {
  68. type: 'value',
  69. min: 400,
  70. max: 1000,
  71. splitNumber: 7,
  72. splitLine: {
  73. lineStyle: {
  74. type: 'dashed'
  75. }
  76. },
  77. axisLine: {
  78. show: true,
  79. lineStyle: {
  80. width: 1,
  81. type: "solid"
  82. }
  83. },
  84. },
  85. series: [{
  86. data: [],//实际值减300
  87. type: 'bar',
  88. itemStyle: {
  89. color: '#007b76'
  90. }
  91. }],
  92. grid: {
  93. height: 200,
  94. width: 230,
  95. top: '-5px'
  96. },
  97. tooltip: {
  98. trigger: "axis",
  99. axisPointer: {
  100. // 坐标轴指示器,坐标轴触发有效
  101. type: "shadow", // 默认为直线,可选为:'line' | 'shadow'
  102. },
  103. },
  104. }
  105. };
  106. var tools = new Tools();
  107. module.init = function (page) {
  108. //获取焦点图信息
  109. tools.doGet(websitePicture, {picType:1,status:0,orderByColumn:'picSort',isAsc:'desc'}, module.focusNewsTop , true);
  110. //获取焦点图信息
  111. tools.doGet(websitePicture, {picType:2,status:0,orderByColumn:'picSort',isAsc:'desc'}, module.focusNewsPC , true);
  112. //获取焦点图信息
  113. tools.doGet(websiteNew + '/1/0/4', {}, module.focusNews , true);
  114. //新闻资讯
  115. tools.doGet(websiteNew + '/2/0/6', {}, module.NewsInformation , true);
  116. //政策法规
  117. tools.doGet(websiteNew + '/3/0/6', {}, module.policiesRegulations , true);
  118. //交易规则
  119. tools.doGet(websiteNew + '/4/0/6', {}, module.tradingRules , true);
  120. //资料下载
  121. tools.doGet(websiteNew + '/5/0/6', {}, module.dataDownload, true);
  122. //标的物所在地
  123. // tools.doGet(webDept, {deptId:''}, module.deptLocation , true);
  124. //标的物类型
  125. tools.doGet(webDeptType+"/project_type", {}, module.deptType, true);
  126. //标的物类型下拉菜单
  127. // tools.doGet(webDeptType+"/project_type", {}, module.deptTypeSelect, true);
  128. //网站配置信息(网站名称 底部联系方式 公安备案号 网站备案号)
  129. tools.getWebConfig();
  130. //底部友情链接
  131. tools.doGet(friendsLinks, {}, module.bottomFriendsLinks, true);
  132. //供应项目
  133. tools.doGet(itemsList, {projectNumber:'',pageSize:'5',pageNum:'1'}, module.itemList, true);
  134. //需求项目
  135. tools.doGet(needProjectList, {projectNumber:'',pageSize:'5',pageNum:'1'}, module.itemLists, true);
  136. //农业生产设备
  137. // tools.doGet(webListing + '/9/0/5', {}, module.productionEquipment, true);
  138. //小型水利设施
  139. // tools.doGet(webListing + '/8/0/5', {}, module.waterConservancyFacilities, true);
  140. //查询挂牌项目浏览总次数
  141. // tools.doGet(allViewCount + '/100', {}, module.allViewCount, true);
  142. //查询挂牌项目浏览总次数
  143. tools.doGet(announcementList + '/0/4', {}, module.announcementList, true);
  144. //查询挂牌项目浏览总次数
  145. tools.doGet(biddingHallList + '/0/10', {}, module.biddingHallList, true);
  146. //查询挂牌项目浏览总次数
  147. tools.doGet(attestationList + '/0/5', {}, module.attestationList, true);
  148. //个人供求
  149. tools.doGet(supplyDemand + '/100/1/5', {}, module.supplyDemand, true);
  150. tools.doGet(supplyDemand + '/100/2/5', {}, module.supplyDemand2, true);
  151. //互动交流
  152. tools.doGet(communicateList + '/100/5/notnull', {}, module.communicateList, true);
  153. //土地挂牌价格走势统计图
  154. // tools.doGet(statistics, {deptId: 100}, module.statisticsContent, true);
  155. //竞价大厅-滚动
  156. module.hallRolling();
  157. setTimeout(function(){
  158. //主题图片切换
  159. module.switchTheme();
  160. },500)
  161. };
  162. //主题图片切换
  163. module.switchTheme = function(){
  164. if(themeColor == 'red'){
  165. document.getElementById('centerBanner').src = './static/images/centerBanner_red.jpg'
  166. document.getElementById('bannerBottom').src = './static/images/bannerBottom_red.jpg'
  167. }else if(themeColor == 'green'){
  168. document.getElementById('centerBanner').src = './static/images/centerBanner.jpg'
  169. document.getElementById('bannerBottom').src = './static/images/bannerBottom.jpg'
  170. }
  171. }
  172. //焦点图数据
  173. module.focusNewsTop = function (data) {
  174. if (data.code == 200) {
  175. module.data.focusListTop = data.data;
  176. var bannerFocusDataTop = template('bannerFocusDataTop', module.data);
  177. $("#bannerFocusTopContent").html(bannerFocusDataTop);
  178. new Swiper('#bannerFocusWrapTop', {
  179. paginationClickable: true,
  180. autoplay : 4000,
  181. loop:true
  182. })
  183. }
  184. }
  185. //焦点图数据
  186. module.focusNewsPC = function (data) {
  187. if (data.code == 200) {
  188. module.data.focusListPC = data.data;
  189. var bannerFocusDataPC = template('bannerFocusDataPC', module.data);
  190. $("#bannerFocusPCContent").html(bannerFocusDataPC);
  191. }
  192. }
  193. //焦点图数据
  194. module.focusNews = function (data) {
  195. if (data.code == 200) {
  196. var content = data.data;
  197. var focusList = [];
  198. for (var i = 0; i < content.length; i++) {
  199. var imgStrs = content[i].content.match(/<img.*?>/g)
  200. var title = content[i].title;
  201. var id = content[i].id;
  202. if (imgStrs != null && imgStrs != '') {
  203. focusList.push({img:imgStrs[0],title:title,id:id})
  204. }
  205. }
  206. //console.log(focusList)
  207. module.data.focusList = focusList;
  208. var bannerFocusData = template('bannerFocusData', module.data);
  209. $("#bannerFocusContent").html(bannerFocusData);
  210. new Swiper('#bannerFocusWrap', {
  211. pagination: '.page-pagination',
  212. paginationClickable: true,
  213. autoplay : 2000,
  214. loop:true
  215. })
  216. }
  217. }
  218. module.statisticsContent = function(data){
  219. //console.log(module.option)
  220. //console.log(data)
  221. module.data.nowPriceAvg = data.nowPriceAvg;
  222. module.data.priceRate = data.priceRate;
  223. var statisticsData = template('statisticsData', module.data);
  224. $("#statisticsContent").html(statisticsData);
  225. for (var i = 0 ; i < data.priceAvgList.length ; i++){
  226. module.option.xAxis.data[i] = data.priceAvgList[i].year
  227. module.option.series[0].data[i] = data.priceAvgList[i].price
  228. }
  229. // 柱状图绘制
  230. var chartDom = document.getElementById('chart');
  231. var myChart = echarts.init(chartDom);
  232. module.option && myChart.setOption(module.option);
  233. }
  234. //互动交流
  235. module.communicateList = function (data) {
  236. if (data.code == 200) {
  237. //console.log(data.data)
  238. var content = data.data;
  239. module.data.communicateList = content;
  240. var communicateData = template('communicateData', module.data);
  241. $("#communicateContent").html(communicateData);
  242. }
  243. }
  244. //新闻资讯数据
  245. module.NewsInformation = function (data) {
  246. if (data.code == 200) {
  247. var content = data.data;
  248. //console.log(content)
  249. module.data.newsInformationList = content;
  250. var NewsInformationData = template('NewsInformationData', module.data);
  251. $("#NewsInformationContent").html(NewsInformationData);
  252. }
  253. }
  254. //政策法规
  255. module.policiesRegulations = function (data) {
  256. if (data.code == 200) {
  257. var content = data.data;
  258. module.data.policiesRegulationsList = content;
  259. var policiesRegulationsData = template('policiesRegulationsData', module.data);
  260. $("#policiesRegulationsContent").html(policiesRegulationsData);
  261. }
  262. }
  263. //交易规则
  264. module.tradingRules = function (data) {
  265. if (data.code == 200) {
  266. var content = data.data;
  267. module.data.tradingRulesList = content;
  268. var tradingRulesData = template('tradingRulesData', module.data);
  269. $("#tradingRulesContent").html(tradingRulesData);
  270. }
  271. }
  272. //资料下载
  273. module.dataDownload = function (data) {
  274. if (data.code == 200) {
  275. var content = data.data;
  276. module.data.dataDownloadList = content;
  277. var dataDownloadData = template('dataDownloadData', module.data);
  278. $("#dataDownloadContent").html(dataDownloadData);
  279. }
  280. }
  281. //标的物所在地
  282. module.deptLocation = function (data) {
  283. console.log(data)
  284. if (data.code == 200) {
  285. var content = data.data ;
  286. var contentList = [];
  287. for (var i = 0 ; i < 5&&i<content.length ; i++){
  288. contentList[i] = content[i];
  289. }
  290. module.data.deptLocationList = contentList;
  291. var deptLocationData = template('deptLocationData', module.data);
  292. $("#deptLocationContent").html(deptLocationData);
  293. }
  294. }
  295. //标的物类型
  296. module.deptType = function (data) {
  297. if (data.code == 200) {
  298. var content = [] ;
  299. for (var i = 0 ; i < 4 ; i++){
  300. content[i] = data.data[i];
  301. }
  302. module.data.deptTypeList = content;
  303. var deptTypeData = template('deptTypeData', module.data);
  304. $("#deptTypeContent").html(deptTypeData);
  305. module.data.deptTypeList1 = content;
  306. var deptTypeData1 = template('deptTypeData1', module.data);
  307. $("#deptTypeContent1").html(deptTypeData1);
  308. }
  309. }
  310. //网站配置信息
  311. module.webConfigInformation = function (data) {
  312. if (data.code == 200) {
  313. var content = data.data;
  314. //console.log(content)
  315. $("#webConfigName").html(content[0].configValue);
  316. $("#webConfigRecord").html(content[1].configValue + content[2].configValue);
  317. $("#webConfigAddress").html(content[0].configValue+'&nbsp;'+content[3].configValue);
  318. }
  319. }
  320. //查询挂牌项目浏览总次数
  321. module.allViewCount = function (data) {
  322. if (data.code == 200) {
  323. var content = data.data;
  324. module.data.allViewCountList = content.toString().split("");
  325. var allViewCountData = template('allViewCountData', module.data);
  326. $("#allViewCount").html(allViewCountData);
  327. }
  328. }
  329. //底部友情链接
  330. module.bottomFriendsLinks = function (data) {
  331. if (data.code == 200) {
  332. var content = data.data;
  333. //console.log(content)
  334. module.data.friendsLinksList = content;
  335. var friendsLinksData = template('friendsLinksData', module.data);
  336. $("#friendsLinksContent").html(friendsLinksData);
  337. }
  338. }
  339. //土地林地四荒地
  340. module.landList = function (data) {
  341. if (data.code == 200) {
  342. module.data.serverApi = serverApi;
  343. var content = data.data;
  344. module.data.landListList = content;
  345. var landListData = template('landListData', module.data);
  346. $("#landListContent").html(landListData);
  347. }
  348. }
  349. module.itemList = function (data) {
  350. if (data.code == 200) {
  351. //console.log(data)
  352. module.data.serverApi = serverApi;
  353. var content = data.rows;
  354. module.data.landListList = content;
  355. var landListData = template('landListData', module.data);
  356. $("#landListContent").html(landListData);
  357. }
  358. }
  359. module.itemLists = function (data) {
  360. if (data.code == 200) {
  361. //console.log(data)
  362. module.data.serverApi = serverApi;
  363. var content = data.rows;
  364. module.data.collectiveAssetsList = content;
  365. var collectiveAssetsData = template('collectiveAssetsData', module.data);
  366. $("#collectiveAssetsContent").html(collectiveAssetsData);
  367. }
  368. }
  369. //土地林地四荒地
  370. goListingChange = function (id) {
  371. $('#deptTypeContent').children('span').removeClass('active') ;
  372. document.getElementById('tab'+id).className = 'm-r-20 active';
  373. if (id == 0){
  374. tools.doGet(itemsList, {projectNumber:'',pageSize:'5',pageNum:'1'}, module.itemList, true);
  375. }else{
  376. //土地
  377. tools.doGet(webListing + '/'+id+'/0/5', {}, module.landList, true);
  378. }
  379. }
  380. //土地林地四荒地
  381. goListingChanges = function (id) {
  382. $('#deptTypeContent1').children('span').removeClass('active') ;
  383. document.getElementById('tabs'+id).className = 'm-r-20 active';
  384. tools.doGet(needProjectList, {projectNumber:id==0?'':id,pageSize:'5',pageNum:'1'}, module.itemLists, true);
  385. }
  386. //集体资产
  387. module.collectiveAssets = function (data) {
  388. if (data.code == 200) {
  389. module.data.serverApi = serverApi;
  390. var content = data.data;
  391. module.data.collectiveAssetsList = content;
  392. var collectiveAssetsData = template('collectiveAssetsData', module.data);
  393. $("#collectiveAssetsContent").html(collectiveAssetsData);
  394. }
  395. }
  396. //小型水利设施
  397. module.waterConservancyFacilities = function (data) {
  398. if (data.code == 200) {
  399. module.data.serverApi = serverApi;
  400. var content = data.data;
  401. module.data.waterConservancyFacilitiesList = content;
  402. var waterConservancyFacilitiesData = template('waterConservancyFacilitiesData', module.data);
  403. $("#waterConservancyFacilitiesContent").html(waterConservancyFacilitiesData);
  404. }
  405. }
  406. //农业生产设备
  407. module.productionEquipment = function (data) {
  408. if (data.code == 200) {
  409. module.data.serverApi = serverApi;
  410. var content = data.data;
  411. module.data.productionEquipmentList = content;
  412. var productionEquipmentData = template('productionEquipmentData', module.data);
  413. $("#productionEquipmentContent").html(productionEquipmentData);
  414. }
  415. }
  416. //成交公示列表
  417. module.announcementList = function (data) {
  418. if (data.code == 200) {
  419. var content = data.data;
  420. module.data.announcementListList = content;
  421. var announcementListData = template('announcementListData', module.data);
  422. $("#announcementListContent").html(announcementListData);
  423. }
  424. }
  425. //鉴证公告列表
  426. module.attestationList = function (data) {
  427. if (data.code == 200) {
  428. var content = data.data;
  429. module.data.attestationList = content;
  430. var attestationData = template('attestationData', module.data);
  431. $("#attestationContent").html(attestationData);
  432. }
  433. }
  434. //竞价大厅列表
  435. module.biddingHallList = function (data) {
  436. if (data.code == 200) {
  437. var content = data.data;
  438. //console.log(content)
  439. module.data.biddingHallListList = content;
  440. for(var i = 0 ; i < content.length ; i++){
  441. if(content[i].biddingStopTime == null || content[i].biddingStartTime == null){continue;}
  442. var endTimes=content[i].biddingStopTime.substring(0,10).split('-');
  443. var biddingStopTime=endTimes[1]+'/'+endTimes[2]+'/'+endTimes[0]+' '+content[i].biddingStopTime.substring(10,19);
  444. var startTimes=content[i].biddingStartTime.substring(0,10).split('-');
  445. var biddingStartTime=startTimes[1]+'/'+startTimes[2]+'/'+startTimes[0]+' '+content[i].biddingStartTime.substring(10,19);
  446. var nowTime = Date.parse(new Date());
  447. var leftTime = Date.parse(biddingStopTime)-nowTime;
  448. var rightTime = Date.parse(biddingStartTime)-nowTime;
  449. //console.log(biddingStopTime)
  450. //console.log(leftTime)
  451. if(leftTime>0){
  452. //console.log('进行中')
  453. content[i].timeType = '进行中'
  454. }
  455. if(leftTime<0){
  456. //console.log('已结束')
  457. content[i].timeType = '已结束'
  458. }
  459. if(rightTime>0){
  460. //console.log('未开始')
  461. content[i].timeType = '未开始'
  462. }
  463. }
  464. //console.log(content)
  465. var biddingHallListData = template('biddingHallListData', module.data);
  466. $("#biddingHallListContent").html(biddingHallListData);
  467. }
  468. }
  469. ///竞价大厅-滚动
  470. module.hallRolling = function () {
  471. var divScroll = document.getElementById('tableList');
  472. window.onmousewheel = divScroll.onmousewheel = function () { return false }
  473. module.timeInter(divScroll);
  474. divScroll.onmouseover = function () {
  475. clearInterval(time);
  476. }
  477. divScroll.onmouseout = function () {
  478. module.timeInter(divScroll);
  479. }
  480. }
  481. //个人供求
  482. module.supplyDemand = function (data) {
  483. if (data.code == 200) {
  484. //console.log(data)
  485. var content = data.data;
  486. module.data.supplyDemandList = content;
  487. var supplyDemandData = template('supplyDemandData', module.data);
  488. $("#supply").html(supplyDemandData);
  489. }
  490. }
  491. //个人供求
  492. module.supplyDemand2 = function (data) {
  493. if (data.code == 200) {
  494. //console.log(data)
  495. var content = data.data;
  496. module.data.supplyDemand2List = content;
  497. var supplyDemand2Data = template('supplyDemand2Data', module.data);
  498. $("#demand").html(supplyDemand2Data);
  499. tools.doGet(supplyDemandRecommend + '/100/5', {}, module.supplyDemandRecommend, true);
  500. }
  501. }
  502. module.supplyDemandRecommend = function(data){
  503. var focusListNext = module.data.focusListNext;
  504. for (var i = 0; i < data.data.length; i++) {
  505. var imgStrs = data.data[i].fileUrl
  506. if (imgStrs != null && imgStrs != '') {
  507. focusListNext.push({img:serverApi+imgStrs,title:data.data[i].projectName,id:data.data[i].id})
  508. }
  509. }
  510. console.log(data)
  511. module.data.focusListNext = focusListNext;
  512. var bannerFocusBottomData = template('bannerFocusBottomData', module.data);
  513. $("#bannerFocusNextContent").html(bannerFocusBottomData);
  514. new Swiper('#bannerFocusNextWrap', {
  515. paginationClickable: true,
  516. pagination: '.a2',
  517. autoplay : 2000,
  518. loop:true
  519. })
  520. }
  521. module.supplyImages = function(){
  522. var focusListNext = module.data.focusListNext;
  523. //console.log(module.data.supplyDemandList)
  524. for (var i = 0; i < module.data.supplyDemandList.length; i++) {
  525. var imgStrs = module.data.supplyDemandList[i].projectContent.match(/<img.*?>/g)
  526. var title = module.data.supplyDemandList[i].projectName
  527. if (imgStrs != null && imgStrs != '') {
  528. focusListNext.push({img:imgStrs[0],title:title})
  529. }
  530. }
  531. for (var i = 0; i < module.data.supplyDemand2List.length; i++) {
  532. var imgStrs = module.data.supplyDemand2List[i].projectContent.match(/<img.*?>/g)
  533. var title = module.data.supplyDemand2List[i].projectName
  534. if (imgStrs != null && imgStrs != '') {
  535. focusListNext.push({img:imgStrs[0],title:title})
  536. }
  537. }
  538. module.data.focusListNext = focusListNext;
  539. var bannerFocusBottomData = template('bannerFocusBottomData', module.data);
  540. $("#bannerFocusNextContent").html(bannerFocusBottomData);
  541. new Swiper('#bannerFocusNextWrap', {
  542. pagination: '.page-pagination1',
  543. paginationClickable: true
  544. })
  545. }
  546. module.timeInter = function (divScroll) {
  547. time = setInterval(function () {
  548. var oldTop = divScroll.scrollTop;
  549. var newTop = oldTop + 1;
  550. divScroll.scrollTop = newTop;
  551. var counst = divScroll.scrollHeight - divScroll.scrollTop - divScroll.clientHeight;
  552. if (1 > counst) {
  553. divScroll.scrollTop = 0;
  554. }
  555. }, 30)
  556. }
  557. //证书查询
  558. goSearchKeyWord = function(){
  559. var type = $('input[name="transaction"]:checked').val();
  560. var searchKeyWord = $('#searchKeyWord').val();
  561. //console.log($('#searchKeyWord').val())
  562. //console.log(type)
  563. if($('#searchKeyWord').val() == '' && type== 'warrant'){
  564. tools.initDialog('提示', '经营权证编号不可为空', function () {
  565. return;
  566. }, '确定')
  567. return;
  568. }
  569. if(type == 'warrant'){
  570. tools.skip('view/announcement/warrantDetail.html?type='+type+'&searchKeyWord='+searchKeyWord)
  571. }else{
  572. tools.skip('view/announcement/announcement.html?type='+type+'&searchKeyWord='+searchKeyWord)
  573. }
  574. }
  575. //项目查询
  576. searchProject = function(){
  577. var projectNum = $('#projectNum').val();
  578. var projectName = $('#projectName').val();
  579. var deptTypeSelect = $("select[name='deptTypeSelect']").val();
  580. tools.skip('view/listingItems/itemsList.html?projectCode='+projectNum+'&projectName='+projectName+'&projectNumber='+deptTypeSelect)
  581. }
  582. //标的物类型
  583. module.deptTypeSelect = function (data) {
  584. if (data.code == 200) {
  585. //console.log(data);
  586. var content = data.data ;
  587. module.data.deptTypeSelectList = content;
  588. var deptTypeSelectData = template('deptTypeSelectData', module.data);
  589. $("#deptTypeSelectContent").html(deptTypeSelectData);
  590. }
  591. }
  592. //切换
  593. tabCheck = function (type) {
  594. if(type == 'supply'){
  595. document.getElementById('demand').style.display = 'none';
  596. document.getElementById('demandBtn').className = '';
  597. }
  598. if(type == 'demand'){
  599. document.getElementById('supply').style.display = 'none';
  600. document.getElementById('supplyBtn').className = '';
  601. }
  602. document.getElementById(type).style.display = 'inline-table';
  603. document.getElementById(type+'Btn').className = 'active';
  604. }
  605. //切换
  606. tabClick = function (type) {
  607. document.getElementById('cjgg').style.display = 'none';
  608. document.getElementById('jzgg').style.display = 'none';
  609. document.getElementById('cjggBtn').className = '';
  610. document.getElementById('jzggBtn').className = '';
  611. document.getElementById(type).style.display = 'block';
  612. document.getElementById(type+'Btn').className = 'active';
  613. }
  614. goDetail = function (id) {
  615. tools.skip('view/listingItems/itemsDetail.html?id='+id);
  616. }
  617. goUserInteract = function () {
  618. tools.skip('view/user/user.html?type=goInteract')
  619. }
  620. goListing = function (clickType,dictSort,dictCode) {
  621. tools.skip('view/listingItems/itemsList.html?clickType='+clickType+'&dictSort='+dictSort+'&dictCode='+dictCode);
  622. }
  623. goAnnouncementList = function (type) {
  624. tools.skip('view/announcement/announcement.html?type='+type+'&searchKeyWord=');
  625. }
  626. goNewList = function () {
  627. tools.skip('view/new/newList.html');
  628. }
  629. goPolicy = function (type) {
  630. tools.skip('view/policy/policy.html?type='+type);
  631. }
  632. goBidding = function(){
  633. tools.skip('view/bidding/biddingList.html');
  634. }
  635. goDemand = function(){
  636. tools.skip('view/demand/demand.html');
  637. }
  638. goInteraction = function(){
  639. tools.skip('view/interact/interactList.html');
  640. }
  641. goInteractSearch = function(){
  642. tools.skip('view/interact/interactList.html?keyWord='+$('#interactInput').val());
  643. }
  644. return module;
  645. });