waJue.vue 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. <template>
  2. <view class="box">
  3. <u-navbar :autoBack="true" title="价值挖掘" bgColor="rgba(255,255,255,0)" :placeholder="true" titleStyle="font-weight:bold;color:#000000"></u-navbar>
  4. <view class="">
  5. <view v-if="images.length > 0" style="width: 90%; margin: auto">
  6. <u-swiper
  7. @click="clickImg"
  8. :list="images"
  9. imgMode="aspectFill"
  10. :height="160"
  11. :indicator="true"
  12. radius="5"
  13. :autoplay="true"
  14. :circular="true"
  15. indicatorStyle="bottom: 10px"
  16. indicatorMode="dot"
  17. indicatorActiveColor="#fff"
  18. indicatorInactiveColor="rgba(255, 255, 255, 0.35)"
  19. ></u-swiper>
  20. </view>
  21. <view v-else class="box_2">
  22. <image style="width: 100%; height: 100%" :src="list.image" />
  23. </view>
  24. <view style="width: 76%; display: flex; justify-content: space-between; align-items: center">
  25. <view class="text_4">投稿人:{{ list.from }}</view>
  26. <view class="text_4">{{ list.publish_at }}</view>
  27. </view>
  28. <view class="text-wrapper_1">
  29. <u-parse :content="list.content"></u-parse>
  30. </view>
  31. </view>
  32. </view>
  33. </template>
  34. <script>
  35. let that;
  36. export default {
  37. data() {
  38. return {
  39. list: {},
  40. images: []
  41. };
  42. },
  43. onLoad(o) {
  44. that = this;
  45. this.getContentDetail(o.id);
  46. },
  47. methods: {
  48. getContentDetail(id) {
  49. this.$api.getContentDetail({ main_body_id: 1, id: id }, function (res) {
  50. console.log(res, '挖掘详情');
  51. that.list = res.data;
  52. if (res.data.images.length > 0) {
  53. that.images = res.data.images;
  54. }
  55. });
  56. },
  57. // 图片预览
  58. clickImg(index) {
  59. // console.log(index, 555);
  60. var imgs = this.list.images;
  61. let temp = [imgs[index]];
  62. // console.log('temp', temp);
  63. uni.previewImage({
  64. urls: imgs,
  65. current: index,
  66. success: function (data) {
  67. console.log(data);
  68. },
  69. fail: function (err) {
  70. console.log(err.errMsg);
  71. }
  72. });
  73. }
  74. }
  75. };
  76. </script>
  77. <style>
  78. /deep/.u-swiper-indicator__wrapper__dot--active {
  79. width: 5px !important;
  80. }
  81. .box {
  82. height: auto;
  83. width: 100%;
  84. padding-bottom: 50rpx;
  85. background-image: url('https://huli-app.wenlvti.net/app_static/wuyuan/static/shouhu/wyj-feiyi3-001.png');
  86. background-attachment: fixed;
  87. background-repeat: repeat-y;
  88. background-size: 100% 100%;
  89. min-height: 100%;
  90. height: auto;
  91. /* background-color: #fff9e9; */
  92. }
  93. .box_2 {
  94. box-shadow: 0px 30px 60px 0px rgba(19, 104, 158, 0.1);
  95. background-color: rgba(255, 255, 255, 1);
  96. border-radius: 20rpx;
  97. position: relative;
  98. width: 690rpx;
  99. height: 322rpx;
  100. display: flex;
  101. flex-direction: column;
  102. margin: 0 0 20rpx 30rpx;
  103. box-shadow: rgba(0, 0, 0, 0.1) 0px 20rpx 15px -6rpx, rgba(0, 0, 0, 0.05) 0px 8rpx 12rpx -4rpx;
  104. }
  105. .text_4 {
  106. width: 112rpx;
  107. height: 28rpx;
  108. overflow-wrap: break-word;
  109. color: #727070;
  110. font-size: 26rpx;
  111. font-family: SourceHanSansCN-Bold;
  112. text-align: left;
  113. white-space: nowrap;
  114. line-height: 28rpx;
  115. margin: 60rpx 0 0 47rpx;
  116. }
  117. .text-group_4 {
  118. width: 263rpx;
  119. height: 61rpx;
  120. display: flex;
  121. flex-direction: column;
  122. justify-content: space-between;
  123. margin: 163rpx 0 0 180rpx;
  124. }
  125. .text-wrapper_1 {
  126. /* background-color: rgba(255, 255, 255, 1); */
  127. border-radius: 20rpx;
  128. /* height: 500rpx; */
  129. display: flex;
  130. flex-direction: column;
  131. width: 686rpx;
  132. margin: 20rpx 0 0 32rpx;
  133. }
  134. .text_5 {
  135. width: 652rpx;
  136. height: 279rpx;
  137. overflow-wrap: break-word;
  138. font-size: 28rpx;
  139. font-family: SourceHanSansCN-Regular;
  140. font-weight: normal;
  141. text-align: justifyLeft;
  142. line-height: 48rpx;
  143. margin: 44rpx 0 0 16rpx;
  144. overflow: scroll;
  145. text-indent: 2rem;
  146. }
  147. </style>