NewsDetail.vue 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. <template>
  2. <div class="autoBox container-box">
  3. <div class="bread-crumb">
  4. <el-breadcrumb separator="/">
  5. <el-breadcrumb-item :to="{ path: 'home' }">{{lang=='en'? 'Home': '首页'}}</el-breadcrumb-item>
  6. <el-breadcrumb-item :to="{ path: 'ConferenceServices'}">{{lang=='en'? 'Conferences': '会议'}}</el-breadcrumb-item>
  7. <el-breadcrumb-item>{{lang=='en'? newData.titleEn: newData.title}}</el-breadcrumb-item>
  8. </el-breadcrumb>
  9. </div>
  10. <div class="content-box">
  11. <div class="news-content">
  12. <h3>{{lang=='en'? newData.titleEn: newData.title}}</h3>
  13. <p class="source">{{lang=='en'? 'Source: '+newData.dataSourceEn: '来源: '+newData.dataSource}}</p>
  14. <video
  15. :src="'./api/file/pub/'+newData.videoUrl" width="500" height="350" controls="controls"
  16. v-if="newData.videoUrl"
  17. id="lastConferenceVideo">
  18. Your browser does not support the video tag.
  19. </video>
  20. <div v-html="lang=='en'? newData.urlDescEn: newData.urlDesc"></div>
  21. </div>
  22. </div>
  23. </div>
  24. </template>
  25. <script>
  26. import { getNewDetail } from "@/api/meeting/meetingOutInfo";
  27. export default {
  28. data(){
  29. return {
  30. newData: {},
  31. lang: ''
  32. }
  33. },
  34. created(){
  35. this.lang = this.$i18n.locale;
  36. },
  37. watch: {
  38. '$i18n.locale'(val){
  39. this.lang = val;
  40. }
  41. },
  42. mounted(){
  43. getNewDetail(this.$route.query.key).then(res=>{
  44. console.log('媒体详情',res)
  45. this.newData = res.data;
  46. })
  47. },
  48. methods: {
  49. // getConferenceId(){
  50. // this.$store.commit('setConferenceId', window.localStorage.getItem('conferenceId'));
  51. // },
  52. }
  53. }
  54. </script>
  55. <style scoped>
  56. .container-box {
  57. margin: 10px auto;
  58. background: #fff;
  59. padding: 0 20px;
  60. box-sizing: border-box;
  61. min-height: calc( 100vh - 420px )
  62. }
  63. .bread-crumb {
  64. background: #fff;
  65. padding: 20px 0;
  66. }
  67. .content-box {
  68. position: relative;
  69. padding-bottom: 40px;
  70. }
  71. .news-content h3{
  72. text-align: center;
  73. line-height: 48px;
  74. padding: 30px 0;
  75. margin: 0;
  76. font-size: 32px;
  77. font-weight: normal;
  78. }
  79. .source{
  80. text-align: right;
  81. color: #555;
  82. }
  83. .news-content >>> img{
  84. display: block;
  85. margin: 30px auto;
  86. max-width: 100% !important;
  87. }
  88. .news-content >>> p{
  89. text-indent: 2em;
  90. line-height: 34px;
  91. font-size: 18px;
  92. margin: 0;
  93. }
  94. .news-content >>> video{
  95. display: block;
  96. margin: 30px auto;
  97. }
  98. </style>