网站
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

index.js 30 KiB

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