activeParty.vue 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195
  1. <template>
  2. <view v-show="!isSortType">
  3. <view class="explosion" :style="'margin-top:' + mbConfig*2 +'rpx;background-color:' + boxColor+';'"
  4. v-if="explosiveMoney.length">
  5. <view class="hd skeleton-rect">
  6. <!-- <image src="/static/images/explosion-title.png" mode=""></image> -->
  7. <view class="title" :style="'color:'+themeColor+';'">{{$t(titleConfig)}}</view>
  8. <view class="txt"
  9. :style="'background: linear-gradient(90deg, '+ bgColor[0].item +' 0%, '+ bgColor[1].item +' 100%);'">
  10. {{$t(desConfig)}}
  11. </view>
  12. </view>
  13. <view class="bd">
  14. <view class="item skeleton-rect" @click="goDetail(item)" v-for="(item,index) in explosiveMoney" :key="index">
  15. <view class="con-box">
  16. <view class="title line1">{{$t(item.info[0].value)}}</view>
  17. <view class="con line2">{{$t(item.info[1].value)}}</view>
  18. <view class="go">GO!<image src="/static/images/right-icon.png" mode=""></image>
  19. </view>
  20. </view>
  21. <image :src="item.img" mode="aspectFill"></image>
  22. </view>
  23. </view>
  24. </view>
  25. </view>
  26. </template>
  27. <script>
  28. export default {
  29. name: 'activeParty',
  30. props: {
  31. dataConfig: {
  32. type: Object,
  33. default: () => {}
  34. },
  35. isSortType: {
  36. type: String | Number,
  37. default: 0
  38. }
  39. },
  40. data() {
  41. return {
  42. titleConfig: this.dataConfig.titleConfig.value,
  43. desConfig: this.dataConfig.desConfig.value,
  44. explosiveMoney: this.dataConfig.menuConfig.list,
  45. themeColor: this.dataConfig.themeColor.color[0].item,
  46. bgColor: this.dataConfig.bgColor.color,
  47. mbConfig: this.dataConfig.mbConfig.val,
  48. boxColor: this.dataConfig.boxColor.color[0].item
  49. };
  50. },
  51. created() {},
  52. methods: {
  53. goDetail(item) {
  54. let urls = item.info[2].value
  55. if (['/pages/goods_cate/goods_cate', '/pages/order_addcart/order_addcart', '/pages/user/index']
  56. .indexOf(urls) == -1) {
  57. uni.navigateTo({
  58. url: urls
  59. })
  60. } else {
  61. uni.switchTab({
  62. url: urls
  63. })
  64. }
  65. }
  66. }
  67. }
  68. </script>
  69. <style lang="scss">
  70. .explosion {
  71. width: 710rpx;
  72. margin-top: 20rpx;
  73. margin: 20rpx auto 0 auto;
  74. padding: 30rpx 20rpx;
  75. padding: 30rpx 20rpx 6rpx 20rpx;
  76. background-color: #FFE5E3;
  77. background-size: 100% 100%;
  78. border-radius: 13px;
  79. box-sizing: border-box;
  80. .hd {
  81. display: flex;
  82. align-items: center;
  83. .title {
  84. font-size: 32rpx;
  85. font-weight: bold;
  86. margin-right: 12rpx;
  87. }
  88. image {
  89. width: 147rpx;
  90. height: 35rpx;
  91. margin-right: 20rpx;
  92. }
  93. .txt {
  94. padding: 0 10rpx;
  95. height: 36rpx;
  96. // background: linear-gradient(90deg, rgba(255, 168, 0, 1) 0%, rgba(255, 34, 15, 1) 100%);
  97. border-radius: 26rpx 0px 26rpx 0px;
  98. color: #fff;
  99. text-align: center;
  100. font-size: 22rpx;
  101. box-shadow: 3px 1px 1px 1px var(--view-minorColorT);
  102. }
  103. }
  104. .bd {
  105. display: flex;
  106. flex-wrap: wrap;
  107. margin-top: 28rpx;
  108. .item {
  109. display: flex;
  110. align-items: center;
  111. justify-content: space-between;
  112. position: relative;
  113. width: 325rpx;
  114. height: 180rpx;
  115. margin-bottom: 20rpx;
  116. margin-right: 20rpx;
  117. background-color: #fff;
  118. border-radius: 16rpx;
  119. padding: 0 20rpx;
  120. box-sizing: border-box;
  121. image {
  122. width: 140rpx;
  123. height: 140rpx;
  124. }
  125. .con-box {
  126. display: flex;
  127. flex-direction: column;
  128. justify-content: center;
  129. width: 130rpx;
  130. height: 100%;
  131. .title {
  132. color: #282828;
  133. font-size: 28rpx;
  134. }
  135. .con {
  136. color: #999999;
  137. font-size: 20rpx;
  138. margin-top: 2rpx;
  139. }
  140. .go {
  141. display: flex;
  142. align-items: center;
  143. justify-content: center;
  144. margin-top: 10rpx;
  145. width: 112rpx;
  146. height: 36rpx;
  147. border-radius: 18rpx;
  148. color: #fff;
  149. font-size: 26rpx;
  150. font-weight: bold;
  151. font-style: italic;
  152. image {
  153. width: 26rpx;
  154. height: 26rpx;
  155. }
  156. }
  157. }
  158. &:first-child .go {
  159. background: linear-gradient(90deg, rgba(75, 196, 255, 1) 0%, rgba(32, 126, 255, 1) 100%);
  160. }
  161. &:nth-child(2) .go {
  162. background: linear-gradient(90deg, rgba(255, 144, 67, 1) 0%, rgba(255, 83, 29, 1) 100%);
  163. }
  164. &:nth-child(3) .go {
  165. background: linear-gradient(90deg, rgba(150, 225, 135, 1) 0%, rgba(72, 206, 44, 1) 100%);
  166. }
  167. &:nth-child(4) .go {
  168. background: linear-gradient(90deg, rgba(255, 197, 96, 1) 0%, rgba(255, 156, 0, 1) 100%);
  169. }
  170. &:nth-child(2n) {
  171. margin-right: 0;
  172. }
  173. }
  174. }
  175. }
  176. </style>