WaterfallsFlowItem.vue 6.0 KB

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