alumni_detail.vue 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. <template>
  2. <view class="detail">
  3. <view class="detail-image">
  4. <image class="detail-image" :src="detail.cover_resource?detail.cover_resource.url:''" mode="aspectFill"></image>
  5. </view>
  6. <view class="news_detail">
  7. <view class="title">
  8. {{detail.title}}
  9. </view>
  10. <view class="time">
  11. {{detail.created_at}}
  12. </view>
  13. <!-- <view class="img">
  14. <image :src="detail.cover_resource ? detail.cover_resource.url :'../../static/images/active_top.png'"></image>
  15. </view> -->
  16. <view class="top">
  17. <u-parse :html="detail.body"></u-parse>
  18. </view>
  19. </view>
  20. </view>
  21. </template>
  22. <script>
  23. export default {
  24. data() {
  25. return {
  26. detail: ''
  27. }
  28. },
  29. onLoad(options) {
  30. let id = options.id
  31. this.get_content(id)
  32. },
  33. methods: {
  34. get_content(id) {
  35. let params = {
  36. title: '',
  37. organization_id: '',
  38. category_id: 2,
  39. id: id
  40. }
  41. this.$u.get('/page/news/' + id).then(res => {
  42. console.log(res, 'content')
  43. this.detail = res.data
  44. })
  45. }
  46. }
  47. }
  48. </script>
  49. <style lang="scss" scoped>
  50. page{
  51. padding: 0;
  52. }
  53. .detail{
  54. .detail-image{
  55. height: 178px;
  56. width: 100%;
  57. // width: 100%;
  58. }
  59. }
  60. .news_detail {
  61. padding: 16px;
  62. image {
  63. width: 100%;
  64. height: 198px;
  65. }
  66. .title {
  67. font-size: 17px;
  68. font-weight: 500;
  69. line-height: 20px;
  70. color: #282828;
  71. line-height: 22px;
  72. opacity: 1;
  73. }
  74. .time {
  75. margin-top: 15px;
  76. font-weight: 400;
  77. line-height: 9px;
  78. font-size: 12px;
  79. color: #A2A2A2;
  80. opacity: 1;
  81. }
  82. .img {
  83. height: 133px;
  84. overflow: hidden;
  85. border-radius: 10px;
  86. margin-top: 20px;
  87. image {
  88. width: 100%;
  89. }
  90. }
  91. .top {
  92. margin-top: 20px;
  93. text-align: justify;
  94. }
  95. }
  96. </style>