info.vue 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. <template>
  2. <view class="container">
  3. <view class="notice-item"><jyf-parser :html="description" ref="article"></jyf-parser></view>
  4. <view class="title">{{ list.title }}</view>
  5. <view class="synopsis">{{ list.synopsis }}</view>
  6. <view class="pad">
  7. <view class="love-box">
  8. <view class="main flex">
  9. <view class="erweima-box">
  10. <view class="erweima">
  11. <image src="../../static/img/gongzhonghao.png" mode=""></image>
  12. </view>
  13. <view class="font">罗田县红十字会公众号</view>
  14. </view>
  15. <image class="main-image" src="../../static/img/index-love.png" mode=""></image>
  16. <view class="erweima-box">
  17. <view class="erweima">
  18. <image src="../../static/img/lovetongdao.png" mode=""></image>
  19. </view>
  20. <view class="font">爱心捐款通道</view>
  21. </view>
  22. </view>
  23. </view>
  24. </view>
  25. </view>
  26. </template>
  27. <script>
  28. import { details, deconstructArticle } from '@/api/info.js';
  29. import jyfParser from '@/components/jyf-parser/jyf-parser.vue';
  30. export default {
  31. components: {
  32. jyfParser
  33. },
  34. data() {
  35. return {
  36. id: '',
  37. list: '',
  38. description: '',
  39. type: 0
  40. };
  41. },
  42. onLoad(option) {
  43. this.id = option.id;
  44. this.loadData();
  45. },
  46. methods: {
  47. loadData() {
  48. let obj = this;
  49. details({}, obj.id).then(function(e) {
  50. obj.list = e.data;
  51. console.log(obj.list);
  52. if (obj.list.content != null) {
  53. obj.description = obj.list.content.replace(/<img/g, "<img style='max-width:100%;height:auto;'");
  54. } //小程序商品详情图超出屏幕问题
  55. });
  56. }
  57. }
  58. };
  59. </script>
  60. <style lang="scss">
  61. page {
  62. min-height: 100%;
  63. background: #ffffff;
  64. }
  65. .notice_name {
  66. font-size: 35rpx !important;
  67. color: #303133;
  68. padding: 25rpx 25rpx 0rpx 25rpx;
  69. margin-bottom: 25rpx;
  70. }
  71. .course-video {
  72. width: 100%;
  73. height: 500rpx;
  74. }
  75. .notice-item {
  76. width: 100%;
  77. height: 500rpx;
  78. color: #666666;
  79. font-size: 23rpx;
  80. padding-bottom: 30rpx;
  81. }
  82. .title {
  83. margin-top: 66rpx;
  84. padding-left: 30rpx;
  85. font-size: 34rpx;
  86. font-family: PingFang SC;
  87. font-weight: bold;
  88. color: #333333;
  89. }
  90. .synopsis {
  91. padding-left: 30rpx;
  92. font-size: 26rpx;
  93. font-family: PingFang SC;
  94. font-weight: 500;
  95. color: #999999;
  96. }
  97. .pad {
  98. padding-bottom: 170rpx;
  99. }
  100. .love-box {
  101. margin: 60rpx auto 0;
  102. width: 689rpx;
  103. height: 336rpx;
  104. background: #FFFFFF;
  105. border: 4px solid #F3392C;
  106. padding: 0rpx 35rpx 10rpx 24rpx;
  107. .main{
  108. padding-top: 50rpx;
  109. position: relative;
  110. justify-content: space-between;
  111. .main-image {
  112. position: absolute;
  113. top: 90rpx;
  114. left: 170rpx;
  115. width: 312rpx;
  116. height: 164rpx;
  117. z-index: 1;
  118. }
  119. .erweima-box {
  120. text-align: center;
  121. position: relative;
  122. z-index: 2;
  123. display: flex;
  124. flex-direction: column;
  125. align-items: center;
  126. .erweima {
  127. width: 204rpx;
  128. height: 204rpx;
  129. background: #000000;
  130. image{
  131. width: 100%;
  132. height: 100%;
  133. }
  134. }
  135. .font {
  136. margin-top: 14rpx;
  137. font-size: 22rpx;
  138. font-family: PingFang SC;
  139. font-weight: 500;
  140. color: #333333;
  141. }
  142. }
  143. }
  144. }
  145. </style>