index.vue 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604
  1. <template>
  2. <div id="index">
  3. <el-col :span="24" class="main">
  4. <el-col :span="24" class="marketTop">
  5. <el-col :span="12" class="left">
  6. <el-col :span="1" class="leftTitle">
  7. <p>科<br />技<br />产<br />品</p>
  8. <p></p>
  9. </el-col>
  10. <el-col :span="23" class="infoLeft">
  11. <el-col :span="12" class="productList" v-for="(item, index) in productList" :key="index" @click.native="productDetail(item.id)">
  12. <el-image :src="item.image[0].url"></el-image>
  13. <p class="textOver">{{ item.name }}</p>
  14. </el-col>
  15. </el-col>
  16. <el-col :span="24" class="leftListDown"><span></span><span @click="toProductList">MORE</span></el-col>
  17. </el-col>
  18. <el-col :span="12" class="right">
  19. <el-col :span="24" class="rightListTop"><span @click="toTecList">MORE</span><span></span></el-col>
  20. <el-col :span="23" class="infoRight">
  21. <el-col :span="24" class="tecList" v-for="(item, index) in tecList" :key="index">
  22. <span></span>
  23. <span class="textOver" @click="tecDetail(item.id)">{{ item.name }}</span>
  24. <span>对接</span>
  25. <span>{{ item.meta | getDate }}</span>
  26. </el-col>
  27. </el-col>
  28. <el-col :span="1" class="rightTitle">
  29. <p></p>
  30. <p>技<br />术<br />供<br />求</p>
  31. </el-col>
  32. </el-col>
  33. <el-col :span="24">
  34. <el-image :src="gongqiuImage" class="gongqiuImage"></el-image>
  35. </el-col>
  36. </el-col>
  37. <el-col :span="24" class="marketDown">
  38. <el-col :span="24" class="downMain">
  39. <el-col :span="12" class="left">
  40. <el-col :span="24" class="downLeftTop">
  41. <el-image :src="downLeftTopImage"></el-image>
  42. <span class="topText">
  43. <span>服务供求</span>
  44. <span
  45. ><p>S</p>
  46. <p>ervice</p></span
  47. >
  48. <span @click="toServiceList">更多</span>
  49. </span>
  50. </el-col>
  51. <el-col :span="24" class="downLeftInfo">
  52. <el-col :span="24" class="bankingList" v-for="(item, index) in serviceList" :key="index" @click.native="serviceDetail(item.id)">
  53. <el-col :span="10">
  54. <el-image :src="item.image[0].url"></el-image>
  55. </el-col>
  56. <el-col :span="14">
  57. <span class="textOver">{{ item.name }}</span>
  58. <span>{{ item.introduction }}</span>
  59. </el-col>
  60. </el-col>
  61. </el-col>
  62. </el-col>
  63. <el-col :span="12" class="right">
  64. <el-col :span="24" class="downLeftTop">
  65. <el-image :src="downLeftTopImage"></el-image>
  66. <span class="topText">
  67. <span>金融供求</span>
  68. <span
  69. ><p>B</p>
  70. <p>anking</p></span
  71. >
  72. <span>更多</span>
  73. </span>
  74. </el-col>
  75. <el-col :span="24" class="downRightImage">
  76. <el-image :src="serviceImage"></el-image>
  77. </el-col>
  78. <el-col :span="24">
  79. <el-col :span="24" class="downRightList" v-for="(item, index) in bankingList" :key="index">
  80. <span></span>
  81. <span>{{ item.title }}</span>
  82. </el-col>
  83. </el-col>
  84. </el-col>
  85. </el-col>
  86. </el-col>
  87. <el-col :span="24" class="marketNew">
  88. <el-col :span="24" class="downLeftTop">
  89. <el-image :src="downLeftTopImage"></el-image>
  90. <span class="topTexts">
  91. <span>最新发布</span>
  92. <span
  93. ><p>N</p>
  94. <p>ewing</p></span
  95. >
  96. <span @click="fabu()">我要发布</span>
  97. </span>
  98. <el-col :span="24" class="downLeftInfos">
  99. <el-col :span="12" class="bankingLists" v-for="(item, index) in newList" :key="index" @click.native="productDetail(item.id)">
  100. <el-col :span="10">
  101. <el-image :src="item.image[0].url"></el-image>
  102. </el-col>
  103. <el-col :span="12">
  104. <span class="textOvers">{{ item.name }}</span>
  105. <span>{{ item.introduction }}</span>
  106. </el-col>
  107. </el-col>
  108. </el-col>
  109. </el-col>
  110. </el-col>
  111. </el-col>
  112. </div>
  113. </template>
  114. <script>
  115. import _ from 'lodash';
  116. import { mapActions, mapState, createNamespacedHelpers } from 'vuex';
  117. const { mapActions: product } = createNamespacedHelpers('marketproduct');
  118. const { mapActions: talentExperts } = createNamespacedHelpers('talentExperts');
  119. var moment = require('moment');
  120. export default {
  121. name: 'index',
  122. props: {},
  123. components: {},
  124. data: () => ({
  125. gongqiuImage: require('@/assets/live/main2.png'),
  126. downLeftTopImage: require('@/assets/live/square_big.png'),
  127. serviceImage: require('@/assets/live/service_picture_one.jpg'),
  128. productList: [],
  129. tecList: [],
  130. bankingList: [
  131. {
  132. image:
  133. 'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1588061253920&di=18e7a68061c9debd24a2db64967b891c&imgtype=0&src=http%3A%2F%2Fbpic.588ku.com%2Fback_pic%2F03%2F51%2F81%2F1257923ada49020.jpg',
  134. title: '测试型数据测试型数测试型数测试型数据测试型数据测试型数测试型数测试型数据',
  135. content:
  136. '测试型数据测试型数测试型数测试型数据测试型数据测试型数测试型数测试型数据测试型数据测试型数测试型数测试型数据测试型数据测试型数测试型数测试型数据',
  137. },
  138. {
  139. image:
  140. 'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1588061253920&di=18e7a68061c9debd24a2db64967b891c&imgtype=0&src=http%3A%2F%2Fbpic.588ku.com%2Fback_pic%2F03%2F51%2F81%2F1257923ada49020.jpg',
  141. title: '测试型数据测试型数测试型数测试型数据测试型数据测试型数测试型数测试型数据',
  142. content:
  143. '测试型数据测试型数测试型数测试型数据测试型数据测试型数测试型数测试型数据测试型数据测试型数测试型数测试型数据测试型数据测试型数测试型数测试型数据',
  144. },
  145. {
  146. image:
  147. 'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1588061253920&di=18e7a68061c9debd24a2db64967b891c&imgtype=0&src=http%3A%2F%2Fbpic.588ku.com%2Fback_pic%2F03%2F51%2F81%2F1257923ada49020.jpg',
  148. title: '测试型数据测试型数测试型数测试型数据测试型数据测试型数测试型数测试型数据',
  149. content:
  150. '测试型数据测试型数测试型数测试型数据测试型数据测试型数测试型数测试型数据测试型数据测试型数测试型数测试型数据测试型数据测试型数测试型数测试型数据',
  151. },
  152. {
  153. image:
  154. 'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1588061253920&di=18e7a68061c9debd24a2db64967b891c&imgtype=0&src=http%3A%2F%2Fbpic.588ku.com%2Fback_pic%2F03%2F51%2F81%2F1257923ada49020.jpg',
  155. title: '测试型数据测试型数测试型数测试型数据测试型数据测试型数测试型数测试型数据',
  156. content:
  157. '测试型数据测试型数测试型数测试型数据测试型数据测试型数测试型数测试型数据测试型数据测试型数测试型数测试型数据测试型数据测试型数测试型数测试型数据',
  158. },
  159. ],
  160. serviceList: [],
  161. newList: [],
  162. }),
  163. created() {
  164. this.search();
  165. },
  166. filters: {
  167. getDate(meta) {
  168. let createdAt = _.get(meta, `createdAt`);
  169. let date = new Date(createdAt)
  170. .toLocaleDateString()
  171. .replace('/', '-')
  172. .replace('/', '-');
  173. return date;
  174. },
  175. },
  176. computed: {
  177. pageTitle() {
  178. return `${this.$route.meta.title}`;
  179. },
  180. },
  181. metaInfo() {
  182. return { title: this.$route.meta.title };
  183. },
  184. methods: {
  185. ...product(['query']),
  186. ...talentExperts({ expertQuery: 'query' }),
  187. async search() {
  188. let res = await this.query({ skip: 0, limit: 4, totaltype: '0' });
  189. if (this.$checkRes(res)) this.$set(this, `tecList`, res.data);
  190. res = await this.query({ skip: 0, limit: 4, totaltype: '1' });
  191. if (this.$checkRes(res)) this.$set(this, `productList`, res.data);
  192. if (this.$checkRes(res)) this.$set(this, `newList`, res.data);
  193. res = await this.query({ skip: 0, limit: 4, totaltype: '2' });
  194. if (this.$checkRes(res)) this.$set(this, `serviceList`, res.data);
  195. // res = await this.expertQuery({ skip: 0, limit: 4 });
  196. // if (this.$checkRes(res)) this.$set(this, `expertsList`, res.data);
  197. },
  198. toProductList() {
  199. // window.location.href = 'http://free.liaoningdoupo.com/platweb/supermaket/supermarketlist?totaltype=1';
  200. window.open('http://free.liaoningdoupo.com/platweb/supermaket/supermarketlist?totaltype=1');
  201. },
  202. productDetail(id) {
  203. // window.location.href = 'http://free.liaoningdoupo.com/platweb/supermaket/supermarketdetail?totaltype=2&&?&id=' + id + '';
  204. window.open('http://free.liaoningdoupo.com/platweb/supermaket/supermarketdetail?totaltype=2&&?&id=' + id + '');
  205. },
  206. toTecList() {
  207. // window.location.href = 'http://free.liaoningdoupo.com/platweb/supermaket/supermarketlist?totaltype=0';
  208. window.open('http://free.liaoningdoupo.com/platweb/supermaket/supermarketlist?totaltype=0');
  209. },
  210. tecDetail(id) {
  211. // window.location.href = 'http://free.liaoningdoupo.com/platweb/supermaket/supermarketdetail?totaltype=0&&?&id=' + id + '';
  212. window.open('//free.liaoningdoupo.com/platweb/supermaket/supermarketdetail?totaltype=0&&?&id=' + id + '');
  213. },
  214. toServiceList() {
  215. // window.location.href = 'http://free.liaoningdoupo.com/platweb/supermaket/supermarketlist?totaltype=2';
  216. window.open('http://free.liaoningdoupo.com/platweb/supermaket/supermarketlist?totaltype=2');
  217. },
  218. serviceDetail(id) {
  219. // window.location.href = 'http://free.liaoningdoupo.com/platweb/supermaket/supermarketdetail?totaltype=2&&?&id=' + id + '';
  220. window.open('http://free.liaoningdoupo.com/platweb/supermaket/supermarketdetail?totaltype=2&&?&id=' + id + '');
  221. },
  222. fabu() {
  223. // window.location.href = 'http://free.liaoningdoupo.com/platweb/enterprise/enterprisexuqiu';
  224. window.open('http://free.liaoningdoupo.com/platweb/enterprise/enterprisexuqiu');
  225. },
  226. },
  227. };
  228. </script>
  229. <style lang="less" scoped>
  230. .gongqiuImage {
  231. width: 100%;
  232. height: 100%;
  233. }
  234. .main {
  235. width: 100%;
  236. margin: 20px auto;
  237. float: none;
  238. }
  239. .marketTop {
  240. width: 80%;
  241. margin: 20px auto;
  242. float: none;
  243. }
  244. .left {
  245. float: left;
  246. height: 500px;
  247. margin: 10px 0 20px 0;
  248. overflow: hidden;
  249. }
  250. .leftTitle {
  251. text-align: center;
  252. position: relative;
  253. }
  254. .leftTitle p:first-child {
  255. font-size: 18px;
  256. color: #044b79;
  257. font-weight: bold;
  258. }
  259. .leftTitle p:last-child {
  260. float: left;
  261. width: 2px;
  262. height: 402px;
  263. background-color: #044b79;
  264. margin: 0 5px;
  265. position: absolute;
  266. left: 9px;
  267. }
  268. .infoLeft {
  269. height: 480px;
  270. padding: 0 10px;
  271. }
  272. .productList {
  273. position: relative;
  274. margin: 0 10px 10px 0;
  275. width: 48%;
  276. height: 220px;
  277. }
  278. .productList:nth-child(2n) {
  279. margin: 0 0 10px 0;
  280. }
  281. .productList .el-image {
  282. width: 100%;
  283. height: 220px;
  284. }
  285. .productList p {
  286. position: absolute;
  287. text-align: center;
  288. bottom: 0;
  289. height: 50px;
  290. line-height: 50px;
  291. text-indent: 5px;
  292. // padding: 0 10px;
  293. background: #044b799f;
  294. color: #fff;
  295. width: 100%;
  296. font-size: 18px;
  297. }
  298. .leftListDown {
  299. position: relative;
  300. }
  301. .leftListDown span:first-child {
  302. display: inline-block;
  303. width: 80%;
  304. height: 3px;
  305. background: rgba(4, 75, 121, 0.37);
  306. margin: 0 10px 0 0;
  307. position: absolute;
  308. left: -10px;
  309. top: 10px;
  310. }
  311. .leftListDown span:last-child {
  312. font-size: 16px;
  313. float: right;
  314. padding: 0 15px 0 0;
  315. color: #044b79;
  316. font-weight: 700;
  317. cursor: pointer;
  318. }
  319. .right {
  320. float: right;
  321. height: 500px;
  322. overflow: hidden;
  323. margin: 10px 0 20px 0;
  324. }
  325. .rightListTop {
  326. position: relative;
  327. }
  328. .rightListTop span:first-child {
  329. font-size: 16px;
  330. float: left;
  331. padding: 0 0 0 15px;
  332. color: #044b79;
  333. font-weight: 700;
  334. cursor: pointer;
  335. }
  336. .rightListTop span:last-child {
  337. display: inline-block;
  338. width: 80%;
  339. height: 3px;
  340. background: rgba(4, 75, 121, 0.37);
  341. margin: 0 10px 0 0;
  342. position: absolute;
  343. right: -10px;
  344. top: 10px;
  345. }
  346. .infoRight {
  347. height: 480px;
  348. padding: 0 10px;
  349. }
  350. .tecList {
  351. padding: 0 15px;
  352. margin: 10px 0 10px 0;
  353. }
  354. .tecList span:first-child {
  355. display: inline-block;
  356. width: 10px;
  357. height: 10px;
  358. background: #2188c6;
  359. border-radius: 90px;
  360. }
  361. .tecList span:nth-child(2n) {
  362. display: inline-block;
  363. width: 80%;
  364. font-size: 18px;
  365. padding: 0 15px;
  366. }
  367. .tecList span:nth-child(3n) {
  368. display: inline-block;
  369. width: 10%;
  370. text-align: center;
  371. background-color: #044b79;
  372. color: #ffffff;
  373. font-size: 16px;
  374. padding: 3px 0px;
  375. }
  376. .tecList span:last-child {
  377. display: block;
  378. width: 120px;
  379. text-align: left;
  380. padding: 5px 0 5px 25px;
  381. font-size: 14px;
  382. }
  383. .rightTitle {
  384. text-align: center;
  385. }
  386. .rightTitle p:first-child {
  387. width: 2px;
  388. height: 370px;
  389. background: #044b79;
  390. position: relative;
  391. left: 10px;
  392. top: -20px;
  393. }
  394. .rightTitle p:last-child {
  395. font-size: 18px;
  396. font-weight: bold;
  397. color: #044b79;
  398. }
  399. .marketDown {
  400. height: 550px;
  401. overflow: hidden;
  402. margin: 20px 0 20px 0;
  403. background: #e9edf6;
  404. padding-top: 30px;
  405. }
  406. .downMain {
  407. width: 80%;
  408. float: none;
  409. height: 550px;
  410. margin: 0 auto;
  411. }
  412. .downLeftTop .el-image {
  413. width: 40px;
  414. }
  415. .topTexts {
  416. width: 100%;
  417. border-bottom: 2.5px solid #044b79;
  418. display: inline-block;
  419. position: relative;
  420. top: -10px;
  421. margin: 0 0 0 5px;
  422. }
  423. .topTexts span:first-child {
  424. font-size: 24px;
  425. font-weight: 700;
  426. color: #000000;
  427. padding: 0 10px;
  428. top: 4px;
  429. }
  430. .topTexts span p:first-child {
  431. font-weight: 800;
  432. font-size: 34px;
  433. color: #92959a;
  434. top: 11px;
  435. display: inline-block;
  436. }
  437. .topTexts span p:last-child {
  438. display: inline-block;
  439. font-weight: 700;
  440. font-size: 18px;
  441. color: #92959a;
  442. }
  443. .topTexts span:last-child {
  444. float: right;
  445. font-size: 16px;
  446. font-weight: 700;
  447. color: #044b79;
  448. position: relative;
  449. top: 20px;
  450. cursor: pointer;
  451. }
  452. .topText {
  453. width: 89%;
  454. border-bottom: 2.5px solid #044b79;
  455. display: inline-block;
  456. position: relative;
  457. top: -10px;
  458. margin: 0 0 0 5px;
  459. }
  460. .topText span:first-child {
  461. font-size: 24px;
  462. font-weight: 700;
  463. color: #000000;
  464. padding: 0 10px;
  465. top: 4px;
  466. }
  467. .topText span p:first-child {
  468. font-weight: 800;
  469. font-size: 34px;
  470. color: #92959a;
  471. top: 11px;
  472. display: inline-block;
  473. }
  474. .topText span p:last-child {
  475. display: inline-block;
  476. font-weight: 700;
  477. font-size: 18px;
  478. color: #92959a;
  479. }
  480. .topText span:last-child {
  481. float: right;
  482. font-size: 16px;
  483. font-weight: 700;
  484. color: #044b79;
  485. position: relative;
  486. top: 20px;
  487. cursor: pointer;
  488. }
  489. .bankingLists {
  490. height: 152px;
  491. }
  492. .bankingLists .el-image {
  493. width: 100%;
  494. height: 130px;
  495. display: inline-block;
  496. }
  497. .bankingLists span {
  498. margin: 0 5px 0 5px;
  499. display: inline-block;
  500. width: 80%;
  501. font-size: 18px;
  502. padding: 0 0 0 10px;
  503. color: #044b79;
  504. font-weight: 700;
  505. }
  506. .bankingLists span:last-child {
  507. margin: 10px 0 0 5px;
  508. font-size: 16px;
  509. overflow: hidden;
  510. text-overflow: ellipsis;
  511. -webkit-line-clamp: 4;
  512. word-break: break-all;
  513. display: -webkit-box;
  514. -webkit-box-orient: vertical;
  515. padding: 0 0 0 10px;
  516. color: #666;
  517. line-height: 25px;
  518. font-weight: 400;
  519. }
  520. .bankingList {
  521. height: 152px;
  522. }
  523. .bankingList .el-image {
  524. width: 100%;
  525. height: 130px;
  526. display: inline-block;
  527. }
  528. .bankingList span {
  529. margin: 0 5px 0 5px;
  530. display: inline-block;
  531. width: 80%;
  532. font-size: 18px;
  533. padding: 0 0 0 10px;
  534. color: #044b79;
  535. font-weight: 700;
  536. }
  537. .bankingList span:last-child {
  538. margin: 10px 0 0 5px;
  539. font-size: 16px;
  540. overflow: hidden;
  541. text-overflow: ellipsis;
  542. -webkit-line-clamp: 4;
  543. word-break: break-all;
  544. display: -webkit-box;
  545. -webkit-box-orient: vertical;
  546. padding: 0 0 0 10px;
  547. color: #666;
  548. line-height: 25px;
  549. font-weight: 400;
  550. }
  551. .downRightImage {
  552. float: none;
  553. width: 85%;
  554. margin: 0 auto;
  555. }
  556. .downRightImage .el-image {
  557. height: 200px;
  558. width: 100%;
  559. }
  560. .downRightList {
  561. float: none;
  562. width: 85%;
  563. margin: 10px auto;
  564. height: 50px;
  565. font-size: 16px;
  566. line-height: 35px;
  567. }
  568. .downRightList span:first-child {
  569. display: inline-block;
  570. width: 10px;
  571. height: 10px;
  572. background: #2188c6;
  573. border-radius: 90px;
  574. margin: 10px;
  575. }
  576. .downRightList span:last-child {
  577. width: 80%;
  578. overflow: hidden;
  579. white-space: nowrap;
  580. text-overflow: ellipsis;
  581. display: inline-block;
  582. }
  583. .marketNew {
  584. float: none;
  585. width: 80%;
  586. margin: 30px auto;
  587. height: 400px;
  588. }
  589. .downLeftInfos {
  590. height: 330px;
  591. }
  592. </style>