1_1.vue 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806
  1. <template>
  2. <div class="listNewsBox">
  3. <div class="ul_box_1" v-if="componentStyle == 1">
  4. <h4 class="ul_head">
  5. <NuxtLink v-if="titleLink.cid" :href="getLinkPath(titleLink)" :title="titleLink.alias">
  6. <span>{{ titleLink.alias }}</span>
  7. </NuxtLink>
  8. </h4>
  9. <div class="ul_img_box">
  10. <NuxtLink v-for="item in component_style1_News1Array" :href="getLinkPathDetail(item)" :title="item.title"
  11. :target="item.islink == 1 ? '_blank' : '_self'">
  12. <img class="" :src="item.imgurl" title="item.title" alt="item.title">
  13. <span class="ul_img_dot1">{{ item.title }}</span>
  14. </NuxtLink>
  15. </div>
  16. <div class="ul_box">
  17. <div class="ul_li" v-for="item in component_style1_News2Array_1">
  18. <NuxtLink :href="getLinkPathDetail(item)" :title="item.title"
  19. :target="item.islink == 1 ? '_blank' : '_self'">
  20. {{ item.title }}
  21. </NuxtLink>
  22. </div>
  23. </div>
  24. </div>
  25. <div class="ul_box_2" v-if="componentStyle == 2">
  26. <h4 class="ul_head">
  27. <NuxtLink v-if="titleLink.cid" :href="getLinkPath(titleLink)" :title="titleLink.alias">
  28. <span>{{ titleLink.alias }}</span>
  29. </NuxtLink>
  30. </h4>
  31. <div class="ul_box">
  32. <div class="ul_li" v-for="item in component_style1_News2Array_1">
  33. <NuxtLink :href="getLinkPathDetail(item)" :title="item.title"
  34. :target="item.islink == 1 ? '_blank' : '_self'">
  35. {{ item.title }}
  36. </NuxtLink>
  37. </div>
  38. </div>
  39. <div class="ul_img_box">
  40. <NuxtLink v-for="item in component_style1_News1Array" :href="getLinkPathDetail(item)" :title="item.title"
  41. :target="item.islink == 1 ? '_blank' : '_self'">
  42. <img class="" :src="item.imgurl" title="item.title" alt="item.title">
  43. <span class="ul_img_dot1">{{ item.title }}</span>
  44. </NuxtLink>
  45. </div>
  46. </div>
  47. <div class="ul_box_3" v-if="componentStyle == 3">
  48. <h4 class="ul_head">
  49. <NuxtLink v-if="titleLink.cid" :href="getLinkPath(titleLink)" :title="titleLink.alias">
  50. <span>{{ titleLink.alias }}</span>
  51. </NuxtLink>
  52. </h4>
  53. <div class="ul_img_box">
  54. <NuxtLink v-for="item in component_style1_News1Array" :href="getLinkPathDetail(item)" :title="item.title"
  55. :target="item.islink == 1 ? '_blank' : '_self'">
  56. <img class="" :src="item.imgurl" title="item.title" alt="item.title">
  57. <span class="ul_img_dot1">{{ item.title }}</span>
  58. </NuxtLink>
  59. </div>
  60. <div class="ul_box">
  61. <div class="ul_li" v-for="item in component_style1_News2Array_1">
  62. <NuxtLink :href="getLinkPathDetail(item)" :title="item.title"
  63. :target="item.islink == 1 ? '_blank' : '_self'">
  64. {{ item.title }}
  65. </NuxtLink>
  66. </div>
  67. </div>
  68. </div>
  69. <div class="ul_box_4" v-if="componentStyle == 4">
  70. <h4 class="ul_head">
  71. <NuxtLink v-if="titleLink.cid" :href="getLinkPath(titleLink)" :title="titleLink.alias">
  72. <span>{{ titleLink.alias }}</span>
  73. </NuxtLink>
  74. </h4>
  75. <div class="ul_box">
  76. <div class="ul_li" v-for="item in component_style1_News2Array_1">
  77. <NuxtLink :href="getLinkPathDetail(item)" :title="item.title"
  78. :target="item.islink == 1 ? '_blank' : '_self'">
  79. {{ item.title }}
  80. </NuxtLink>
  81. </div>
  82. </div>
  83. <div class="ul_img_box">
  84. <NuxtLink v-for="item in component_style1_News1Array" :href="getLinkPathDetail(item)" :title="item.title"
  85. :target="item.islink == 1 ? '_blank' : '_self'">
  86. <img class="" :src="item.imgurl" title="item.title" alt="item.title">
  87. <span class="ul_img_dot1">{{ item.title }}</span>
  88. </NuxtLink>
  89. </div>
  90. </div>
  91. <div class="ul_box_5" v-if="componentStyle == 5">
  92. <h4 class="ul_head">
  93. <NuxtLink v-if="titleLink.cid" :href="getLinkPath(titleLink)" :title="titleLink.alias">
  94. <span>{{ titleLink.alias }}</span>
  95. </NuxtLink>
  96. </h4>
  97. <div class="ul_box">
  98. <div class="ul_li" v-for="item in component_style1_News2Array_2">
  99. <NuxtLink :href="getLinkPathDetail(item)" :title="item.title"
  100. :target="item.islink == 1 ? '_blank' : '_self'">
  101. {{ item.title }}
  102. </NuxtLink>
  103. </div>
  104. </div>
  105. </div>
  106. <div class="ul_box_6" v-if="componentStyle == 6">
  107. <h4 class="ul_head">
  108. <span class=" ">{{ name }}</span>
  109. </h4>
  110. <div class="ul_box">
  111. <div class="ul_li" v-for="item in component_style1_News2Array_2">
  112. <NuxtLink :href="getLinkPathDetail(item)" :title="item.title"
  113. :target="item.islink == 1 ? '_blank' : '_self'">
  114. {{ item.title }}
  115. </NuxtLink>
  116. </div>
  117. </div>
  118. </div>
  119. </div>
  120. </template>
  121. <script setup>
  122. //引入vue
  123. import { ref } from 'vue';
  124. //获得新闻数据
  125. const props = defineProps({
  126. titleLink: Object,//标题
  127. componentStyle: Number,//样式编号
  128. });
  129. const component_style1_News1Array = ref([]);
  130. const component_style1_News2Array_1 = ref([]);
  131. const component_style1_News2Array_2 = ref([]);
  132. //最新资讯数据 start ---------------------------------------->
  133. async function getPageData() {
  134. const mkdata = await requestDataPromise('/web/getWebsiteArticlett', {
  135. method: 'GET',
  136. query: {
  137. 'imgnum': 4,
  138. 'textnum': 4,
  139. 'level': 4,
  140. 'id': 0,
  141. 'placeid': 0,
  142. },
  143. });
  144. if (mkdata.code == 200) {
  145. component_style1_News1Array.value = mkdata.data.img.slice(0, 1);
  146. component_style1_News2Array_1.value = mkdata.data.text.slice(0, 4);
  147. component_style1_News2Array_2.value = mkdata.data.text.slice(0, 11);
  148. }
  149. }
  150. getPageData();
  151. //最新资讯数据 end ---------------------------------------->
  152. </script>
  153. <style lang="less" scoped>
  154. //基本样式
  155. .listNewsBox {
  156. position: relative;
  157. .listNewsTitle_skin2 {
  158. font-size: 22px;
  159. font-weight: bold;
  160. height: 40px;
  161. line-height: 40px;
  162. border-bottom: 2px solid #A91B33;
  163. color: #A91B33;
  164. margin-bottom: 20px;
  165. box-sizing: border-box;
  166. span {
  167. color: #A91B33;
  168. height: 30px;
  169. line-height: 30px;
  170. border-left: 3px solid #A91B33;
  171. padding-left: 12px;
  172. }
  173. }
  174. .listNewsContent {
  175. .listNewsContentItem {
  176. display: flex;
  177. background: #F9FAFB;
  178. align-items: flex-start;
  179. margin-bottom: 20px;
  180. &:last-child {
  181. margin-bottom: 0;
  182. }
  183. .listNewsContentItemLeft {
  184. width: 170px;
  185. height: 110px;
  186. position: relative;
  187. img {
  188. display: block;
  189. width: 170px;
  190. height: 110px;
  191. }
  192. .listNewsContentItemLeftTitle {
  193. position: absolute;
  194. bottom: 0;
  195. z-index: 1;
  196. width: 100%;
  197. color: #fff;
  198. height: 28px;
  199. background: linear-gradient(0deg, rgba(0, 0, 0, 0.5) 33%, rgba(0, 0, 0, 0) 100%);
  200. box-sizing: border-box;
  201. padding: 0 5px;
  202. overflow: hidden;
  203. text-overflow: ellipsis;
  204. white-space: nowrap;
  205. line-height: 28px;
  206. font-size: 14px;
  207. }
  208. }
  209. .listNewsContentItemRight {
  210. padding: 10px;
  211. box-sizing: border-box;
  212. flex: 1;
  213. height: 110px;
  214. overflow: hidden;
  215. div {
  216. box-sizing: border-box;
  217. height: 24px;
  218. line-height: 24px;
  219. padding-left: 16px;
  220. font-size: 18px;
  221. color: #333333;
  222. margin-bottom: 10px;
  223. background: url(http://img.bjzxtw.org.cn/pre/image/png/20250605/1749100871349444.png) no-repeat left center;
  224. &:last-child {
  225. margin-bottom: 0;
  226. }
  227. }
  228. }
  229. }
  230. }
  231. }
  232. //样式4
  233. .listNewsBox {
  234. .listNewsStyle4 {
  235. .listNewsContentItem {
  236. .listNewsContentItemRight {
  237. div {
  238. background: url(https://img.bjzxtw.org.cn/pre/image/png/20250909/1757379542529609.png) no-repeat left center;
  239. }
  240. }
  241. }
  242. }
  243. }
  244. //样式5
  245. .listNewsBox {
  246. .listNewsStyle5 {
  247. .listNewsContentItem {
  248. .listNewsContentItemRight {
  249. div {
  250. background: url(https://img.bjzxtw.org.cn/pre/image/png/20250909/1757386056889702.png) no-repeat left center;
  251. }
  252. }
  253. }
  254. }
  255. }
  256. //样式6
  257. .listNewsBox {
  258. .listNewsStyle6 {
  259. .listNewsContentItem {
  260. .listNewsContentItemRight {
  261. div {
  262. padding-left: 0px;
  263. background: none;
  264. }
  265. }
  266. }
  267. }
  268. }
  269. //样式9
  270. .listNewsBox {
  271. .listNewsStyle9 {
  272. .listNewsContentItem {
  273. .listNewsContentItemRight {
  274. div {
  275. &:first-child {
  276. font-weight: 400;
  277. }
  278. }
  279. }
  280. }
  281. }
  282. }
  283. .listNewsContent {
  284. display: none;
  285. }
  286. .ul_box_1 {
  287. width: 100%;
  288. .ul_head {
  289. height: 47px;
  290. border-bottom: solid 1px #93969A;
  291. border-top: solid 1px #DCDDDF;
  292. margin: 0px;
  293. box-sizing: border-box;
  294. }
  295. .ul_head * {
  296. float: left;
  297. height: 100%;
  298. line-height: 47px;
  299. box-sizing: border-box;
  300. font-weight: bold;
  301. color: #A72213;
  302. font-size: 20px;
  303. border-bottom: solid 2px #A72213;
  304. }
  305. .ul_img_box {
  306. width: 100%;
  307. height: 268px;
  308. position: relative;
  309. margin-top: 20px;
  310. }
  311. .ul_img_box img {
  312. display: block;
  313. width: 100%;
  314. height: 100%;
  315. }
  316. .ul_img_dot1 {
  317. height: 50px;
  318. line-height: 50px;
  319. color: #fff;
  320. box-sizing: border-box;
  321. font-size: 14px;
  322. position: absolute;
  323. font-weight: bold;
  324. display: block;
  325. padding: 0px 15px;
  326. width: 100%;
  327. left: 0px;
  328. bottom: 0px;
  329. background: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, .6));
  330. word-break: keep-all;
  331. white-space: nowrap;
  332. overflow: hidden;
  333. text-overflow: ellipsis;
  334. }
  335. .ul_box {
  336. margin-top: 28px;
  337. overflow: hidden;
  338. width: 100%;
  339. .ul_li {
  340. line-height: 24px;
  341. height: 24px;
  342. position: relative;
  343. color: #333;
  344. font-size: 18px;
  345. text-indent: 9px;
  346. margin-bottom: 20px;
  347. word-break: keep-all;
  348. white-space: nowrap;
  349. overflow: hidden;
  350. text-overflow: ellipsis;
  351. a {
  352. color: #333;
  353. }
  354. }
  355. .ul_li::before {
  356. content: '';
  357. position: absolute;
  358. left: 0px;
  359. top: 10px;
  360. width: 4px;
  361. height: 4px;
  362. background: #F2F2F2;
  363. border-radius: 2px;
  364. }
  365. }
  366. }
  367. .ul_box_2 {
  368. width: 100%;
  369. .ul_head {
  370. height: 47px;
  371. border-bottom: solid 1px #93969A;
  372. border-top: solid 1px #DCDDDF;
  373. margin: 0px;
  374. box-sizing: border-box;
  375. }
  376. .ul_head * {
  377. float: left;
  378. height: 100%;
  379. line-height: 47px;
  380. box-sizing: border-box;
  381. font-weight: bold;
  382. color: #A72213;
  383. font-size: 20px;
  384. border-bottom: solid 2px #A72213;
  385. }
  386. .ul_img_box {
  387. width: 100%;
  388. height: 268px;
  389. position: relative;
  390. margin-top: 28px;
  391. }
  392. .ul_img_box img {
  393. display: block;
  394. width: 100%;
  395. height: 100%;
  396. }
  397. .ul_img_dot1 {
  398. height: 50px;
  399. line-height: 50px;
  400. color: #fff;
  401. box-sizing: border-box;
  402. font-size: 14px;
  403. position: absolute;
  404. font-weight: bold;
  405. display: block;
  406. padding: 0px 15px;
  407. width: 100%;
  408. left: 0px;
  409. bottom: 0px;
  410. background: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, .6));
  411. word-break: keep-all;
  412. white-space: nowrap;
  413. overflow: hidden;
  414. text-overflow: ellipsis;
  415. }
  416. .ul_box {
  417. margin-top: 20px;
  418. overflow: hidden;
  419. width: 100%;
  420. .ul_li {
  421. line-height: 24px;
  422. height: 24px;
  423. position: relative;
  424. color: #333;
  425. font-size: 18px;
  426. text-indent: 9px;
  427. margin-bottom: 20px;
  428. word-break: keep-all;
  429. white-space: nowrap;
  430. overflow: hidden;
  431. text-overflow: ellipsis;
  432. a {
  433. color: #333;
  434. }
  435. }
  436. .ul_li:last-child {
  437. margin-bottom: 0;
  438. }
  439. .ul_li::before {
  440. content: '';
  441. position: absolute;
  442. left: 0px;
  443. top: 10px;
  444. width: 4px;
  445. height: 4px;
  446. background: #F2F2F2;
  447. border-radius: 2px;
  448. }
  449. }
  450. }
  451. .ul_box_3 {
  452. width: 100%;
  453. .ul_head {
  454. height: 47px;
  455. border-bottom: solid 1px #93969A;
  456. border-top: solid 1px #DCDDDF;
  457. margin: 0px;
  458. box-sizing: border-box;
  459. }
  460. .ul_head * {
  461. float: left;
  462. height: 100%;
  463. line-height: 47px;
  464. box-sizing: border-box;
  465. font-weight: bold;
  466. color: #A72213;
  467. font-size: 20px;
  468. border-bottom: solid 2px #A72213;
  469. }
  470. .ul_img_box {
  471. width: 100%;
  472. height: 268px;
  473. position: relative;
  474. margin-top: 20px;
  475. }
  476. .ul_img_box img {
  477. display: block;
  478. width: 100%;
  479. height: 100%;
  480. }
  481. .ul_img_dot1 {
  482. height: 50px;
  483. line-height: 50px;
  484. color: #fff;
  485. box-sizing: border-box;
  486. font-size: 14px;
  487. position: absolute;
  488. font-weight: bold;
  489. display: block;
  490. padding: 0px 15px;
  491. width: 100%;
  492. left: 0px;
  493. bottom: 0px;
  494. background: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, .6));
  495. word-break: keep-all;
  496. white-space: nowrap;
  497. overflow: hidden;
  498. text-overflow: ellipsis;
  499. }
  500. .ul_box {
  501. margin-top: 28px;
  502. overflow: hidden;
  503. width: 100%;
  504. .ul_li {
  505. line-height: 24px;
  506. height: 24px;
  507. position: relative;
  508. color: #333;
  509. font-size: 18px;
  510. text-indent: 9px;
  511. margin-bottom: 20px;
  512. word-break: keep-all;
  513. white-space: nowrap;
  514. overflow: hidden;
  515. text-overflow: ellipsis;
  516. a {
  517. color: #333;
  518. }
  519. }
  520. .ul_li:nth-of-type(1) {
  521. font-weight: bold;
  522. }
  523. .ul_li::before {
  524. content: '';
  525. position: absolute;
  526. left: 0px;
  527. top: 10px;
  528. width: 4px;
  529. height: 4px;
  530. background: #F2F2F2;
  531. border-radius: 2px;
  532. }
  533. }
  534. }
  535. .ul_box_4 {
  536. width: 100%;
  537. .ul_head {
  538. height: 47px;
  539. border-bottom: solid 1px #93969A;
  540. border-top: solid 1px #DCDDDF;
  541. margin: 0px;
  542. box-sizing: border-box;
  543. }
  544. .ul_head * {
  545. float: left;
  546. height: 100%;
  547. line-height: 47px;
  548. box-sizing: border-box;
  549. font-weight: bold;
  550. color: #A72213;
  551. font-size: 20px;
  552. border-bottom: solid 2px #A72213;
  553. }
  554. .ul_img_box {
  555. width: 100%;
  556. height: 268px;
  557. position: relative;
  558. margin-top: 28px;
  559. }
  560. .ul_img_box img {
  561. display: block;
  562. width: 100%;
  563. height: 100%;
  564. }
  565. .ul_img_dot1 {
  566. height: 50px;
  567. line-height: 50px;
  568. color: #fff;
  569. box-sizing: border-box;
  570. font-size: 14px;
  571. position: absolute;
  572. font-weight: bold;
  573. display: block;
  574. padding: 0px 15px;
  575. width: 100%;
  576. left: 0px;
  577. bottom: 0px;
  578. background: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, .6));
  579. word-break: keep-all;
  580. white-space: nowrap;
  581. overflow: hidden;
  582. text-overflow: ellipsis;
  583. }
  584. .ul_box {
  585. margin-top: 20px;
  586. overflow: hidden;
  587. width: 100%;
  588. .ul_li {
  589. line-height: 24px;
  590. height: 24px;
  591. position: relative;
  592. color: #333;
  593. font-size: 18px;
  594. text-indent: 9px;
  595. margin-bottom: 20px;
  596. word-break: keep-all;
  597. white-space: nowrap;
  598. overflow: hidden;
  599. text-overflow: ellipsis;
  600. a {
  601. color: #333;
  602. }
  603. }
  604. .ul_li:nth-of-type(1) {
  605. font-weight: bold;
  606. }
  607. .ul_li:last-child {
  608. margin-bottom: 0;
  609. }
  610. .ul_li::before {
  611. content: '';
  612. position: absolute;
  613. left: 0px;
  614. top: 10px;
  615. width: 4px;
  616. height: 4px;
  617. background: #F2F2F2;
  618. border-radius: 2px;
  619. }
  620. }
  621. }
  622. .ul_box_5 {
  623. width: 100%;
  624. .ul_head {
  625. height: 47px;
  626. border-bottom: solid 1px #93969A;
  627. border-top: solid 1px #DCDDDF;
  628. margin: 0px;
  629. box-sizing: border-box;
  630. }
  631. .ul_head * {
  632. float: left;
  633. height: 100%;
  634. line-height: 47px;
  635. box-sizing: border-box;
  636. font-weight: bold;
  637. color: #A72213;
  638. font-size: 20px;
  639. border-bottom: solid 2px #A72213;
  640. }
  641. .ul_box {
  642. margin-top: 20px;
  643. overflow: hidden;
  644. width: 100%;
  645. .ul_li {
  646. line-height: 24px;
  647. height: 24px;
  648. position: relative;
  649. color: #333;
  650. font-size: 18px;
  651. text-indent: 9px;
  652. margin-bottom: 19px;
  653. word-break: keep-all;
  654. white-space: nowrap;
  655. overflow: hidden;
  656. text-overflow: ellipsis;
  657. a {
  658. color: #333;
  659. }
  660. }
  661. .ul_li::before {
  662. content: '';
  663. position: absolute;
  664. left: 0px;
  665. top: 10px;
  666. width: 4px;
  667. height: 4px;
  668. background: #F2F2F2;
  669. border-radius: 2px;
  670. }
  671. }
  672. }
  673. .ul_box_6 {
  674. width: 100%;
  675. .ul_head {
  676. height: 47px;
  677. border-bottom: solid 1px #93969A;
  678. border-top: solid 1px #DCDDDF;
  679. margin: 0px;
  680. box-sizing: border-box;
  681. }
  682. .ul_head * {
  683. float: left;
  684. height: 100%;
  685. line-height: 47px;
  686. box-sizing: border-box;
  687. font-weight: bold;
  688. color: #A72213;
  689. font-size: 20px;
  690. border-bottom: solid 2px #A72213;
  691. }
  692. .ul_box {
  693. margin-top: 20px;
  694. overflow: hidden;
  695. width: 100%;
  696. .ul_li {
  697. line-height: 24px;
  698. height: 24px;
  699. position: relative;
  700. color: #333;
  701. font-size: 18px;
  702. text-indent: 9px;
  703. margin-bottom: 19px;
  704. word-break: keep-all;
  705. white-space: nowrap;
  706. overflow: hidden;
  707. text-overflow: ellipsis;
  708. a {
  709. color: #333;
  710. }
  711. }
  712. .ul_li:nth-of-type(1) {
  713. font-weight: bold;
  714. }
  715. .ul_li::before {
  716. content: '';
  717. position: absolute;
  718. left: 0px;
  719. top: 10px;
  720. width: 4px;
  721. height: 4px;
  722. background: #F2F2F2;
  723. border-radius: 2px;
  724. }
  725. }
  726. }
  727. </style>