WaterfallsFlowItem.vue 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  1. <template>
  2. <view @click="goDetail(item)" class="wf-page2" :style="viewColor">
  3. <view v-if="item" class='pictrue skeleton-rect'>
  4. <!-- <image :src='item.image[0]' mode="widthFix"></image> -->
  5. <easy-loadimage mode="widthFix" :image-src="item.image[0]"></easy-loadimage>
  6. <view v-if="isAuth && tab == 0 && item.status != 1" class="approval_status">
  7. <view v-if="item.status == -1" class="approval_title">审核未通过</view>
  8. <view v-else-if="item.status == -2" class="approval_title">已下架</view>
  9. <view v-else-if="item.status == 0" class="approval_title">正在审核</view>
  10. <text v-if="item.status == -1 || item.status == -2" class="approval_info">查看未通过原因</text>
  11. <text v-if="item.status == 0" class="approval_info">通过后将展示在列表</text>
  12. </view>
  13. </view>
  14. <view v-if="item" class='text'>
  15. <view class='name skeleton-rect'>
  16. <text class="text_name line2">
  17. {{item.title}}
  18. </text>
  19. </view>
  20. <view class="count acea-row skeleton-rect">
  21. <view v-if="!isAuth" class="author acea-row">
  22. <image class="image" :src="(item.author && item.author.avatar) || '/static/images/f.png'" mode="widthFix"></image>
  23. <text class="author_name line1">{{item.author && item.author.nickname}}</text>
  24. </view>
  25. <view v-else class="author acea-row">
  26. <text class="author_time">
  27. {{item.time}}
  28. </text>
  29. </view>
  30. <view class="like">
  31. <button class="like_count" hover-class="none" @click.stop="likeToggle(item)">
  32. <text class="iconfont" :class="item.relevance_id ? 'icon-shoucang1' : 'icon-dianzan'"></text>
  33. <text class="collect">{{item.count_start}}</text>
  34. </button>
  35. </view>
  36. </view>
  37. </view>
  38. </view>
  39. </template>
  40. <script>
  41. // +----------------------------------------------------------------------
  42. // | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
  43. // +----------------------------------------------------------------------
  44. // | Copyright (c) 2016~2021 https://www.crmeb.com All rights reserved.
  45. // +----------------------------------------------------------------------
  46. // | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
  47. // +----------------------------------------------------------------------
  48. // | Author: CRMEB Team <admin@crmeb.com>
  49. // +----------------------------------------------------------------------
  50. import easyLoadimage from '@/components/easy-loadimage/easy-loadimage.vue'
  51. import { mapGetters } from "vuex";
  52. export default {
  53. components:{easyLoadimage},
  54. computed: {...mapGetters(['viewColor'])},
  55. props: {
  56. item: {
  57. type: Object,
  58. require: true
  59. },
  60. type: {
  61. type: Number,
  62. default: 0
  63. },
  64. isAuth: {
  65. type: Boolean,
  66. default: false
  67. },
  68. tab: {
  69. type: Number,
  70. default: 1
  71. },
  72. isFind: {
  73. type: Boolean,
  74. default: false
  75. },
  76. },
  77. data() {
  78. return {
  79. isShowAuth: false,
  80. isAuto: false
  81. };
  82. },
  83. methods: {
  84. likeToggle(item){
  85. this.$emit('likeToggle',item)
  86. },
  87. goDetail(item){
  88. if(this.isFind){
  89. uni.navigateTo({
  90. url: '/pages/plantGrass/plant_featured/index?id='+item.topic_id
  91. });
  92. }else{
  93. uni.navigateTo({
  94. url: '/pages/plantGrass/plant_detail/index?id='+item.community_id
  95. });
  96. }
  97. }
  98. }
  99. }
  100. </script>
  101. <style lang="scss" scoped>
  102. .wf-page2 .pictrue{
  103. height: 345rpx;
  104. border-radius: 16rpx;
  105. position: relative;
  106. /deep/image,/deep/.easy-loadimage,uni-image{
  107. width: 100%;
  108. max-width: 345rpx;
  109. height: 345rpx;
  110. border-radius: 16rpx;
  111. }
  112. }
  113. .loadfail-img{
  114. width: 100%;
  115. height: 345rpx;
  116. }
  117. .wf-page2 .text{
  118. padding: 20rpx;
  119. width: 345rpx;
  120. .name{
  121. color: #333333;
  122. font-size: 28rpx;
  123. font-weight: bold;
  124. }
  125. .count{
  126. margin-top: 20rpx;
  127. justify-content: space-between;
  128. .author{
  129. align-items: center;
  130. }
  131. .author_name{
  132. margin-left: 10rpx;
  133. max-width: 120rpx;
  134. font-size: 24rpx;
  135. color: #333333;
  136. max-width: 180rpx;
  137. }
  138. .author_time{
  139. color: #666666;
  140. }
  141. .like{
  142. font-size: 24rpx;
  143. color: #999999;
  144. display: flex;
  145. .like_count{
  146. display: flex;
  147. align-items: center;
  148. }
  149. .iconfont{
  150. font-size: 30rpx;
  151. }
  152. .icon-shoucang1{
  153. color: var(--view-priceColor);
  154. }
  155. .collect{
  156. font-size: 24rpx;
  157. margin-left: 5rpx;
  158. }
  159. }
  160. }
  161. }
  162. .wf-page2 .author .image,.wf-page2 .author uni-image{
  163. width: 46rpx;
  164. height: 46rpx;
  165. border-radius: 100%;
  166. }
  167. .approval_status{
  168. width: 100%;
  169. height: 100%;
  170. background: rgba(0,0,0,.4);
  171. position: absolute;
  172. top: 0;
  173. left: 0;
  174. border-radius: 16rpx;
  175. color: #fff;
  176. text-align: center;
  177. z-index: 5;
  178. .approval_title{
  179. font-size: 28rpx;
  180. margin-top: 135rpx;
  181. font-weight: bold;
  182. }
  183. .approval_info{
  184. font-size: 24rpx;
  185. margin-top: 24rpx;
  186. }
  187. }
  188. </style>