notifiesPageDetails.vue 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. <template>
  2. <view class="bg">
  3. <view class="Articletitle">
  4. {{ info.title }}
  5. </view>
  6. <view class="vHtml">
  7. <u-parse class="vHtml" :content="info.content"></u-parse>
  8. </view>
  9. </view>
  10. </template>
  11. <script>
  12. import {
  13. notifiesDetails
  14. } from '@/http/api/common.js'
  15. export default {
  16. data() {
  17. return {
  18. info:null
  19. }
  20. },
  21. onLoad(e) {
  22. if (e.id) {
  23. this.getnotifiesDetails(e.id)
  24. }
  25. },
  26. methods: {
  27. async getnotifiesDetails(id){
  28. let res = await notifiesDetails(id)
  29. if (res.data.code == 200) {
  30. this.info = res.data.data
  31. }
  32. },
  33. }
  34. }
  35. </script>
  36. <style lang="scss">
  37. .bg{
  38. width: 750rpx;
  39. margin: 0 auto;
  40. display: flex;
  41. flex-direction: column;
  42. align-items: flex-start;
  43. padding-left: 20rpx;
  44. }
  45. .Articletitle{
  46. width: 710rpx;
  47. height: 112rpx;
  48. font-size: 40rpx;
  49. font-family: PingFang SC, PingFang SC;
  50. font-weight: bold;
  51. color: #333333;
  52. /* line-height: 56rpx; */
  53. display: flex;
  54. align-items: center;
  55. // display: -webkit-box;
  56. word-break: break-all;
  57. text-overflow: ellipsis;
  58. overflow: hidden;
  59. -webkit-box-orient: vertical;
  60. -webkit-line-clamp:2;
  61. }
  62. .vHtml{
  63. width: 710rpx;
  64. }
  65. .vHtml img {
  66. vertical-align: middle;
  67. border-style: none;
  68. width: 100%;
  69. height: auto;
  70. }
  71. .vHtml p {
  72. margin-top: 30rpx;
  73. margin-bottom: 30rpx;
  74. }
  75. </style>