activeParty.vue 4.9 KB

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