activeParty.vue 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. <template>
  2. <view :style="'padding-top:' + mbConfig +'rpx;'" v-if="explosiveMoney.length">
  3. <view :style="'background-color:' + boxColor+';'">
  4. <view class="hot-img">
  5. <!--单行展示-->
  6. <block v-if="tabConfig == 0">
  7. <view class="item skeleton-rect" v-for="(item, index) in explosiveMoney" :key="index" @click="goDetail(item)">
  8. <view class="title area-row">{{ item.info[0].value }}</view>
  9. <view class="msg area-row line1">{{ item.info[1].value }}</view>
  10. <view class="img">
  11. <easy-loadimage mode="widthFix" :image-src="item.img"></easy-loadimage>
  12. </view>
  13. </view>
  14. </block>
  15. <!--多行展示-->
  16. <block v-if="tabConfig == 1">
  17. <view class="bd">
  18. <view class="item skeleton-rect" v-for="(item, index) in explosiveMoney" :key="index" @click="goDetail(item)">
  19. <view class="left">
  20. <view class="title area-row">{{ item.info[0].value }}</view>
  21. <view class="msg area-row line1">{{ item.info[1].value }}</view>
  22. </view>
  23. <view class="img">
  24. <easy-loadimage mode="widthFix" :image-src="item.img"></easy-loadimage>
  25. </view>
  26. </view>
  27. </view>
  28. </block>
  29. </view>
  30. </view>
  31. </view>
  32. </template>
  33. <script>
  34. // +----------------------------------------------------------------------
  35. // | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
  36. // +----------------------------------------------------------------------
  37. // | Copyright (c) 2016~2024 https://www.crmeb.com All rights reserved.
  38. // +----------------------------------------------------------------------
  39. // | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
  40. // +----------------------------------------------------------------------
  41. // | Author: CRMEB Team <admin@crmeb.com>
  42. // +----------------------------------------------------------------------
  43. import {merPath} from "@/utils/index"
  44. export default {
  45. name: 'activeParty',
  46. props: {
  47. dataConfig: {
  48. type: Object,
  49. default: () => {}
  50. },
  51. merId: {
  52. type: String || Number,
  53. default: ''
  54. }
  55. },
  56. data() {
  57. return {
  58. explosiveMoney: this.dataConfig.menuConfig.list,
  59. themeColor: this.dataConfig.themeColor.color[0].item,
  60. bgColor: this.dataConfig.bgColor.color,
  61. mbConfig: this.dataConfig.mbConfig.val*2,
  62. boxColor: this.dataConfig.boxColor.color[0].item,
  63. tabConfig: this.dataConfig.tabConfig.tabVal, //展示样式
  64. };
  65. },
  66. created() {},
  67. methods: {
  68. goDetail(url){
  69. let urls = url.info[2].value
  70. urls = merPath(urls, this.merId)
  71. this.$util.JumpPath(urls);
  72. }
  73. }
  74. }
  75. </script>
  76. <style scoped lang="scss">
  77. .hot-img {
  78. margin: 0 20rpx 0;
  79. padding: 20rpx 0;
  80. display: flex;
  81. align-items: center;
  82. justify-content: space-between;
  83. .item {
  84. display: block;
  85. width: 23.5%;
  86. background-color: #fefeff;
  87. padding: 20rpx 0 10rpx;
  88. border-radius: 8rpx;
  89. text-align: center;
  90. box-shadow: 2px 1px 6px 1px rgba(0, 0, 0, 0.03);
  91. box-sizing: border-box;
  92. .title {
  93. font-weight: bold;
  94. color: #282828;
  95. height: 40rpx;
  96. }
  97. .msg {
  98. margin: 5rpx auto 0;
  99. font-size: 20rpx;
  100. max-width: 150rpx;
  101. height: 40rpx;
  102. }
  103. .img {
  104. margin: 10rpx auto 0;
  105. width: 130rpx;
  106. height: 130rpx;
  107. /deep/image,/deep/.easy-loadimage,/deep/uni-image,/deep/.loadfail-img {
  108. width: 130rpx!important;
  109. height: 130rpx!important;
  110. }
  111. }
  112. &:first-child .msg {
  113. color: #8fbbe8;
  114. }
  115. &:nth-child(2) .msg {
  116. color: #d797b7;
  117. }
  118. &:nth-child(3) .msg {
  119. color: #c49bd1;
  120. }
  121. &:nth-child(4) .msg {
  122. color: #a3bf95;
  123. }
  124. }
  125. }
  126. .bd{
  127. display: flex;
  128. flex-wrap: wrap;
  129. width: 100%;
  130. .item{
  131. display: flex;
  132. align-items: center;
  133. width: 49%;
  134. margin-right: 2%;
  135. background: #fff;
  136. border-radius: 16rpx;
  137. padding: 20rpx;
  138. justify-content: space-between;
  139. &:nth-child(3),&:nth-child(4){
  140. margin-top: 20rpx;
  141. }
  142. &:nth-child(2n){
  143. margin-right: 0;
  144. }
  145. .left{
  146. width: 150rpx;
  147. align-items: center;
  148. }
  149. .img{
  150. margin: 0;
  151. }
  152. /deep/image,/deep/.easy-loadimage,/deep/uni-image,/deep/.loadfail-img {
  153. width: 120rpx!important;
  154. height: 120rpx!important;
  155. }
  156. }
  157. }
  158. </style>