app-goods-poster-two.vue 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. <template>
  2. <view class="app-goods-poster-two main-center">
  3. <view class="box" :style="{'background': `${background}`,'transform' : `scale(${multiple},${multiple})`}">
  4. <view class="goods-image">
  5. <app-poster-image :form="form" :info="info"></app-poster-image>
  6. </view>
  7. <view class="dir-top-nowrap end-bg">
  8. <view class="goods-name t-omit-two">{{info.goods_name}}</view>
  9. <view :class="info.sign === 'flash_sale' ? 'flash-sale' : 'goods-price'">
  10. <app-poster-price :info="info"></app-poster-price>
  11. </view>
  12. <view class="dir-left-nowrap end-info cross-center">
  13. <view class="dir-top-nowrap">
  14. <view class="dir-left-nowrap cross-center user">
  15. <image :src="info.avatar" class="box-grow-0"></image>
  16. <view class="t-omit dir-top-nowrap">
  17. <view>{{info.nickname}}</view>
  18. <view v-if="info.extra_mark[5]">{{info.extra_mark[5]}}</view>
  19. </view>
  20. </view>
  21. <view class="goods-remark dir-left-nowrap">
  22. <view class="dir-left-nowrap cross-center">
  23. <view>{{info.extra_mark[1] ? info.extra_mark[1] : `长按识别小程序码进入`}}</view>
  24. <icon class="icon-three-arrow"></icon>
  25. </view>
  26. </view>
  27. </view>
  28. <view class="poster-qrcode">
  29. <image :src="info.qrcode_url"></image>
  30. </view>
  31. </view>
  32. </view>
  33. </view>
  34. </view>
  35. </template>
  36. <script>
  37. import appPosterImage from "./app-poster-image.vue";
  38. import appPosterPrice from "./app-poster-price.vue";
  39. export default {
  40. name: "app-goods-poster-two",
  41. components: {
  42. appPosterImage,
  43. appPosterPrice,
  44. },
  45. props: {
  46. iconPlugin: Object,
  47. multiple: Number,
  48. info: Object,
  49. form: Object,
  50. },
  51. computed: {
  52. background() {
  53. if (parseInt(this.form.type) === 2) {
  54. let top = this.form.color;
  55. let bottom = this.$utils.colorRgba(this.form.color, 0.5);
  56. return 'linear-gradient(' + top + ',' + bottom + ')';
  57. } else {
  58. return this.form.color;
  59. }
  60. },
  61. },
  62. }
  63. </script>
  64. <style scoped lang="scss">
  65. .app-goods-poster-two {
  66. height: 100%;
  67. width: 100%;
  68. padding: #{24rpx} 0;
  69. .box {
  70. transform-origin: center top;
  71. /*zoom: 0.46;*/
  72. width: #{750rpx};
  73. height: #{1334rpx};
  74. margin: 0 auto;
  75. .goods-image {
  76. height: #{750rpx};
  77. width: 100%;
  78. overflow: hidden;
  79. }
  80. .end-bg {
  81. height: #{616rpx};
  82. width: #{702rpx};
  83. background-image: url("../../../static/image/poster/style-two-end-shadow.png");
  84. background-size: 100% 100%;
  85. background-repeat: no-repeat;
  86. padding: 0 #{26rpx};
  87. position: absolute;
  88. left: #{24rpx};
  89. bottom: #{24rpx};
  90. z-index: 50;
  91. .goods-name {
  92. font-size: #{34rpx};
  93. color: #353535;
  94. margin-top: #{36rpx};
  95. }
  96. .goods-price {
  97. margin-top: auto;
  98. margin-bottom: #{400rpx};
  99. }
  100. .flash-sale {
  101. margin-top: auto;
  102. margin-bottom: #{430rpx};
  103. }
  104. .end-info {
  105. width: 100%;
  106. justify-content: space-between;
  107. position: absolute;
  108. bottom: #{28rpx};
  109. padding-left: #{40rpx};
  110. padding-right: #{40rpx};
  111. .user {
  112. padding-bottom: #{24rpx};
  113. image {
  114. height: #{96rpx};
  115. width: #{96rpx};
  116. display: block;
  117. border-radius: 50%;
  118. }
  119. > view {
  120. max-width: #{250rpx};
  121. margin-left: #{26rpx};
  122. }
  123. }
  124. .poster-qrcode image {
  125. height: #{230rpx};
  126. width: #{230rpx};
  127. display: block;
  128. }
  129. .goods-remark {
  130. color: #353535;
  131. height: #{52rpx};
  132. font-size: #{24rpx};
  133. > view {
  134. height: 100%;
  135. background: #f1f1f1;
  136. padding: 0 #{20rpx};
  137. border-radius: #{20px};
  138. }
  139. }
  140. .icon-three-arrow {
  141. height: #{17rpx};
  142. width: #{15rpx};
  143. background-image: url("../../../static/image/poster/three-arrow.png");
  144. background-size: 100% 100%;
  145. background-repeat: no-repeat;
  146. margin-left: #{10rpx};
  147. }
  148. }
  149. }
  150. }
  151. }
  152. </style>