index.vue 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  1. <template>
  2. <!-- 赠送商品、积分下拉列表 -->
  3. <view>
  4. <view class="gift" :class="giftInfo.show === true ? 'on' : ''">
  5. <view class="title">查看赠品<text class="iconfont icon-guanbi5" @click="closeGift"></text></view>
  6. <view class="list">
  7. <view class="item acea-row row-between-wrapper" v-for="(item,index) in giftInfo.giveProducts" :key="item.id">
  8. <view class="pictrue">
  9. <image :src="item.image"></image>
  10. </view>
  11. <view class="text">
  12. <view class="name line1">{{item.store_name}}</view>
  13. <view class="info line1">{{item.suk}}</view>
  14. <view class="info line1">{{item.threshold_title}}</view>
  15. <view class="bottom acea-row row-between-wrapper">
  16. <view class="money">¥<text class="num">{{item.price}}</text></view>
  17. <view class="limit">x{{item.limit_num}}</view>
  18. </view>
  19. <!-- #ifdef H5 || APP-PLUS -->
  20. <slot name="bottom" :item="item"></slot>
  21. <!-- #endif -->
  22. <!-- #ifdef MP -->
  23. <slot name="bottom{{index}}"></slot>
  24. <!-- #endif -->
  25. </view>
  26. </view>
  27. <view class="item acea-row row-between-wrapper" v-for="(item,index) in giftInfo.giveCoupon" :key="item.id">
  28. <view class="pictrue on acea-row row-center-wrapper">
  29. <view class="iconfont icon-youhuiquan2"></view>
  30. </view>
  31. <view class="text">
  32. <view class="name acea-row row-middle">
  33. <view class="lable">{{item.coupon_type==1?'品类券':item.coupon_type==2?'商品券':'通用券'}}</view>
  34. <view class="names line1">{{item.coupon_title}}</view>
  35. </view>
  36. <view class="info">{{item.threshold_title}}</view>
  37. <view class="bottom on acea-row row-between-wrapper">
  38. <view class="money"><text v-if="item.coupon_type==1">¥</text><text class="num">{{item.coupon_type==1?item.coupon_price:parseFloat(item.coupon_price)/10}}</text><text v-if="item.coupon_type==2">折</text></view>
  39. <view class="limit">x{{item.limit_num}}</view>
  40. </view>
  41. </view>
  42. </view>
  43. <view class="item item acea-row row-between-wrapper" v-for="(item,index) in giftInfo.giveIntegral" :key="item.id">
  44. <view class="pictrue ons acea-row row-center-wrapper">
  45. <view class="iconfont icon-jifen"></view>
  46. </view>
  47. <view class="text">
  48. <view class="name line1">赠送积分</view>
  49. <view class="info">{{item.threshold_title}}</view>
  50. <view class="bottom on acea-row row-between-wrapper">
  51. <view class="money"><text class="num">{{item.give_integral}}</text>积分</view>
  52. </view>
  53. </view>
  54. </view>
  55. </view>
  56. </view>
  57. <view class="mask" @touchmove.prevent :hidden="giftInfo.show === false" @click="closeGift"></view>
  58. </view>
  59. </template>
  60. <script>
  61. export default {
  62. props: {
  63. giftInfo: {
  64. type: Object,
  65. default: () => {}
  66. },
  67. },
  68. data() {
  69. return {};
  70. },
  71. mounted() {},
  72. methods: {
  73. closeGift(){
  74. this.$emit('myevent');
  75. }
  76. }
  77. }
  78. </script>
  79. <style scoped lang="scss">
  80. .gift{
  81. position: fixed;
  82. bottom: 0;
  83. width: 100%;
  84. left: 0;
  85. background-color: #fff;
  86. z-index: 280;
  87. border-radius: 16rpx 16rpx 0 0;
  88. transform: translate3d(0, 100%, 0);
  89. transition: all .3s cubic-bezier(.25, .5, .5, .9);
  90. padding-bottom: 22rpx;
  91. padding-bottom: calc(22rpx+ constant(safe-area-inset-bottom)); ///兼容 IOS<11.2/
  92. padding-bottom: calc(22rpx + env(safe-area-inset-bottom)); ///兼容 IOS>11.2/
  93. .title{
  94. font-size: 32rpx;
  95. color: #282828;
  96. text-align: center;
  97. margin: 38rpx 0 36rpx 0;
  98. position: relative;
  99. .iconfont{
  100. position: absolute;
  101. right: 30rpx;
  102. top:0;
  103. font-size: 36rpx;
  104. }
  105. }
  106. .list{
  107. height: 750rpx;
  108. margin: 0 30rpx;
  109. overflow-x: hidden;
  110. overflow-y: auto;
  111. .item{
  112. margin-bottom: 52rpx;
  113. .pictrue{
  114. width: 150rpx;
  115. height: 150rpx;
  116. border-radius: 10rpx;
  117. &.on{
  118. background-color: var(--view-minorColorT);
  119. }
  120. &.ons{
  121. background-color: rgba(254, 150, 15, 0.1);
  122. .iconfont{
  123. color: #FE960F!important;
  124. }
  125. }
  126. .iconfont{
  127. font-size: 75rpx;
  128. color: var(--view-theme);
  129. }
  130. image{
  131. width: 100%;
  132. height: 100%;
  133. border-radius: 10rpx;
  134. }
  135. }
  136. .text{
  137. width: 520rpx;
  138. color: #999999;
  139. font-size: 28rpx;
  140. .name{
  141. color: #333333;
  142. .lable{
  143. font-size: 18rpx;
  144. color: var(--view-theme);
  145. border:1rpx solid var(--view-theme);
  146. background-color: var(--view-minorColorT);
  147. border-radius: 18rpx;
  148. padding: 1rpx 6rpx;
  149. margin-right: 8rpx;
  150. }
  151. .names{
  152. width: 420rpx;
  153. }
  154. }
  155. .info{
  156. font-size: 24rpx;
  157. margin-top: 6rpx;
  158. }
  159. .money{
  160. color: var(--view-theme);
  161. font-size: 24rpx;
  162. .num{
  163. font-size: 36rpx;
  164. }
  165. }
  166. .bottom{
  167. margin-top: 8rpx;
  168. &.on{
  169. margin-top: 32rpx;
  170. }
  171. }
  172. .limit{
  173. font-size: 24rpx;
  174. }
  175. }
  176. }
  177. }
  178. }
  179. .gift.on{
  180. transform: translate3d(0, 0, 0);
  181. }
  182. </style>