瑜璟缘官网
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.
 
 
 

89 lignes
2.3 KiB

  1. <template>
  2. <div class="Box">
  3. <div class="leftBox">
  4. <textTitle text="优秀案例"/>
  5. <div class="imgBox" v-for="(item, index) in list" :key="index">
  6. <div class="casesBox" @click="goparticulars(item)">
  7. <div class="imgBox">
  8. <img class="img" :src="item.mainPicRealPath" >
  9. <h1>{{item.title}}</h1>
  10. <span>培训时间:{{item.publishDate}}</span>
  11. </div>
  12. </div>
  13. </div>
  14. </div>
  15. <sidebar/>
  16. </div>
  17. </template>
  18. <script>
  19. import textTitle from "@/components/headTail/textTitle";
  20. import sidebar from "@/components/sidebar/sidebar";
  21. /* import cases from "@/components/partner/case";
  22. */import { homeService } from "@/api"
  23. import moment from "moment"
  24. export default {
  25. components: {
  26. textTitle,
  27. sidebar,
  28. /* cases, */
  29. },
  30. data() {
  31. return {
  32. list: []
  33. }
  34. },
  35. methods:{
  36. goparticulars(item){
  37. let detailId= item.id + ".html"
  38. this.$router.push({name: "particulars",params:{ id: detailId, ifjournalism: 1}})
  39. },
  40. /* 新闻列表 */
  41. getList() {
  42. let d = {
  43. type: this.$route.query.type,
  44. pageNum: 1,
  45. pageSize: 1000
  46. }
  47. homeService.getNewsList(d).then(res => {
  48. res.list.forEach(ele => {
  49. ele.publishDate = moment(ele.publishDate).format("YYYY-MM-DD")
  50. });
  51. this.list = res.list
  52. })
  53. }
  54. },
  55. created() {
  56. this.getList()
  57. }
  58. };
  59. </script>
  60. <style lang="scss" scoped>
  61. .partner{
  62. float: left;
  63. width: 200px;
  64. height: 200px;
  65. }
  66. .casesBox{
  67. float: left;
  68. margin-left: 20px;
  69. margin-right: 20px;
  70. width: 360px;
  71. }
  72. .imgBox{
  73. margin: 10px 30px;
  74. .img{
  75. width: 300px;
  76. height: 200px;
  77. // background-color: sandybrown;
  78. }
  79. h1{
  80. text-align: center;
  81. font-size: 18px;
  82. margin: 10px 0;
  83. }
  84. span{
  85. display: block;
  86. text-align: center;
  87. }
  88. }
  89. </style>