activeParty.vue 4.4 KB

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