index.vue 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589
  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="http://img2.imgtn.bdimg.com/it/u=1300722955,3173826431&fm=26&gp=0.jpg"></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. productList: [],
  128. tecList: [],
  129. bankingList: [
  130. {
  131. image:
  132. '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',
  133. title: '测试型数据测试型数测试型数测试型数据测试型数据测试型数测试型数测试型数据',
  134. content:
  135. '测试型数据测试型数测试型数测试型数据测试型数据测试型数测试型数测试型数据测试型数据测试型数测试型数测试型数据测试型数据测试型数测试型数测试型数据',
  136. },
  137. {
  138. image:
  139. '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',
  140. title: '测试型数据测试型数测试型数测试型数据测试型数据测试型数测试型数测试型数据',
  141. content:
  142. '测试型数据测试型数测试型数测试型数据测试型数据测试型数测试型数测试型数据测试型数据测试型数测试型数测试型数据测试型数据测试型数测试型数测试型数据',
  143. },
  144. {
  145. image:
  146. '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',
  147. title: '测试型数据测试型数测试型数测试型数据测试型数据测试型数测试型数测试型数据',
  148. content:
  149. '测试型数据测试型数测试型数测试型数据测试型数据测试型数测试型数测试型数据测试型数据测试型数测试型数测试型数据测试型数据测试型数测试型数测试型数据',
  150. },
  151. {
  152. image:
  153. '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',
  154. title: '测试型数据测试型数测试型数测试型数据测试型数据测试型数测试型数测试型数据',
  155. content:
  156. '测试型数据测试型数测试型数测试型数据测试型数据测试型数测试型数测试型数据测试型数据测试型数测试型数测试型数据测试型数据测试型数测试型数测试型数据',
  157. },
  158. ],
  159. serviceList: [],
  160. newList: [
  161. ],
  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. methods: {
  178. ...product(['query']),
  179. ...talentExperts({ expertQuery: 'query' }),
  180. async search() {
  181. let res = await this.query({ skip: 0, limit: 4, totaltype: '0' });
  182. if (this.$checkRes(res)) this.$set(this, `tecList`, res.data);
  183. res = await this.query({ skip: 0, limit: 4, totaltype: '1' });
  184. if (this.$checkRes(res)) this.$set(this, `productList`, res.data);
  185. if (this.$checkRes(res)) this.$set(this, `newList`, res.data);
  186. res = await this.query({ skip: 0, limit: 4, totaltype: '2' });
  187. if (this.$checkRes(res)) this.$set(this, `serviceList`, res.data);
  188. // res = await this.expertQuery({ skip: 0, limit: 4 });
  189. // if (this.$checkRes(res)) this.$set(this, `expertsList`, res.data);
  190. },
  191. toProductList() {
  192. window.location.href = 'http://free.liaoningdoupo.com/platweb/supermaket/supermarketlist?totaltype=1';
  193. },
  194. productDetail(id) {
  195. window.location.href = 'http://free.liaoningdoupo.com/platweb/supermaket/supermarketdetail?totaltype=2&&?&id=' + id + '';
  196. },
  197. toTecList() {
  198. window.location.href = 'http://free.liaoningdoupo.com/platweb/supermaket/supermarketlist?totaltype=0';
  199. },
  200. tecDetail(id) {
  201. window.location.href = 'http://free.liaoningdoupo.com/platweb/supermaket/supermarketdetail?totaltype=0&&?&id=' + id + '';
  202. },
  203. toServiceList() {
  204. window.location.href = 'http://free.liaoningdoupo.com/platweb/supermaket/supermarketlist?totaltype=2';
  205. },
  206. serviceDetail(id) {
  207. window.location.href = 'http://free.liaoningdoupo.com/platweb/supermaket/supermarketdetail?totaltype=2&&?&id=' + id + '';
  208. },
  209. fabu() {
  210. window.location.href = 'http://free.liaoningdoupo.com/platweb/enterprise/enterprisexuqiu';
  211. },
  212. },
  213. };
  214. </script>
  215. <style lang="less" scoped>
  216. .gongqiuImage {
  217. width: 100%;
  218. height: 100%;
  219. }
  220. .main {
  221. width: 100%;
  222. margin: 20px auto;
  223. float: none;
  224. }
  225. .marketTop {
  226. width: 80%;
  227. margin: 20px auto;
  228. float: none;
  229. }
  230. .left {
  231. float: left;
  232. height: 500px;
  233. margin: 10px 0 20px 0;
  234. overflow: hidden;
  235. }
  236. .leftTitle {
  237. text-align: center;
  238. position: relative;
  239. }
  240. .leftTitle p:first-child {
  241. font-size: 18px;
  242. color: #044b79;
  243. font-weight: bold;
  244. }
  245. .leftTitle p:last-child {
  246. float: left;
  247. width: 2px;
  248. height: 402px;
  249. background-color: #044b79;
  250. margin: 0 5px;
  251. position: absolute;
  252. left: 9px;
  253. }
  254. .infoLeft {
  255. height: 480px;
  256. padding: 0 10px;
  257. }
  258. .productList {
  259. position: relative;
  260. margin: 0 10px 10px 0;
  261. width: 48%;
  262. height: 220px;
  263. }
  264. .productList:nth-child(2n) {
  265. margin: 0 0 10px 0;
  266. }
  267. .productList .el-image {
  268. width: 100%;
  269. height: 220px;
  270. }
  271. .productList p {
  272. position: absolute;
  273. text-align: center;
  274. bottom: 0;
  275. height: 50px;
  276. line-height: 50px;
  277. text-indent: 5px;
  278. // padding: 0 10px;
  279. background: #044b799f;
  280. color: #fff;
  281. width: 100%;
  282. font-size: 18px;
  283. }
  284. .leftListDown {
  285. position: relative;
  286. }
  287. .leftListDown span:first-child {
  288. display: inline-block;
  289. width: 80%;
  290. height: 3px;
  291. background: rgba(4, 75, 121, 0.37);
  292. margin: 0 10px 0 0;
  293. position: absolute;
  294. left: -10px;
  295. top: 10px;
  296. }
  297. .leftListDown span:last-child {
  298. font-size: 16px;
  299. float: right;
  300. padding: 0 15px 0 0;
  301. color: #044b79;
  302. font-weight: 700;
  303. cursor: pointer;
  304. }
  305. .right {
  306. float: right;
  307. height: 500px;
  308. overflow: hidden;
  309. margin: 10px 0 20px 0;
  310. }
  311. .rightListTop {
  312. position: relative;
  313. }
  314. .rightListTop span:first-child {
  315. font-size: 16px;
  316. float: left;
  317. padding: 0 0 0 15px;
  318. color: #044b79;
  319. font-weight: 700;
  320. cursor: pointer;
  321. }
  322. .rightListTop span:last-child {
  323. display: inline-block;
  324. width: 80%;
  325. height: 3px;
  326. background: rgba(4, 75, 121, 0.37);
  327. margin: 0 10px 0 0;
  328. position: absolute;
  329. right: -10px;
  330. top: 10px;
  331. }
  332. .infoRight {
  333. height: 480px;
  334. padding: 0 10px;
  335. }
  336. .tecList {
  337. padding: 0 15px;
  338. margin: 10px 0 10px 0;
  339. }
  340. .tecList span:first-child {
  341. display: inline-block;
  342. width: 10px;
  343. height: 10px;
  344. background: #2188c6;
  345. border-radius: 90px;
  346. }
  347. .tecList span:nth-child(2n) {
  348. display: inline-block;
  349. width: 80%;
  350. font-size: 18px;
  351. padding: 0 15px;
  352. }
  353. .tecList span:nth-child(3n) {
  354. display: inline-block;
  355. width: 10%;
  356. text-align: center;
  357. background-color: #044b79;
  358. color: #ffffff;
  359. font-size: 16px;
  360. padding: 3px 0px;
  361. }
  362. .tecList span:last-child {
  363. display: block;
  364. width: 120px;
  365. text-align: left;
  366. padding: 5px 0 5px 25px;
  367. font-size: 14px;
  368. }
  369. .rightTitle {
  370. text-align: center;
  371. }
  372. .rightTitle p:first-child {
  373. width: 2px;
  374. height: 370px;
  375. background: #044b79;
  376. position: relative;
  377. left: 10px;
  378. top: -20px;
  379. }
  380. .rightTitle p:last-child {
  381. font-size: 18px;
  382. font-weight: bold;
  383. color: #044b79;
  384. }
  385. .marketDown {
  386. height: 550px;
  387. overflow: hidden;
  388. margin: 20px 0 20px 0;
  389. background: #e9edf6;
  390. padding-top: 30px;
  391. }
  392. .downMain {
  393. width: 80%;
  394. float: none;
  395. height: 550px;
  396. margin: 0 auto;
  397. }
  398. .downLeftTop .el-image {
  399. width: 40px;
  400. }
  401. .topTexts {
  402. width: 100%;
  403. border-bottom: 2.5px solid #044b79;
  404. display: inline-block;
  405. position: relative;
  406. top: -10px;
  407. margin: 0 0 0 5px;
  408. }
  409. .topTexts span:first-child {
  410. font-size: 24px;
  411. font-weight: 700;
  412. color: #000000;
  413. padding: 0 10px;
  414. top: 4px;
  415. }
  416. .topTexts span p:first-child {
  417. font-weight: 800;
  418. font-size: 34px;
  419. color: #92959a;
  420. top: 11px;
  421. display: inline-block;
  422. }
  423. .topTexts span p:last-child {
  424. display: inline-block;
  425. font-weight: 700;
  426. font-size: 18px;
  427. color: #92959a;
  428. }
  429. .topTexts span:last-child {
  430. float: right;
  431. font-size: 16px;
  432. font-weight: 700;
  433. color: #044b79;
  434. position: relative;
  435. top: 20px;
  436. cursor: pointer;
  437. }
  438. .topText {
  439. width: 89%;
  440. border-bottom: 2.5px solid #044b79;
  441. display: inline-block;
  442. position: relative;
  443. top: -10px;
  444. margin: 0 0 0 5px;
  445. }
  446. .topText span:first-child {
  447. font-size: 24px;
  448. font-weight: 700;
  449. color: #000000;
  450. padding: 0 10px;
  451. top: 4px;
  452. }
  453. .topText span p:first-child {
  454. font-weight: 800;
  455. font-size: 34px;
  456. color: #92959a;
  457. top: 11px;
  458. display: inline-block;
  459. }
  460. .topText span p:last-child {
  461. display: inline-block;
  462. font-weight: 700;
  463. font-size: 18px;
  464. color: #92959a;
  465. }
  466. .topText span:last-child {
  467. float: right;
  468. font-size: 16px;
  469. font-weight: 700;
  470. color: #044b79;
  471. position: relative;
  472. top: 20px;
  473. cursor: pointer;
  474. }
  475. .bankingLists {
  476. height: 152px;
  477. }
  478. .bankingLists .el-image {
  479. width: 100%;
  480. height: 130px;
  481. display: inline-block;
  482. }
  483. .bankingLists span {
  484. margin: 0 5px 0 5px;
  485. display: inline-block;
  486. width: 80%;
  487. font-size: 18px;
  488. padding: 0 0 0 10px;
  489. color: #044b79;
  490. font-weight: 700;
  491. }
  492. .bankingLists span:last-child {
  493. margin: 10px 0 0 5px;
  494. font-size: 16px;
  495. overflow: hidden;
  496. text-overflow: ellipsis;
  497. -webkit-line-clamp: 4;
  498. word-break: break-all;
  499. display: -webkit-box;
  500. -webkit-box-orient: vertical;
  501. padding: 0 0 0 10px;
  502. color: #666;
  503. line-height: 25px;
  504. font-weight: 400;
  505. }
  506. .bankingList {
  507. height: 152px;
  508. }
  509. .bankingList .el-image {
  510. width: 100%;
  511. height: 130px;
  512. display: inline-block;
  513. }
  514. .bankingList span {
  515. margin: 0 5px 0 5px;
  516. display: inline-block;
  517. width: 80%;
  518. font-size: 18px;
  519. padding: 0 0 0 10px;
  520. color: #044b79;
  521. font-weight: 700;
  522. }
  523. .bankingList span:last-child {
  524. margin: 10px 0 0 5px;
  525. font-size: 16px;
  526. overflow: hidden;
  527. text-overflow: ellipsis;
  528. -webkit-line-clamp: 4;
  529. word-break: break-all;
  530. display: -webkit-box;
  531. -webkit-box-orient: vertical;
  532. padding: 0 0 0 10px;
  533. color: #666;
  534. line-height: 25px;
  535. font-weight: 400;
  536. }
  537. .downRightImage {
  538. float: none;
  539. width: 85%;
  540. margin: 0 auto;
  541. }
  542. .downRightImage .el-image {
  543. height: 200px;
  544. width: 100%;
  545. }
  546. .downRightList {
  547. float: none;
  548. width: 85%;
  549. margin: 10px auto;
  550. height: 50px;
  551. font-size: 16px;
  552. line-height: 35px;
  553. }
  554. .downRightList span:first-child {
  555. display: inline-block;
  556. width: 10px;
  557. height: 10px;
  558. background: #2188c6;
  559. border-radius: 90px;
  560. margin: 10px;
  561. }
  562. .downRightList span:last-child {
  563. width: 80%;
  564. overflow: hidden;
  565. white-space: nowrap;
  566. text-overflow: ellipsis;
  567. display: inline-block;
  568. }
  569. .marketNew {
  570. float: none;
  571. width: 80%;
  572. margin: 30px auto;
  573. height: 400px;
  574. }
  575. .downLeftInfos {
  576. height: 330px;
  577. }
  578. </style>