index.vue 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185
  1. <template>
  2. <view :style="colorStyle">
  3. <image :src="imgHost+'/statics/images/header.png'" mode="" class="img"></image>
  4. <view class="tipaddress">
  5. <view class="title">{{fromActive == 1?'激活送好礼':'新人大礼包'}}</view>
  6. <view class="list">
  7. <view class="list-img acea-row row-between-wrapper" :style="{backgroundImage:'url('+imgHost+'/statics/images/box1.png'+')'}" v-if="comerGift.product_count>0 && fromActive == 0">
  8. <view class="left acea-row row-center-wrapper">
  9. <image :src="imgHost+'/statics/images/vip.png'" mode=""></image>
  10. </view>
  11. <view class="right">新人专享价商品</view>
  12. </view>
  13. <view class="list-img acea-row row-between-wrapper" :style="{backgroundImage:'url('+imgHost+'/statics/images/box1.png'+')'}" v-if="comerGift.first_order_discount>0 && fromActive == 0">
  14. <view class="left">
  15. {{parseFloat(comerGift.first_order_discount)/10 || 10}}<text class="text">折</text>
  16. </view>
  17. <view class="right">新人首单优惠</view>
  18. </view>
  19. <view class="list-img acea-row row-between-wrapper" :style="{backgroundImage:'url('+imgHost+'/statics/images/box1.png'+')'}" v-if="comerGift.register_give_integral>0">
  20. <view class="left">{{comerGift.register_give_integral}}</view>
  21. <view class="right">新人赠送积分</view>
  22. </view>
  23. <view class="list-img acea-row row-between-wrapper" :style="{backgroundImage:'url('+imgHost+'/statics/images/box1.png'+')'}" v-if="comerGift.register_give_money>0">
  24. <view class="left">{{comerGift.register_give_money}}<text class="text">元</text></view>
  25. <view class="right">新人赠送余额</view>
  26. </view>
  27. <view class="list-img acea-row row-between-wrapper" :style="{backgroundImage:'url('+imgHost+'/statics/images/box1.png'+')'}" v-if="comerGift.coupon_count>0" v-for="(item,index) in comerGift.register_give_coupon" :key="index">
  28. <view class="left">
  29. <text v-if="item.coupon_type==1">{{item.coupon_price.toString().split(".")[0]}}</text>
  30. <text class="nums"
  31. v-if="item.coupon_price.toString().split('.').length>1 && item.coupon_type==1">.{{item.coupon_price.toString().split(".")[1]}}</text>
  32. <text v-if="item.coupon_type==2">{{parseFloat(item.coupon_price)/10}}</text>
  33. <text class="text">{{item.coupon_type==1?'元':'折'}}</text>
  34. </view>
  35. <view class="right">优惠券</view>
  36. </view>
  37. </view>
  38. <view class="btn" @click="accept">
  39. 立即收下
  40. </view>
  41. </view>
  42. <view class="mark"></view>
  43. </view>
  44. </template>
  45. <script>
  46. import {
  47. HTTP_REQUEST_URL
  48. } from '@/config/app';
  49. import colors from '@/mixins/color';
  50. export default {
  51. mixins: [colors],
  52. props:{
  53. comerGift: {
  54. type: Object,
  55. default: function() {
  56. return {}
  57. },
  58. },
  59. fromActive: {
  60. type: Number,
  61. default: 0
  62. }
  63. },
  64. data() {
  65. return {
  66. imgHost: HTTP_REQUEST_URL,
  67. };
  68. },
  69. methods:{
  70. accept(){
  71. this.$emit('comerPop')
  72. }
  73. }
  74. }
  75. </script>
  76. <style lang="scss">
  77. .img {
  78. position: fixed;
  79. top: 162rpx;
  80. left: 9%;
  81. width: 590rpx;
  82. height: 294rpx;
  83. z-index: 100;
  84. }
  85. .tipaddress {
  86. position: fixed;
  87. left: 13%;
  88. top: 25%;
  89. width: 538rpx;
  90. height: 650rpx;
  91. background-color: var(--view-theme);
  92. border-radius: 10rpx;
  93. z-index: 100;
  94. text-align: center;
  95. .title{
  96. color: #fff;
  97. font-size: 50rpx;
  98. margin-top: 32rpx;
  99. margin-bottom: 18rpx;
  100. }
  101. .goods-img {
  102. width: 258rpx;
  103. height: 52rpx;
  104. margin-top: 50rpx;
  105. }
  106. .list {
  107. height: 370rpx;
  108. overflow-x: hidden;
  109. overflow-y: auto;
  110. .list-img {
  111. margin-top: 14rpx;
  112. margin-left: 32rpx;
  113. width: 474rpx;
  114. height: 124rpx;
  115. background-repeat: no-repeat;
  116. background-size: 100% 100%;
  117. .left {
  118. width: 144rpx;
  119. font-size: 48rpx;
  120. font-weight: 500;
  121. color: var(--view-theme);
  122. image{
  123. width: 72rpx;
  124. height: 72rpx;
  125. display: block;
  126. }
  127. .text {
  128. font-size: 24rpx;
  129. }
  130. .nums{
  131. font-size: 30rpx;
  132. }
  133. }
  134. .right {
  135. width: 328rpx;
  136. font-size: 28rpx;
  137. font-weight: 500;
  138. color: var(--view-theme);
  139. text-align: left;
  140. padding-left: 50rpx;
  141. }
  142. }
  143. }
  144. .btn {
  145. width: 474rpx;
  146. height: 78rpx;
  147. background: linear-gradient(90deg, #FFCA52 0%, #FE960F 100%);
  148. border-radius: 39rpx;
  149. font-size: 30rpx;
  150. font-weight: 500;
  151. color: #FFFFFF;
  152. line-height: 78rpx;
  153. text-align: center;
  154. margin-left: 32rpx;
  155. margin-top: 48rpx;
  156. }
  157. }
  158. .mark {
  159. position: fixed;
  160. top: 0;
  161. left: 0;
  162. bottom: 0;
  163. right: 0;
  164. background: rgba(0, 0, 0, 0.5);
  165. z-index: 99;
  166. }
  167. </style>