index.vue 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  1. <template>
  2. <view class="page-content regulationsdetails">
  3. <view class="regulationsdetails-content">
  4. <view class="regulationsdetails-item regulationsdetails-arttitle">
  5. <view class="item-content">
  6. <view class="item-text">
  7. <view class="item-textlable">
  8. <text class="item-lable">标题:</text>
  9. </view>
  10. <view class="item-textvalue">
  11. <text class="item-value">{{ regulationsDetailsObj.artTitle }}</text>
  12. </view>
  13. </view>
  14. </view>
  15. </view>
  16. <view class="regulationsdetails-item regulationsdetails-artauthor">
  17. <view class="item-content">
  18. <view class="item-text">
  19. <view class="item-textlable">
  20. <text class="item-lable">作者:</text>
  21. </view>
  22. <view class="item-textvalue">
  23. <text class="item-value">{{ regulationsDetailsObj.artAuthor }}</text>
  24. </view>
  25. </view>
  26. </view>
  27. </view>
  28. <view class="regulationsdetails-item regulationsdetails-artsummary">
  29. <view class="item-content">
  30. <view class="item-text">
  31. <view class="item-textlable">
  32. <text class="item-lable">简介:</text>
  33. </view>
  34. <view class="item-textvalue">
  35. <text class="item-value">{{ regulationsDetailsObj.artSummary }}</text>
  36. </view>
  37. </view>
  38. </view>
  39. </view>
  40. <view class="regulationsdetails-artcontent">
  41. <view class="artcontent-text">
  42. <view class="artcontent-textlable">
  43. <text class="artcontent-lable">内容:</text>
  44. </view>
  45. <view class="artcontent-textvalue">
  46. <view class="u-content">
  47. <u-parse
  48. :html="regulationsDetailsObj.artContent"
  49. :selectable="false"
  50. :show-with-animation="true"
  51. ></u-parse>
  52. </view>
  53. </view>
  54. </view>
  55. </view>
  56. </view>
  57. </view>
  58. </template>
  59. <script>
  60. import { regulationsViewData } from '@/agrcloud-api/regulations';
  61. export default {
  62. name: 'regulationsDetails',
  63. data() {
  64. return {
  65. regulationsDetailsObj: {
  66. artTitle: '',
  67. artAuthor: '',
  68. artSummary: '',
  69. artContent: ''
  70. }
  71. };
  72. },
  73. onLoad() {
  74. this.initData();
  75. },
  76. methods: {
  77. /** 初始化数据 */
  78. initData() {
  79. const currRegulationDetailsItem = (this.$store.getters || {}).regulationsDetailsObj || {};
  80. regulationsViewData({
  81. id: currRegulationDetailsItem.artId
  82. }).then(res => {
  83. this.regulationsDetailsObj = res.data || {};
  84. }).catch(() => {
  85. this.regulationsDetailsObj = {};
  86. });
  87. }
  88. }
  89. }
  90. </script>
  91. <style lang="scss" scoped>
  92. .regulationsdetails {
  93. padding: 0;
  94. .regulationsdetails-content {
  95. width: 100%;
  96. padding-top: 24rpx;
  97. .regulationsdetails-item {
  98. height: 138rpx;
  99. padding-left: 24rpx;
  100. background-color: #ffffff;
  101. .item-content {
  102. height: 138rpx;
  103. border-bottom: 1px solid #eeeeee;
  104. .item-text {
  105. padding: 24rpx 24rpx 24rpx 0;
  106. .item-textlable {
  107. height: 42rpx;
  108. line-height: 42rpx;
  109. .item-lable {
  110. height: 42rpx;
  111. font-size: 30rpx;
  112. font-family: PingFangSC-Regular, PingFang SC;
  113. font-weight: 400;
  114. color: #666666;
  115. line-height: 42rpx;
  116. }
  117. }
  118. .item-textvalue {
  119. height: 48rpx;
  120. line-height: 48rpx;
  121. .item-value {
  122. height: 48rpx;
  123. font-size: 34rpx;
  124. font-family: PingFangSC-Regular, PingFang SC;
  125. font-weight: 400;
  126. color: #333333;
  127. line-height: 48rpx;
  128. }
  129. }
  130. }
  131. }
  132. }
  133. .regulationsdetails-artcontent {
  134. margin-top: 24rpx;
  135. background-color: #ffffff;
  136. min-height: 154rpx;
  137. .artcontent-text {
  138. padding: 24rpx;
  139. .artcontent-textlable {
  140. height: 42rpx;
  141. line-height: 42rpx;
  142. .artcontent-lable {
  143. height: 42rpx;
  144. font-size: 30rpx;
  145. font-family: PingFangSC-Regular, PingFang SC;
  146. font-weight: 400;
  147. color: #666666;
  148. line-height: 42rpx;
  149. }
  150. }
  151. .artcontent-textvalue {
  152. .artcontent-textarea {
  153. min-height: 48rpx;
  154. font-size: 34rpx;
  155. font-family: PingFangSC-Regular, PingFang SC;
  156. font-weight: 400;
  157. color: #333333;
  158. }
  159. }
  160. }
  161. }
  162. }
  163. }
  164. </style>